apache / opendal

Apache OpenDAL: access data freely.
https://opendal.apache.org
Apache License 2.0
3.35k stars 472 forks source link

new service: Add native ceph rados support #4035

Open Xuanwo opened 9 months ago

Xuanwo commented 9 months ago

Inspired by https://ceph.io/en/news/blog/2024/ceph-a-journey-to-1tibps/

It must be interesting for opendal to have native ceph rados support

Xuanwo commented 9 months ago

We have a Rust interface for Ceph at https://github.com/ceph/ceph-rust, but it's currently not well-maintained.

Lancern commented 9 months ago

Wanna give it a try. I don't know if anyone is working on this, but I have some progress in my own testing fork.

The ceph-rust crate is almost unusable for several reasons:

However its raw C library bindgen seems usable. I have built a new binding for testing upon its raw bindgen.

Xuanwo commented 9 months ago

Wow, that's perfect. Thanks for your work!

pcmid commented 3 months ago

I discovered this project and issue a few months ago, and very interested in it. Recently I wrote a wrapper librados library with asynchronization, which is still a very early version.

Later I will try to support native ceph rados based on this library.

guojidan commented 3 months ago

Maybe we don't need to maintain a library by ourselves. We just modify the official library by contributing to the official repository. 🤔

Xuanwo commented 3 months ago

Maybe we don't need to maintain a library by ourselves. We just modify the official library by contributing to the official repository. 🤔

Hi, @guojidan, That would be perfect. Do you know anyone from the Ceph community interested in helping maintain or mentor this project?

guojidan commented 3 months ago

I am a contributor of Ceph and now I need to use the official library to write my own project, so maybe I will implement it. but I have been quite busy recently with moving to a new city. 😄

Xuanwo commented 3 months ago

but I have been quite busy recently with moving to a new city. 😄

Congratulations! Wishing you happiness in your new city.

I am a contributor of Ceph and now I need to use the official library to write my own project, so maybe I will implement it.

Happy to know that. Could you find someone interested in maintaining ceph-rust? I believe both @Lancern and @pcmid are interested in joining the development.

Additionally, if ceph-rust lacks a maintainer, I am willing to help by removing contribution blocks and reviewing PRs.

Lancern commented 3 months ago

I'm definitely willing to help here :) Half a year ago I wrote some experimental implementation and I can share my code if anyone is interested (but it may be a bit out of date since I haven't updated it for half a year).

Xuanwo commented 3 months ago

Hi @Lancern, I'm not familiar with the underlying details of Ceph. Could you tell me how complex it would be to develop pure native Rust bindings for the Ceph RADOS API (without the need for librados.so)?

pcmid commented 3 months ago

I am also very interested in developing librados implemented in pure rust. But maybe this is a long-term project.

Lancern commented 3 months ago

Could you tell me how complex it would be to develop pure native Rust bindings for the Ceph RADOS API (without the need for librados.so)?

@Xuanwo I'm not very familiar with the inner workings of librados but I believe it would require a lot of effort to have a pure Rust implementation. librados is a very fundamental library and some part of this library is implemented in the very core of ceph to deal with protocol details such as message exchanges, authentication, and encryption. I couldn't find a thorough document on the protocol itself besides the official one at https://docs.ceph.com/en/latest/dev/rados-client-protocol/, which is quite incomplete. We may need a guy who knows this better if we decide to implement librados in pure Rust.

guojidan commented 3 months ago

The official library has already implemented a main layer. We can develop based on the official library, but maybe the PR of the Ceph official library is merged very slowly because the Ceph team no longer maintained. so I think we should fork the official library for our own maintenance and development.

guojidan commented 3 months ago

maybe the official library mainly has four problems:

  1. no async supported.
  2. lack some new api.
  3. some Rust syntax is too old.
  4. the config file should remain the same as that of OpenDAL.

And maybe we do not need to care about the more detailed implementation of Librados. Ceph-rust is just a wrapper.

Xuanwo commented 3 months ago

The official library has already implemented a main layer. We can develop based on the official library, but maybe the PR of the Ceph official library is merged very slowly because the Ceph team no longer maintained. so I think we should fork the official library for our own maintenance and development.

Absolutely agree. I'm currently considering establishing a communication channel with the Ceph team to help us directly maintain ceph-rust. Do you have any idea for helping this?

guojidan commented 3 months ago

Ah, ceph-rust is not maintained by the Ceph team. It seems like a personal project and the Ceph team just forked this project.

And I don't know who can maintain this project in the Ceph team.

Xuanwo commented 3 months ago

Ah, ceph-rust is not maintained by the Ceph team. It seems like a personal project and the Ceph team just forked this project.

I believe a donation has been made. Someone developed ceph-rust and then donated it to Ceph. The ceph crate also links to ceph/ceph-rust.

Xuanwo commented 2 months ago

I contacted the original author of ceph-rust. He mentioned that after the project was donated to the Ceph community, it lost all activity. He suggested that we should fork it instead.

Lancern commented 2 months ago

No means to push here but any progress on this?

Xuanwo commented 2 months ago

No means to push here but any progress on this?

Let me try again. If this attempt fails, we'll start a new fork instead.

Xuanwo commented 2 months ago

Hi, @Lancern @pcmid @guojidan, we did it! I now have write permission for ceph-rust and have established the #ceph-rust channel. We can continue our development upstream now!