Fork me on GitHub
#datomic
<
2020-02-18
>
Brian20:02:44

Datomic Cloud instance suddenly giving

{
  "errorMessage": "Connection refused",
  "errorType": "datomic.ion.lambda.handler.exceptions.Unavailable",
  "stackTrace": [
    "datomic.ion.lambda.handler$throw_anomaly.invokeStatic(handler.clj:24)",
    "datomic.ion.lambda.handler$throw_anomaly.invoke(handler.clj:20)",
    "datomic.ion.lambda.handler.Handler.on_anomaly(handler.clj:171)",
    "datomic.ion.lambda.handler.Handler.handle_request(handler.clj:196)",
    "datomic.ion.lambda.handler$fn__3841$G__3766__3846.invoke(handler.clj:67)",
    "datomic.ion.lambda.handler$fn__3841$G__3765__3852.invoke(handler.clj:67)",
    "clojure.lang.Var.invoke(Var.java:399)",
    "datomic.ion.lambda.handler.Thunk.handleRequest(Thunk.java:35)"
  ]
}
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

@brian.rogers 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?

Brian21:02:30

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

Brian21:02:58

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

jaret21:02:24

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.

jaret21:02:27

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

jaret21:02:11

@brian.rogers 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.

Brian21:02:16

Sure thing!

lilactown22:02:53

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)

lilactown22:02:18

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

lilactown23:02:51

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.

aisamu02:02:04

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

lilactown03:02:02

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

favila13:02:33

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

favila13:02:57

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

favila13:02:50

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”

favila13:02:02

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

favila13:02:22

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

lilactown14:02:40

yeah that makes sense

lilactown15:02:05

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)

lilactown23:02:35

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?