typedb / typedb-driver-rust

TypeDB Driver for Rust
https://typedb.com
Apache License 2.0
12 stars 11 forks source link

Any idea when this will be ready to try? #1

Closed d4h0 closed 2 years ago

d4h0 commented 2 years ago

Hello Vaticle team,

I'm pretty excited, that there will be an official Rust client for TypeDB!

Do you have any rough estimate when this will be ready to test?

Also: I've noticed the rust-poc repo. Can you tell me what this is?

You will not rewrite TypeDB in Rust, right?

That would be way too good, to be true... :)

flyingsilverfin commented 2 years ago

Hullo!! First off, @alexjpwalker is indeed rewriting the client in rust, which is our learning project to get a grip on Rust! Should be done soon! Secondly, we are also going to rewrite TypeDB in Rust this year! Stay tuned over the next months ;)

alexjpwalker commented 2 years ago

We don't have an official release date but I am working full time on this project now, with commits going directly to the master branch for the time being. You can keep an eye on it and expect a viable solution in the first half of this year.

https://github.com/vaticle/rust-poc was created last year to establish that we are able to successfully use Bazel as the build system for our future Rust projects. Vaticle uses Bazel consistently throughout its ecosystem. rust-poc is akin to a Hello World application; typedb-client-rust is now our first Rust project that will go "live on the field". 😎

d4h0 commented 2 years ago

Thanks, for the quick reply, @flyingsilverfin and @alexjpwalker!

Wow, I seriously think today is my lucky day.

This is definitely a smart move (security/performance/memory-usage/reliability-wise). When I saw TypeDB for the first time, I stopped considering it as soon as I found out it was written in Java.

However, TypeDB comes by far the closest to the kind of graph database I'd like to use (so I have a look, from time to time). It seems pretty insane to me, that most graph databases are dynamically typed. Neo4j takes this to the next level, with how it handles null values...

(I haven't read the documentation of TypeDB, yet. However, I'm really hoping, there are no null values. Or at least, that the query compiler complains if nullable values are not checked before use).


@alexjpwalker: Is there any chance, this Rust client is already remotely usable?

I just started to build a non-user-facing application, so crashes would not be the end of the world (and with Rust, crashes should be minimal, anyway. At least, if you don't use unwrap, unchecked indexing, etc.).

I also can live with breaking changes (Rust makes refactoring pretty easy, and reports any changes immediately). The lack of documentation isn't a problem, as well (when it is okay to ask questions when the source code doesn't answer my questions).

Unfortunately, I ended up selecting Neo4j (after evaluating graph databases and reading documentation for well over a month, and after the complete Dgraph team, my first choice, quit the company, recently...), so I'm a bit desperate... (I really don't like Neo4j at all...).

But if the current code is too unusable, or the knowledge that someone is using it too hindering (which it shouldn't at all!), then that would be fine too. I'll just port my code over, when the client is ready :)

alexjpwalker commented 2 years ago

@d4h0 The state it's in right now (and bear in mind this will rapidly evolve and may regress) is that we can perform database management operations and run TypeQL match queries against TypeDB.

Major missing functionality:

My first priority is deserialization of query answers. We're trialling two approaches to model Concepts; one using enums, and one using trait objects.

Feel free to have a play around with it if you'd like! I'm quite new to Rust myself and it would be interesting to discuss modelling techniques.

d4h0 commented 2 years ago

@alexjpwalker: Thanks for the information. Ok, I'll then wait a bit longer. Three months isn't too long, and I have an idea how I can minimize the amount of things I have to rewrite then.

@flyingsilverfin and @alexjpwalker: Thanks, for answering my questions! I'm obviously pretty excited about TypeDB... ;)

d4h0 commented 2 years ago

Hi @alexjpwalker, if it's not too much of a bother, would it be possible to get another status update?

alexjpwalker commented 2 years ago

@d4h0 What we've added since the last update:

Work is additionally ongoing on a new TypeQL Rust library which will allow the programmatic construction and parsing of queries.

Significant functionality remains unimplemented and I've had to divert attention from the Rust client as of late in order to build IDE tooling for Rust. As such, we still need:

Based on current projections I would expect us to be able to return to this project in a couple of weeks, after which it should take another couple of weeks to complete the listed features and produce our first alpha release.

d4h0 commented 2 years ago

Thanks for the update, @alexjpwalker!

Sounds like you are making good progress :)

Based on current projections I would expect us to be able to return to this project in a couple of weeks, after which it should take another couple of weeks to complete the listed features and produce our first alpha release.

Alright, I'll have another look in a few weeks/months 👍

Btw., are you planning to write an article about your experience and future plans in regard to Rust? I'd be pretty interested in reading something like that.

That would also be a good way to raise awareness of TypeDB in the Rust community (I strongly doubt, I'm the only person in the Rust community who would love to use something like TypeDB).

I know Rust is not prefect (no programming language is), and that there probably would be negative stuff, but I still believe that would be interesting to read – and maybe someone knows a solution for something you struggled with.

alexjpwalker commented 2 years ago

We'll absolutely put out some Rust development articles once we're in the thick of it. The Rust language shares many of TypeDB's ideals.

alexjpwalker commented 2 years ago

Version 0.1.2 is now on crates.io. It's by no means production-ready, but for development purposes, go ahead and give it a try! We'll be stabilising it and adding the remaining features over the next few weeks.

d4h0 commented 2 years ago

@alexjpwalker: Awesome! Thanks for letting me know! :)

I'll give it a try, as soon as I have some free time available!