ublk-org / ublksrv

ublk: userspace block device driver
MIT License
138 stars 47 forks source link

Is there a plan to release Golang library similar to the libublk-rs? #70

Open PhanLe1010 opened 1 month ago

PhanLe1010 commented 1 month ago

Thank you for the great work!

Is there a plan to release a Golang library similar to the libublk-rs https://github.com/ublk-org/libublk-rs ?

Longhorn is trying to support UBLK as the storage frontend (ref ticket https://github.com/longhorn/longhorn/issues/5159). It is mostly written in Golang so we are wondering if there is any plan to release the Golang library

cc @ming1 @derekbit

Thank you very much!

ming1 commented 1 month ago

Hello,

The reason of libublk-rs is that:

And it takes much effort/time in re-writing it with golang. Especially I know nothing about Go now. And there are lots of things for me to do recently: io_uring zero copy, ublk-ebpf, more targets, ...

So I don't have plan to write one golang ublk library.

But if you or anyone would like to write the library or one wrapper with golang, I am happy to provide help.

Thanks,

cz172638 commented 1 month ago

@PhanLe1010 afaik, influxdb v2 is using libflux written in rust, while influx itself in go. why not simply only go-lang wrapper?

PhanLe1010 commented 1 month ago

Hi @ming1

Thank you very much for the explanation! Yeah, it totally makes sense as you already have a lot of other works and it would be too much effort to rewriting (and more importantly maintaining) the library in a new language.

We (Longhorn) will attempt to write a Golang wrapper to see if it works. We would very much appreciate your help when doing this. What would be the best way to reach out to you when we have questions?

Also, do you think it is better to write a Golang wrapper around the C library or the Rust library?

PhanLe1010 commented 1 month ago

@PhanLe1010 afaik, influxdb v2 is using libflux written in rust, while influx itself in go. why not simply only go-lang wrapper?

Thanks @cz172638 for the wrapper idea. We will investigate this

ming1 commented 4 weeks ago

Hi @ming1

Thank you very much for the explanation! Yeah, it totally makes sense as you already have a lot of other works and it would be too much effort to rewriting (and more importantly maintaining) the library in a new language.

We (Longhorn) will attempt to write a Golang wrapper to see if it works. We would very much appreciate your help when doing this. What would be the best way to reach out to you when we have questions?

Either github or email: tom.leiming@gmail.com is fine for me.

Also, do you think it is better to write a Golang wrapper around the C library or the Rust library?

I'd suggest to try Rust library first.

Thanks,

derekbit commented 4 weeks ago

Hi @ming1 Thank you very much for the explanation! Yeah, it totally makes sense as you already have a lot of other works and it would be too much effort to rewriting (and more importantly maintaining) the library in a new language. We (Longhorn) will attempt to write a Golang wrapper to see if it works. We would very much appreciate your help when doing this. What would be the best way to reach out to you when we have questions?

Either github or email: tom.leiming@gmail.com is fine for me.

Also, do you think it is better to write a Golang wrapper around the C library or the Rust library?

I'd suggest to try Rust library first.

Thanks,

@ming1 Thank you. We have the same idea in today's internal discussion. Before diving into the libublk-rs, will the libublk-rs be actively maintained in the future? It seems the c++ version is more active.

cc @PhanLe1010 @shuo-wu @innobead

ming1 commented 4 weeks ago

rs, will the libublk-rs be actively maintained in the future?

Yes.

c++ version is just easy for trying some new ideas, but all new features & bug fixes will land in Rust lib.

Thanks,

derekbit commented 4 weeks ago

rs, will the libublk-rs be actively maintained in the future?

Yes.

c++ version is just easy for trying some new ideas, but all new features & bug fixes will land in Rust lib.

Thanks,

Cool! Thanks @ming1

PhanLe1010 commented 4 weeks ago

Thanks a lot @ming1 ! We are very appreciate your support!

Hi @ming1 Thank you very much for the explanation! Yeah, it totally makes sense as you already have a lot of other works and it would be too much effort to rewriting (and more importantly maintaining) the library in a new language. We (Longhorn) will attempt to write a Golang wrapper to see if it works. We would very much appreciate your help when doing this. What would be the best way to reach out to you when we have questions?

Either github or email: tom.leiming@gmail.com is fine for me.

Also, do you think it is better to write a Golang wrapper around the C library or the Rust library?

I'd suggest to try Rust library first.

Thanks,