Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client API support? #6

Open
den1k opened this issue Jan 25, 2018 · 4 comments
Open

Client API support? #6

den1k opened this issue Jan 25, 2018 · 4 comments

Comments

@den1k
Copy link

den1k commented Jan 25, 2018

Quickly skimmed through the client API and it has with-db. Now that cloud is a thing it would be amazing to quickly fork prod DB's. Anything holding this back?

https://docs.datomic.com/client-api/datomic.client.api.html#var-with-db

@vvvvalvalval
Copy link
Owner

@den1k db.with() support on clients is potentially somewhat unreliable for this use - I'm waiting for Stuart Halloway to come back to me with more info.

In any case, if we're to create with-backed mock connections on Clients, it's probably more sensible to do it in another library.

@iku000888
Copy link

Just another 👍 form me

@stevebuik
Copy link

and one from me too, especially now that dev-local exists.

Joshua Heimbach was also asking about this capability on slack so interest is building

@vvvvalvalval
Copy link
Owner

Alright folks, I probably won't have time to make that dev anytime soon, especially given that I don't use the client lib currently.

Having said that: as I mentioned above, I think it's sensible to do that in a separate lib, to keep dependencies separate. So feel free to make that lib - I suggest datomock-client for the name. I really don't expect it to be hard, an undocumented implementation should be below 200 LoC. I could imagine this as a Kata in a Clojure meetup.

Compared to this lib, the main additional difficulties I see are:

  1. Making the API async will make things slightly harder than in this lib, you'll probably want to keep the state in a core.async loop rather than an Atom or Agent (a nice core.async exercise!).

  2. The Client API offers no protocol or interface for Connections. There probably is one, but as an implementation detail that will have to be discovered and relied on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants