Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

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

Closed
thedavidmeister opened this issue Feb 23, 2018 · 13 comments
Closed

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

thedavidmeister opened this issue Feb 23, 2018 · 13 comments
Labels
enquiry A request or question from a user.

Comments

@thedavidmeister
Copy link

No description provided.

@rnewman
Copy link
Collaborator

rnewman commented Feb 23, 2018

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
Copy link
Author

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
Copy link
Collaborator

rnewman commented Feb 23, 2018

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?

@rnewman rnewman added the enquiry A request or question from a user. label Feb 23, 2018
@thedavidmeister
Copy link
Author

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

  • datalog queries
  • no need for expensive datomic setups
  • opensource/mozilla
  • persistence with sqlite

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
Copy link
Collaborator

rnewman commented Feb 23, 2018

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
Copy link
Author

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
Copy link
Collaborator

rnewman commented Feb 23, 2018

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
Copy link
Author

are you expecting major obstacles at this point?

@rnewman
Copy link
Collaborator

rnewman commented Feb 24, 2018

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

@thedavidmeister
Copy link
Author

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

@rnewman
Copy link
Collaborator

rnewman commented Feb 25, 2018

We do too!

@rnewman rnewman closed this as completed Feb 25, 2018
@zcaudate
Copy link

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
Copy link
Collaborator

rnewman commented Jul 25, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enquiry A request or question from a user.
Projects
None yet
Development

No branches or pull requests

3 participants