This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # 100-days-of-code (5)
- # adventofcode (1)
- # announcements (8)
- # beginners (148)
- # boot (17)
- # calva (26)
- # cider (17)
- # cljdoc (2)
- # cljs-dev (55)
- # cljsjs (2)
- # clojure (198)
- # clojure-dev (11)
- # clojure-finland (1)
- # clojure-italy (23)
- # clojure-nl (6)
- # clojure-spec (44)
- # clojure-uk (148)
- # clojurescript (27)
- # clojutre (20)
- # core-logic (21)
- # cursive (12)
- # datascript (10)
- # datomic (33)
- # emacs (11)
- # figwheel-main (49)
- # fulcro (19)
- # graphql (2)
- # off-topic (48)
- # onyx (2)
- # other-languages (53)
- # pedestal (3)
- # reagent (75)
- # reitit (17)
- # rum (1)
- # slack-help (2)
- # specter (2)
- # sql (3)
- # tools-deps (24)
- # unrepl (4)
- # yada (1)
I'm puzzling over how layer on some data integrity constraints. I see that using custom transactor functions are a way to add logic but I haven't seen any conventions around using it to ensure data integrity robustly. Simple example might be: all People entities must have a :person/name. This is easily enforced when creating but the other case to consider is a different piece of code retracting the :person/name attribute on an entity. Clearly the first issue is that entities don’t have a type. I wondered about giving entities an optional :constraint/spec keyword attribute and using a generic transactor helper fn to ensure all entities affected are still valid data using s/is-valid?
@olivergeorge if all people must have a person/name, maybe you can't find a person if they don't have a person/name?
Question about datomic cloud. So if i'm reading things correctly, the only way to run your client applications, is in the same VPC as datomic cloud? Ie there's no way to have say, an app running in Heroku access datomic cloud via the client lib?
and if that's the case, how are people that run the transactor on aws, and their peers on heroku, managing to properly secure the transactor?
@greywolve there's a section in the docs that describes how to run clients in another vpc https://docs.datomic.com/cloud/operation/client-applications.html#separate-vpc
Thanks, do you know if it's possible to get this right if you're hosting on Heroku in the same aws region?
I'm facing this same question myself. I'm thinking it would theoretically be possible either to have a proxy host within AWS that could mediate traffic between Heroku and Datomic Cloud, or else open up a relevant security group to allow traffic from Heroku's network.
But I'm seeing a couple of concerns. First, it really wouldn't be a great idea to have the Heroku instances across the country (or the world) from the Datomic instances. That'd make the site really slow I would think.
Second, maybe this kind of approach isn't allowed for Solo? > VPC Endpoints are only supported in a Production Topology.
So I'm weighing the costs of exploring a solution to bridge Heroku and Datomic Cloud against the costs of reinventing some Heroku functionality (especially review apps) in AWS with the code integration tools like Code Pipeline. Leaning towards the latter, to be honest, but I expect it'll take some work.
From my limited research, it doesn't seem like a good idea to whitelist ips, since the heroku ips are dynamic, and the range is too big. The other option is to fork out for one of the static ip addons, but they seem pricey
Yeah, that's a good point about Heroku IPs being dynamic. This further inclines me to try to learn the Code* tools in AWS.
Yeah I'm starting to feel like the only sane approach is probably just to move over to AWS if we want to use Datomic
I feel the same way. It's a little discouraging considering how easy it is to deploy a Clojure app to Heroku, plus all the nice features Heroku provides, but oh well.
I wonder if setting up the VPC endpoint, and connecting via Heroku on the same region would work, seems a bit fragile though
hey, I know this must be a FAQ, but... okay, I'm just getting my feet wet with Datomic via datascript in the browser, and even though I can rip out and reschema my entire system with one version update, I am terrified by the notion of "correct" Data modeling with Datomic.. I don't know what should be namespaced, how to namespace them. There's so much flexibility that I have a serious "blank canvas" problem. Can anyone point me towards where to start in modeling your domain from a blank canvas with Datomic?
@U250T6MFA table/column or class/method is a good starting point, you'll figure the paterns soon enough, and Datomic gives you enough flexibility to recover from your mistakes
@U250T6MFA +1 for table/column. You will be able to figure this out as you go. Just get started.
In addition to table/column, I like to think about the schema as an attribute catalogue that I can use to create entities. So don´t worry about having ALL possible attributes upfront. Just add the minimal attributes your domain needs and follow the best practices https://docs.datomic.com/cloud/best.html#datomic-schema
what is the proper way to read the body on an api-gateway ionized fn? I’m getting nil in the body on a POST, but the json is appearing on a
the ion-example doesn’t ionize any fns that actually read the POST body from what I can tell
@okocim I am using Ions in a production environment and the body is available under the
:body key in my Ring handler that I pass to