Fork me on GitHub
#datomic
<
2017-07-26
>
isaac11:07:16

I want split my database to multiple(sharding), What the best practice to alter my type of :db.type/ref attributes to type :db.type/long? According the [doc](http://docs.datomic.com/schema.html#Schema-Alteration), I must install a new attributes. eg. I have User & Account entity, now, I put the User and Account to difference db, the attribute :user/accounts can not still be type of :db.type/ref

mgrbyte15:07:37

Has anyone experienced difficulty getting a transactor running on AWS w/dyanmo db with version 0.9.5561.50 ?

erichmond17:07:45

@mgrbyte We had no issues with our transactor, we had issues with our peer, but it was a library conflict issue

erichmond17:07:49

what error are you seeing?

devth19:07:36

can a transaction function return txs as list-of-maps in addition to list-of-lists?

favila19:07:30

Transaction functions have macro-like evaluation

favila19:07:57

Transactor will keep expanding results until it reaches a fixed point

uwo19:07:41

did I mishear, or did someone say you should index all attributes by default?

favila20:07:36

The only cost is space and indexing time (when the transactor compacts the index), and you can always remove them later

favila20:07:41

so, that seems reasonable

hmaurer20:07:51

@favila you can also add an index later on an attribute, right?

timgilbert20:07:36

Say, is there anything like a $DATOMIC/bin/transactor status command? Trying to script some dev tools around the dev transactor and can't see an obvious way to check whether it's running or not

timgilbert20:07:11

I mean, there's always ps | grep datomic but I'm hoping for something slightly less janky

timgilbert20:07:45

I do see a pidFile system property, but I can't seem to find the pid file in the dev transactor

favila20:07:33

@timgilbert why not just ask your process manager?

favila20:07:47

e.g for systemd, systemctl status datomic.service

favila20:07:10

or even is-active

favila20:07:28

(which gives a useful 0 exit code)

timgilbert20:07:29

I would do that on my actual transactor server, but locally I'm just running a script to start it (os/x)

timgilbert20:07:22

Maybe I just need to add a pidfile argument in the config for local, though then I'll need to get the engineers to agree on a path

favila20:07:02

I don't think the pid is removed on death

favila20:07:31

although I guess a wrapper script could do it

timgilbert20:07:38

Hmm, was afraid of that. I suppose for catastrophic failure it couldn't be anyways

timgilbert20:07:00

Well, I'll mess around with it some

favila20:07:19

you could make a launchd agent too

favila20:07:27

although I don't know the details

timgilbert20:07:45

I suppose so, but I'd need to get over my burning hatred of launchd first

favila21:07:00

that's for a daemon (system-wide) not an agent (user-specific)

favila21:07:08

but probably not very different

timgilbert21:07:37

Yeah, I can enthusiastically state that I won't be editing any XML to get this little script working. 😉

timgilbert21:07:45

But I do appreciate the suggestion

favila21:07:21

you can use the plist editor

timgilbert21:07:04

I think I would probably attempt to get the dev transactor running in docker before going down that path

timgilbert21:07:50

I am enjoying my hatred of launchd too much to let go of it, unfortunately

favila21:07:53

an agreed-upon pid with a wrapper script that deleted the pid would probably work too

favila21:07:20

it's just nice to have job control and not have to keep a terminal open somewhere

timgilbert21:07:14

That's true. I wind up doing a lot of my day-to-day work in-memory and then go from there to ddb, typically. But since I can't restore from ddb to in-memory, I'm starting to mess with the dev transactor more

favila21:07:44

It's old (from before mem db had logs)

favila21:07:03

nowdays I think you could just replay the log

timgilbert21:07:32

Oh, interesting. I will definitely check it out

gonewest81822:07:31

Looks like 0.9.5561.50 added a feature “health check endpoints for transactors and peer servers.” Details: http://docs.datomic.com/transactor.html#sec-1-1