opendal icon indicating copy to clipboard operation
opendal copied to clipboard

new service: Add native ceph rados support

Open Xuanwo opened this issue 1 year ago • 21 comments

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 avatar Jan 20 '24 17:01 Xuanwo

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

Xuanwo avatar Jan 20 '24 17:01 Xuanwo

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:

  • It is not actively maintained for several years;
  • Its Rust interface lacks several key features that are indeed required by OpenDAL:
    • Configurations cannot be set until you have connected to the remote cluster;
    • No asynchronous support.

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

Lancern avatar Jan 23 '24 01:01 Lancern

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

Xuanwo avatar Jan 23 '24 01:01 Xuanwo

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.

pcmid avatar Jul 19 '24 10:07 pcmid

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

guojidan avatar Jul 29 '24 08:07 guojidan

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?

Xuanwo avatar Jul 29 '24 09:07 Xuanwo

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. 😄

guojidan avatar Jul 29 '24 09:07 guojidan

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.

Xuanwo avatar Jul 29 '24 10:07 Xuanwo

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).

Lancern avatar Jul 29 '24 10:07 Lancern

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)?

Xuanwo avatar Jul 29 '24 10:07 Xuanwo

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

pcmid avatar Jul 29 '24 12:07 pcmid

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.

Lancern avatar Jul 29 '24 13:07 Lancern

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 avatar Jul 30 '24 00:07 guojidan

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.

guojidan avatar Jul 30 '24 02:07 guojidan

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?

Xuanwo avatar Jul 30 '24 06:07 Xuanwo

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.

guojidan avatar Jul 30 '24 07:07 guojidan

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 avatar Jul 30 '24 08:07 Xuanwo

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.

Xuanwo avatar Aug 19 '24 15:08 Xuanwo

No means to push here but any progress on this?

Lancern avatar Sep 02 '24 11:09 Lancern

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 avatar Sep 02 '24 16:09 Xuanwo

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!

Xuanwo avatar Sep 03 '24 12:09 Xuanwo