You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "kebe7jun (via GitHub)" <gi...@apache.org> on 2023/11/30 09:10:07 UTC

[I] HTTP service support list operation [incubator-opendal]

kebe7jun opened a new issue, #3688:
URL: https://github.com/apache/incubator-opendal/issues/3688

   OpenDAL is a fantastic project, and I am attempting to integrate it into my system. However, I've noticed that the current HTTP type file system does not support the list operation, which poses significant difficulties for us. We are unable to use commands like `cp -r` to operate on the HTTP file system. 
   The page structure for static files on servers like Nginx or Apache Server is quite similar, as seen on pages like https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/stable/. It seems feasible to support HTTP list operations by parsing specific HTML structures. 
   To my knowledge, platforms like Alluxio also support this kind of operation. 
   I couldn't find any related information in the issue section, so I wanted to ask if there is any reason we are not planning to support this? Are there any concerns? 
   Or, I am willing to help the community accomplish this task. Would the community be open to accepting my contribution?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] HTTP service support list operation [incubator-opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #3688:
URL: https://github.com/apache/incubator-opendal/issues/3688#issuecomment-1833419695

   Seems `alluxio.underfs.web` is not part of open source `alluxio`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] HTTP service support list operation [opendal]

Posted by "Xuanwo (via GitHub) via commits" <co...@opendal.apache.org>.
Xuanwo commented on issue #3688:
URL: https://github.com/apache/opendal/issues/3688#issuecomment-7062195216

   On `main`, the HTTP backend returns `Unsupported` for `list`. HTTP defines no standard directory index format, and index pages vary by server and configuration. [HTTP backend](https://github.com/apache/opendal/blob/125b879221c708d8e76414a96e7e9427a7bfac94/core/services/http/src/backend.rs#L253-L258)
   
   If you already have a file manifest, enable `layers-immutable-index`, load the paths with `ImmutableIndexLayer::extend_iter(...)`, and attach the layer to your read-only HTTP operator. This enables listing from an in-memory snapshot. Files added on the server appear only after you refresh the manifest and rebuild the index. [Layer setup](https://github.com/apache/opendal/blob/125b879221c708d8e76414a96e7e9427a7bfac94/core/layers/immutable-index/README.md#L6-L16) ยท [Index API](https://github.com/apache/opendal/blob/125b879221c708d8e76414a96e7e9427a7bfac94/core/layers/immutable-index/src/lib.rs#L29-L79)
   
   If you need live directory discovery, for example to run `cp -r` against an HTTP mirror, could you share a representative index page or its format (nginx `autoindex`, Apache `mod_autoindex`, or custom HTML)? It would also help to know whether a caller-supplied parser callback would fit your use case. [Earlier parser discussion](https://github.com/apache/opendal/issues/3688#issuecomment-1870761251)
   
   *Note: This comment was generated with AI assistance.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] HTTP service support list operation [incubator-opendal]

Posted by "kebe7jun (via GitHub)" <gi...@apache.org>.
kebe7jun commented on issue #3688:
URL: https://github.com/apache/incubator-opendal/issues/3688#issuecomment-1833390792

   https://docs.alluxio.io/os/user/stable/en/ufs/WEB.html
   
   Alluxio provides examples of mounting a file system based on the web (HTTP) protocol.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] HTTP service support list operation [incubator-opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #3688:
URL: https://github.com/apache/incubator-opendal/issues/3688#issuecomment-1833386061

   > I couldn't find any related information in the issue section, so I wanted to ask if there is any reason we are not planning to support this? Are there any concerns?
   
   We don't support list operations due to the lack of established standards. Parsing unknown HTML can be challenging and prone to errors. I'm not sure should we add such logic inside http service.
   
   > platforms like Alluxio also support this kind of operation.
   
   Would you like to provide some references?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] HTTP service support list operation [incubator-opendal]

Posted by "kebe7jun (via GitHub)" <gi...@apache.org>.
kebe7jun commented on issue #3688:
URL: https://github.com/apache/incubator-opendal/issues/3688#issuecomment-1833442930

   rclone also do that... 
   
   https://github.com/rclone/rclone/blob/9061e8185054a713f0c218b0e33e64993f19a514/backend/http/http.go#L382-L412


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] HTTP service support list operation [incubator-opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #3688:
URL: https://github.com/apache/incubator-opendal/issues/3688#issuecomment-1870761251

   Hello @kebe7jun, do you think it would be beneficial for an HTTP service to accept a closure? 
   
   For instance:
   
   ```rust
   let cfg = services::Http::default();
   cfg.index_parser(my_parser);
   
   ...
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org