-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC-1477: Remove Object Concept #1477
Conversation
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
I think removing
And we can provide users with some best practices to let them know, for example, that creating objects incurs costs. |
The scan/list result will be an The public API should look like: impl Entry {
pub fn mode(&self) -> EntryType;
pub fn path(&self) -> &str;
pub async fn stat(&self) -> Result<Metadata>;
pub async fn metadata(&self, key: impl Into<MetaKey>) -> Result<Metadata>;
...
}
The reuse of objects will be removed since they are only a simple wrapper of Operator and a path. According to user code, almost no one reuses them. Users won't perform different actions over the same object like the following: o.read()
o.stat()
o.read()
As described in our RFC, Object is just a wrapper of
We have a plan to provide a let bop = op.blocking();
bop.read("path")? |
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
So why not just keep Even renaming
IMO, the profits aren't as substantial as anticipated.
SGTM. |
By removing op.read("file").await?; But this one, user may need to think: op.object("file").read().await?;
Sadly, no. |
One thing that often bothers me is that Object is an abstract concept in the storage system and cannot correspond to a physical entity. It is difficult for me to explain what it is in one sentence to users without storage background. That why I want to delete it from OpenDAL. |
These two comparisons don't seem to be the same thing.
Yes, many Want to see what the community's thoughts are. |
We can think of Object as an internal concept that users do not need to understand and perceive unless they have to use it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the whole, I admire this RFC. We can harmonize opendal’s behavior to std::fs, allowing users to utilize it with no extra cost.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Looking forward to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A thunder of spring!
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
RFC: Remove Object Concept