Fork me on GitHub
#datomic
<
2018-08-16
>
Oliver George11:08:59

Datomic Ion Parameters look good. All makes sense and I'm glad to see it added. +1

💯 16
Oliver George11:08:10

One thing which got my attention was the example. It shows using it to discover the db-name. That struck me as unnecessary since there can only be one ion app per datomic ion stack. Can someone give me an example of why it would be useful to have a configurable db name?

stuarthalloway11:08:02

hi @U055DUUFS -- separate db names for dev, staging, CI, and production

Oliver George11:08:38

Hi Stuart. I think dev, staging and production can't share a cloud deployment. Can you elaborate with a simple use case.

stuarthalloway11:08:08

create two systems: one for dev and one production, both sharing the same code deploy application

stuarthalloway11:08:36

push/deploy against the dev system until you are happy, then deploy (no new push!) to the production system

Oliver George11:08:27

I guess my point is that in your example it's not useful for the two systems to have different db-names. There's never a conflict.

stuarthalloway11:08:40

this becomes much more interesting with query groups

stuarthalloway11:08:01

when there are N deploy targets in the same system

stuarthalloway11:08:18

(guess what I am working on...)

8
Joe Lane18:08:20

@U055DUUFS I use multiple db-names in a multi-tenant system and its a dream.

Joe Lane18:08:05

That is going to become very exciting in our architecture and is an example where thats useful.

Oliver George23:08:49

@U0CJ19XAM can see value in separate dbs in a multi-tenant system. Nice to know that's proven useful.

lambdam17:08:03

Hello, I'm trying to connect the Datomic console to an in memory database (local dev). Is it feasible?

manutter5118:08:15

There’s no such thing as read-only Datomic, right? Like if App A wants to look at App B’s data without ever modifying it (e.g. a reporting front end), I can’t just give App A read-only access to App B’s data.

val_waeselynck18:08:35

I think you could do this at the storage level

favila18:08:57

No, in the end, everyone connects to a transactor, and the transactor needs write-access to the storage

favila18:08:23

the peers can have read-only access to storage; but since they can send txs to the transactor that doesn't matter

favila18:08:12

datomic cloud may be different; I am only familiar with on-prem

manutter5119:08:50

Ok, that’s what I was thinking, just wanted to confirm, thanks.

johnj18:08:12

not that I know of, your app must enforce this

lambdam18:08:58

Thanks @manutter51. That is sad since I have a very smooth dev workflow with integrant. I can reset the whole database with fresh dev data after a simple cider-refresh. Also I do everything in the same JVM instance. I wonder if there is a similar dev workflow that makes it possible to also easily have the datomic console.

marshall18:08:18

you’d need to use dev storage

marshall18:08:55

but you gain console and disk-based persistance

lambdam18:08:55

Thanks @marshall. I saw that do but it doesn't seem easy to reset the database from the REPL. I made a mistake in my last post. I don't use cider-refresh but a custom reload-with-dev-data from the dev namespace with integrant.

(defn reload-with-dev-data []
  (halt)
  (go)
  (dev-data/load-dev-data! @db-conn-ref))
(halt) calls (d/delete-database db-uri) and (go) calls (d/create-database db-uri). It's instantaneous. Do you think that I can have something similar with the dev storage without restarting the JVM process?

marshall18:08:30

sure; call the same functions

timgilbert18:08:25

@dam for dev purposes you might also want to check out datomock: https://github.com/vvvvalvalval/datomock

lambdam18:08:54

Thanks @timgilbert, I'll check that. Also I see Valentin often during Paris Clojure Meetups. I'll discuss about that with him directly next time (ping @val_waeselynck (Salut Val !)).

simple_smile 4
eoliphant20:08:59

hi. have a datomic cloud question for any of the cognitect folks who might be around. We have a pretty complex VPC setup, and one of our requirements is that traffic from any of our ‘internal’ VPCs (dev,test,etc and associated datomics) has to traverse a transit VPC to get out to the world. It looks like the IGW’s that get created are used for license checking or something? We tried just disabling one and things just broke 🙂 . In any case, we wanted to get some input from you guys on how we might best accomodate this..

marshall20:08:20

@eoliphant Datomic uses the internet gateway to access some AWS services

marshall20:08:48

I don’t recall which ones off the top of my head, but any AWS service for which there are not VPC endpoints available or which we haven’t yet been able to transition to using VPC endpoints

eoliphant20:08:53

let me let my guys know. we’ll try to figure it out but if you guys could scare up a list that’d be great

marshall20:08:25

everything but ddb and s3

marshall20:08:43

i suspect Cloudwatch, possibly codedeploy

marshall20:08:17

probably so

ghadi20:08:57

EFS probably is internal traffic only... administrative endpoints notwithstanding

marshall20:08:32

yeah, i think EFS is strictly scoped to VPC

marshall20:08:41

lambda for ions uses SNS

marshall20:08:03

lambda service itself may also be a public endpoint

eoliphant20:08:40

yeah i was wondering about the lambdas. and yeah I think my dev noticed the issue during a deploy. SO codedeploy is a likely place to look

marshall20:08:06

deploy will definitely require lambda and step functions

shaunxcode20:08:42

with datomic cloud supporting :limit and :offset is there planned support for :sort-by perhaps?

shaunxcode20:08:07

nevermind apparently the sort aggregate is a thing (but I can not see it in the docs?)

steveb8n10:08:36

I'd like to know more about this "sort aggregate". If you find something, can you share it?

eoliphant12:08:26

Afaik, there's no in built sort aggregate. The custom aggregate example finds the mode, which of course requires sorting. At this point you'll still have to roll your own. I hope they add something. It's pretty easy to write your own, but it gets hinky if you want to use datomic's :limit and :offset. You usually want the sort applied first, then limit and offset that result. But using the native stuff its effectively reversed. In those situations i just use my own sort, limit, offset logic