khonsulabs / bonsaidb

A developer-friendly document database that grows with you, written in Rust
https://bonsaidb.io/
Apache License 2.0
998 stars 37 forks source link

Clients for other languages #280

Open FeldrinH opened 1 year ago

FeldrinH commented 1 year ago

I see there is an official Rust client for accessing BonsaiDB remotely. Are there any plans for clients in other programming languages?

ecton commented 1 year ago

I don't currently have plans for clients in other languages -- and that's selfishly because I am so happy with Rust. However, I would love for people who do use other languages to help build plugins using the bonsaidb-client crate, or maybe even wrapping the local/server crates too.

That being said, I do think that this project is a little bit early in development to start maintaining a lot of client libraries for other languages.

If you don't mind, I'd like to keep this issue open as a place for people to either request support for a language or volunteer help to support a language.

FeldrinH commented 1 year ago

Would it be feasible to maintain a from-scratch client library? For example in Java it is more portable and convenient to work with libraries that are implemented in pure Java. Edit: I don't necessarily mean that it should be an officially maintained client. I mean would it be feasible in general, if somebody is willing to put in the work.

ecton commented 1 year ago

Yes, it should be! The main hurdle will be that the WebSocket protocol and the default serialization mechanisms both use Pot for encoding its data. This is a format that I invented, so it has no other implementations in any other languages. It should be documented thoroughly enough to implement in another language -- but I'm happy to help answer questions and improve the documentation on the format.

The other issue is that right now I do not maintain backwards compatibility with the wire protocol. When I make breaking changes to the protocol, I increment the protocol version, and older clients are currently unable to connect. Having a separately maintained client would encourage me to improve how I handle these changes to try to allow backwards compatibility for at least some period of time.