mozilla / mentat

UNMAINTAINED A persistent, relational store inspired by Datomic and DataScript.
https://mozilla.github.io/mentat/
Apache License 2.0
1.65k stars 115 forks source link

how do i connect and run queries from clojure? #567

Closed thedavidmeister closed 6 years ago

rnewman commented 6 years ago

Mentat is an embedded Rust database; think SQLite, not PostgreSQL. You could wrap it in a server API, but we have not done so; it’s not our focus.

Can you clarify what you’re trying to do?

thedavidmeister commented 6 years ago

i was hoping to use it in a clojure program to run datomic style queries with sqlite

https://github.com/thedavidmeister/byteball-clj

byteballcore uses sqlite for storing a DAG, but i thought that something datomic style might be a good alternative too

for all the reasons outlined in the readme, basically :)

I had assumed that i could use mentat and send through queries somehow but i guess not :/

rnewman commented 6 years ago

If you can call C libraries, you can use Mentat — and you already call into SQLite. We have a proto app that calls into a Rust layer on top of Mentat from Android Java via JNA. There might be a little FFI munging to backport from that, but it shouldn’t be difficult.

What’s your timeline?

thedavidmeister commented 6 years ago

i'm just noodling atm, mentat looks like an exciting project:

i found it because someone mentioned it in the datascript slack channel

thanks for the reference example

unfortunately, my rust experience is limited to reading the manual once about a year or so ago >.<

rnewman commented 6 years ago

Sounds like a reasonable fit, then. An “Android” library should be pretty close to usable from Clojure. Once that exists, you’ll have something more concrete to evaluate.

thedavidmeister commented 6 years ago

sweet, in the meantime i'll play around with datascript in memory and assume there'll be persistence at some point

what is the overall state of the project development btw? i read a blog post that said it might be getting canned by mozilla, which would be a real shame if true...

rnewman commented 6 years ago

It's under active development to support sync and storage exploration. If it continues to be promising, and/or we shift towards product delivery, it'll continue to be developed. If we find major obstacles, then we'll can it or change direction.

thedavidmeister commented 6 years ago

are you expecting major obstacles at this point?

rnewman commented 6 years ago

Generalized syncing is hard. Building and documenting a storage system is tricky. Coping with Firefox scale is a challenge. Pivots are possible.

thedavidmeister commented 6 years ago

mmm ok, well i hope it works out, this has the potential to be pretty awesome :D

rnewman commented 6 years ago

We do too!

zcaudate commented 6 years ago

I'm wondering about how this is progressing. I noticed that there is now an android SDK. Is there anyway to start using it from maven?

rnewman commented 6 years ago

@zcaudate you might be interested in #794 and #786.