This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-07
Channels
- # aleph (15)
- # beginners (186)
- # boot (11)
- # bristol-clojurians (1)
- # clara (1)
- # cljdoc (2)
- # cljs-dev (5)
- # clojure (57)
- # clojure-austin (1)
- # clojure-dev (87)
- # clojure-italy (7)
- # clojure-spec (5)
- # clojure-uk (56)
- # clojurescript (18)
- # cursive (29)
- # data-science (10)
- # datomic (84)
- # duct (83)
- # figwheel-main (4)
- # fulcro (42)
- # jobs (3)
- # lambdaisland (2)
- # off-topic (28)
- # parinfer (3)
- # portkey (3)
- # re-frame (28)
- # reitit (7)
- # remote-jobs (8)
- # shadow-cljs (29)
- # spacemacs (30)
- # specter (6)
- # sql (8)
- # tools-deps (60)
Documentation suggestion: document the :next-t
key of Database values in clients https://docs.datomic.com/client-api/datomic.client.api.html#var-db
It's pretty useful for working with the Log API in particular
a stupid question: what is the clojure way of maintaining a certain relationship between datomic entities? Say there are three entities in the db, $PUBLIC_KEY $MESSAGE and $SIGNATURE such that the latter enjoys a mathematical relationship with regard to the first two. can datomic know about such a relationship or does it have to be programmed independently of datomic?
Has to be enforced externally by the writers - there are no equivalent to e.g column constraints in sql. See https://stackoverflow.com/questions/48268887/how-to-prevent-transactions-from-violating-application-invariants-in-datomic
What is the story around integration testing and unit testing with datomic cloud? I would like to be able to run tests without internet connection. The only reference I found was this: https://forum.datomic.com/t/integration-testing/465
Hi @UDDUSGGKB. Because this became a blocker for us, we ended up writing datomic-client-memdb [1] to facilitate local development and CI testing with Cloud. It’s a small library that wraps Datomic Free in-memory databases with the Datomic Client protocols. I wrote the library so let me know if you have any questions. [1] https://github.com/ComputeSoftware/datomic-client-memdb
Sweet! Thanks for the github link and the lib. How do you deal with backups and restores with datomic cloud? Let say I want my in memory dev db to be a backup from prod?
I haven't needed to do that. I don't believe there's any built-in way to do that with Cloud 😞 Certainly would be helpful if the Datomic team provided that.
Do you know if its possible to connect to one of the peer instances from the bastion server and run the datomic bin restore command?
Also, how can one restore a datomic db from the S3 buckets? I am still unsure how this all fits
for those of you who use ions / api gateway, do you ionize a handler for every REST end point? for example, a mostly 1-1 map: (/example/auth -> my-auth-ion, /example/colors -> my-colors-ion). my lambdas go cold after a while (to be expected), and so each visit to the web app is painfully slow as each supporting lambda heats up. just wondering in practice how you all deal with this? is this acceptable in your production applications? does anyone use one big lambda and then dispatch internally?
in something like nodejs a cold start is barely noticeable, but as i fetch various assets i'm looking at 4-6 seconds per resource if it hasn't been touched in a while.
I can always scale my lambda concurrency up, then set a timeout where if it takes more than 200ms (due to cold start when scaling up during a burst), retry and hit the other warm instance.
But for the most part, a lot of the endpoints, even with different routes, all end up calling the same lambda.
I can. One of my apps uses AppSync + GraphQL so there I dispatch based on graphql stuffs.
However, I’ve also succeeded in calling an ion lambda directly from the web without fronting it with API Gateway.
There's some tricks to getting things like CORS to work with API Gateway, but once you wrap your head around it it's pretty simple. I'm actually going to write a quick post at some point about the little stuff I ran into and how to fix it.
Ha, I still need to learn from @lanejo01 how he's doing that. Basically the way the AWS SDKs do?
Here is a scratch project. Its a bit under documented and not totally cleaned up. https://github.com/MageMasher/ion-web
However after listening to rich’s talk at clojure nyc (theres a video on youtube) he made a comment that makes curious about sticking with apigw
i think my brain was warped by the datomic ions tutorial. it's just an odd place to leave the user: a single greedy end point pointing to a ring handler. i'm fairly new to AWS though, so maybe it's just me.
by the way, thanks for the discussion. finding best-practices or "real life" example setups of ions is tough. i'm planning to blog a few of my trials and tribulations along the way. might spare a few people some trouble.
(it's mostly me not understanding what are probably basic principles but i'm sure i'm not alone)
you have to keep in mind that API GW can be configured as an edge network and Lambdas probably have similar elastic scaling properties (though I'm not sure if they're bound to one AWS region), so even though it looks like you're piping everything through one "place", it's not really a bottleneck.
Ions isn't quite as ironed out (yet), but it's getting close, and with a much more powerful model
agreed, and i'm certainly not complaining. it's a huge win for us to be able to push clojure code.
yeah, and as usual (in my experience), the difficulties come more from facts about how the JVM works (eg classloading and such), not Clojure proper
for instance i still get worried about co-authoring our ions project. if another developer is working on some newly exposed ions in their code base while i do the same, and we're both pushing and deploying, then are we removing each other's ions?
if you're pushing to the same system, I think so. I think the answer is for each developer to have their own Solo system for dev purposes
right. I think if devs are doing a good job with schema attribute namespacing, and your project is organized sensibly, you're much more likely to have clean "schema merges" when you go to integrate than you would with eg relational schema, or even schemaless. This is all speculation on my part though, since I haven't gone through any of that yet.
Honestly though, Datomic's notion of schema, and the possibility that it has properties like that, is the main difference-making reason that I'm betting on it
we found that our schema changed quite a bit during the very start of the project. in a normal db we'd "take the good parts" and maybe start a fresh one, but we still haven't solved data dumps / loads in Cloud.
but we've also found that having such a factual and flexible schema means we can continue working with the same instance and chalk up changes to historical events
I see. Again, I haven't gotten far enough to speak from experience, but my sense is that following the rules for non-breaking growth that Rich has been laying out across the Clojure ecosystem allows you to live with your past decisions/data without having to do massive structural migrations along the way. I think that makes us devs uncomfortable because we like to clean up our messes (eg cleaning up Git history, refactoring, schema migration, etc...), but that discomfort with messes is totally trumped by the pain of breakage at integration points.
Hey I'm trying to create a datomic cloud
from awsmarketplace and after some waiting on CloudFormation I get this error
The following resource(s) failed to create: [DhcpOptions, EnsureEc2Vpc].
Then it auto-rollback to ROLLBACK_COMPLETE
status
Now with
The following resource(s) failed to create: [LambdaTagDdbPolicy, DhcpOptions, EnsureEc2Vpc].
Failed to create resource. See the details in CloudWatch Log Stream: 2018/11/07/[$LATEST]c6878226f3da4b06b3a803c8873b0262
The following resource(s) failed to create: [LambdaTagDdbPolicy, DhcpOptions, EnsureEc2Vpc].
when I had that issue it was because my account in that region had both the EC2 (classic) & VPC under supported platforms. Not sure what else it might be, maybe hit the datomic guys with a support ticket
I found that my AWS is really old and has this VPC/EC2 problem. I will try to solve it next week.
it’s not clear to me if you are ec2-vpc, or just vpc https://docs.datomic.com/cloud/operation/account-setup.html#ec2-vpc-only