Fork me on GitHub

Datomic Cloud instance suddenly giving

  "errorMessage": "Connection refused",
  "errorType": "datomic.ion.lambda.handler.exceptions.Unavailable",
  "stackTrace": [
I've tried from lambda as well as bastion. The EC2 instance is up and running. It's been a while since I've touched this. If I redeploy master with no changes, will I lose the handles I have connecting api gateway and my lambda ions? I just need to get this service back up and running

jaret21:02:13 can you log a case by emailing <mailto:[email protected]|[email protected]>? I would like to gather more information on this failing service before offering concrete next steps and it would be best to share that information over a case. Useful starting info: -Cft version. -solo or prod? -other services are working? -did you deploy before the error? Anything change before you saw this error?


@jaret I just redeployed master and it's fixed itself. Would it be useful for me to still submit a case to cognitect?


If it helps: cft version I don't know (what is cft?), solo topology, we only are running that one datomic service so I couldn't test anything else, lat deployment was in the summer and it's been running ever since until a day or two ago


Yes. I am very interested in tracking this down and would like to provide you potential steps to gather a thread dump should this issue occur again.


CFT = cloud formation template version, found in the outputs of your compute stack

jaret21:02:11 obviously no urgency on the case, but if you get a chance please do log one. If we have a bug here I’d like to address it.


Sure thing!


has anyone used datascript as a client-side cache for datomic?

Joe Lane22:02:27

I think you'd be surprised how different they are.

Joe Lane22:02:41

(Meaning, I was)


in that semantically they are too different for datascript to act as a cache that way?


the reason I’m asking is because I’ve been thinking about building a datalog API in front of our microservices (a la GraphQL), and started thinking that it might make sense to use datascript as a client-side cache to reduce the queries that have to actually hit the backend. my thinking was that a query could respond with not only the result, but the datums that were resolved in the processing of the query. that way the client side could transact those into a client-side cache and future queries could potentially query the local db instead of sending a request to the server. however, populating the cache for a query could end up accidentally being quite a lot of datums that need to be sent over the wire, even if the query result is small. so I was wondering if this same idea had been solved by some datomic <-> datascript integration.


This sounds a lot like Meteor's minimongo! (along with all the hard problems that came with it)


I'm starting to think that datalog might be too general for this


there’s a reason graphql resembles pull expressions more than sql or datalog


IME the problems were 1) determining dependencies (i.e., do I have the thing I need to query or not) efficiently 2) expressing those things at the right granularity or even overlapping granularity 3) updating those things efficiently


a datomic peer can be really sloppy with this by just having lots of ram and a fast network and very large granularity (i.e. “giant seqs of sorted datoms”


on a remote, semi-untrusted client, you can’t do that


you need to send a lot less, and you need to make sure they can’t see “nearby” data which may not be theirs


yeah that makes sense


I guess the biggest downside of datalog for this use case is that it’s much harder to build an index on top of a set of queries you’re sending.

Joe Lane23:02:59

So, at that point you're putting your database on the internet.

Joe Lane23:02:58

(If i'm understanding you correctly)


I’m not sure what you mean by that.

Joe Lane23:02:10

What is the first problem (the a la GraphQL) you're trying to solve? Why are you interested in building the datalog api? What brought you to the conclusion of "use datascript as a client-side cache"? What are you interested in caching?