Fork me on GitHub
#datomic
<
2018-11-09
>
dl11:11:52

hey how are you?

dl11:11:04

I have setup datomic cloud yesterday and trying to push the first ion

dl11:11:31

I have downloaded the ion-starter repo, but even though I added the changed files to .gitignore I still receive this error:

dl11:11:48

"You must either specify a uname or deploy from clean git commit"

dl11:11:55

when pushing to git

dl11:11:43

as a workaround I just added :uname NAME to the argument and it seems to work

dl11:11:27

but thats weird, the git commit command states that no changes added to commit and still I need to specify a uname

timgilbert15:11:47

Say, running a restore from backup in on-prem datomic, I see a lot of messages resembling Copied 4848 segments, skipped 39282 segments. as the process runs. Is there a way to find out what the total number of segments is?

grzm16:11:27

On the releases page, (https://docs.datomic.com/cloud/releases.html), the top item is dated 2018-08-21, with version "0.8.66". Newest version number, but the date is older than the next item (2018-10-11). Typo? Or am I missing something?

lwhorton17:11:43

i have a pretty basic data modeling question that i think would clear up some confusion i have about entities vs attributes: a user entity has an id, so we define the schema

{:db/ident :user/id
    :db/valueType :db.type/long
    :db/cardinality :db.cardinality/one
    :db/unique :db.unique/identity}
but down the road we find out that there’s not really “an id”, but rather two disparate ids from separate systems. system A has a uuid for each user, system B has a different uuid for each user. if we want to model our “unified user” in our own system, do we define a schema like:
{:db/ident :system-a/id
    :db/valueType :db.type/long
    :db/cardinality :db.cardinality/one
    :db/unique :db.unique/identity}

{:db/ident :system-b/id
    :db/valueType :db.type/long
    :db/cardinality :db.cardinality/one
    :db/unique :db.unique/identity}
at which point our complete user entity becomes
{:system-a/id 123 :system-b/id 456}

lwhorton17:11:52

OR do we model the entity where the user schema itself reflects the multiple ids:

[
 {:db/ident :user/system-a-id
  :db/valueType :db.type/long
  :db/cardinality :db.cardinality/one
  :db/unique :db.unique/identity}
 {:db/ident :user/system-b-id
  :db/valueType :db.type/long
  :db/cardinality :db.cardinality/one
  :db/unique :db.unique/identity}
 ]

ro617:11:34

@lwhorton I guess if it's a UUID you could get away with the first one, but the second makes more sense to me. You're trying to say it's a unique id among users, not necessarily everything that could ever come from system-b

lwhorton17:11:43

ah, okay. my next question was exactly that — do i have to elucidate further and say something like :system-a/user-id, :system-b/user-id

lwhorton17:11:35

which would open the door for a “system-a user schema”

{:db/ident :system-a.user/id
    :db/valueType :db.type/long
    :db/cardinality :db.cardinality/one
    :db/unique :db.unique/identity}
which seems like a whole can of worms and is not a good way to approach it.

ro617:11:58

yeah, as far as functional differences between :, :id.system-a/user, :system-a.user/id, etc..., I'm not sure. I'm not sure if there's implementation details in Datomic that treat the different segments of a namespace differently. I think generally :keywords are just interned strings.

ro617:11:18

meaning that equality checks amount to reference equality, so more efficient

dpsutton17:11:57

is there a good guide on how to remove everything after following a datomic cloud tutorial? Went through it last month for a few days and now i've got an $18 bill from last month and I'm on track for $30 this month

ro617:11:22

use the CloudFormation part of AWS I think

ro617:11:17

that should show you your compute and storage stacks, as well as the "parent" stack that subsumes those two. I think there's a way to clean up all the resources by removing those. After it's done, you could go double check that there aren't any EC2 instances left running

dpsutton17:11:41

thanks. that seems to be the entry point to begin this. much appreciated

kenny17:11:32

@dpsutton Datomic Cloud leaves around a bunch of other resources as well. Those extra resources shouldn't cost much, but no reason to keep them around after the tutorial. I wrote this clj script https://gist.github.com/kennyjwilli/55007211070a260044c8e6abcb54dd5b that follows the steps in the Deleting a System docs https://docs.datomic.com/cloud/operation/deleting.html.

ro617:11:09

@kenny Those aren't handled by the CloudFormation delete?

benoit22:11:57

@lwhorton I tend to prefer :system-a/id (or :system-a.user/id if system A has other types of entities). Particularly if you will have other types of entities that can have an id in system A. Let's say you have groups of users. And those groups have ids in system A. Then you will have to define 2 attributes: :user/system-a-id and :group/system-a-id. This will make your code unnecessarily complex to handle both cases when manipulating this identifier. With :system-a/id, you can just reuse the same attribute for users and groups.

👍 4
lwhorton23:11:08

i feel like i’m also missing something fundamental about getting values out of the db. surely query results can be converted back into a collection of entity maps where the keys are the schema idents?

lwhorton23:11:39

is this where the pull api comes in? define the shape of the query result in a datalog query?

ro623:11:23

yes. I regularly use a query to get a sequence of entities, then map over that with d/pull to get the data I want

bananadance 4
ro623:11:08

I'm no old vet though, so I'd wait for a second opinion.

dselph23:11:45

Is the Datomic forum dead? Getting search results linking to http://forum.datomic.com pages, but virtually a blank page when followed. For example: https://forum.datomic.com/t/running-with-vpc-peering/441

marshall14:11:02

i’m not having any issue reaching that URL do you potentially have ghostery or something like that blocking ?

marshall14:11:20

oh, sorry, just saw this was already discussed in the room 🙂

ro623:11:22

works for me. Do you have browser extensions that block things?

dselph23:11:11

Hmm, maybe? I use other forums without any problem, but let me try a different browser.

dselph23:11:29

Looks like something not available through the DNS provider - weird. VPN allowed it to load. Thanks @robert.mather.rmm!