Fork me on GitHub
#datomic
<
2017-07-11
>
val_waeselynck07:07:15

@wei I think this depends more on the external communication architecture of the surrounding system than on the fact that it uses Datomic. We have an RPC-style architecture, in which each endpoint has its Plumatic schema - I wish I could use spec for that, but I need coercion which is an unfortunate conseaquence of using JSON a a format. A GraphQL-style may have a spec per write handler - and maybe some of it is either derived from the database schema or colocated with the schema definition.

danielstockton09:07:41

@val_waeselynck Can you not use custom conformers for coercion?

val_waeselynck13:07:57

Interesting, didn't know that was possible!

hmaurer09:07:30

@val_waeselynck would you use clojure.spec instead of Plumatic if you were starting your app today?

val_waeselynck13:07:40

I'd need to study spec more before I can answer that :)

hmaurer14:07:32

@val_waeselynck let me turn the question differently then: are you happy with Plumatic?

nooga11:07:34

@gws any special configuration needed? I’m trying to cram free trasactor onto a raspberry pi

gordon14:07:04

Yeah, I set memory-index-max to 1/4 the JVM heap size and object-cache-max to 1/2 the JVM heap size

gordon14:07:12

nooga: I've run one with a 256MB heap, and set a hard memory limit of 384MB for the entire transactor, not sure if you can go much lower but it may be possible

nooga14:07:21

And how was it? Did it grind to a halt eventually? I’m running a small sensor hub, tx-ing 20-200 datoms every minute and started thinking about moving this to a spare raspberry pi I have lying around

gordon15:07:17

It didn't grind to a halt, but I didn't even put that much load through it - I'd be interested to see your findings!

nooga20:07:07

thanks, I’ll report back

gphilipp12:07:59

@val_waeselynck Hi Val, do you known if there’s a tool to visualize a Datomic schema ?

hmaurer12:07:12

@gphilipp out of curiosity, what sort of visualisation would you be looking for?

hmaurer12:07:26

the Datomic console gives you a tree for the schema

gphilipp12:07:16

It would probably rely on parsing key names because you can't enforce refs types.

val_waeselynck13:07:32

@gphilipp I don't use one (controversially, I derive schema from code) but I think @robert-stuttaford has some tools for that

robert-stuttaford13:07:39

@gphilipp i built https://github.com/Cognician/datomic-doc to help with exploring and documenting schema. no pretty diagrams, i’m afraid!

gphilipp13:07:32

@robert-stuttaford This looks nice, I’ll take a look

hmaurer14:07:42

@gphilipp interesting. Datomic doesn’t have a way to define which attributes belong to which entity (which would be required to auto-generate a diagram like mbrainz), BUT namespace in attribute keywords kind of play that role

hmaurer14:07:18

So if you are strict on always using the same convention for attribute names, namely :entity-name/property-name, then I guess you could auto-generate this diagram

hmaurer14:07:24

Sounds like a good opportunity for a PR to Cognician/datomic-doc if @robert-stuttaford is keen 😛

hmaurer14:07:58

I am not sure whether :entity-name/property-name for attributes is a convention with Datomic though

hmaurer14:07:06

It just seems to be from what I’ve read/seen thusfar

favila14:07:51

@hmaurer it's a loose convention. But it will never be a solid convention because the openness of entities is desirable

hmaurer14:07:28

@favila That’s what I thought. So long as it is somewhat widespread I guess a visualisation based on that convention could make sense

favila14:07:22

Better would be to think of the namespaces as corresponding to problem domain (i.e. attributes that are meant to be together) or even revision (e.g. :x.y.v2)

favila14:07:46

it just happens that most of the time these correspond to entity instances also

val_waeselynck14:07:14

@hmaurer you will probably want to share some attributes across several entity types

favila14:07:36

unless there's a higher-level schema encoded somewhere I don't think those visualizations can be automatic

favila14:07:58

another wrinkle is that you can have multiple, independent schemas overlaying each other

val_waeselynck14:07:28

@hmaurer note that attributes are entities themselves, and you can use Datomic to annotate them with type information

gphilipp14:07:42

To give some context, I’m trying to grasp Simulant schema for a POC at work https://github.com/Datomic/simulant/blob/master/resources/simulant/schema.edn. I just found out that @stuarthalloway had made a diagram out of it https://github.com/Datomic/simulant/wiki/Schema-diagram !

pbostrom14:07:45

is [com.datomic/clj-client "0.8.606"] still the latest version for the client library? it was released on 27-Nov-2016, seems a bit old

hmaurer15:07:31

@val_waeselynck do you think it would make sense to then think of namespace in Datomic attributes as denotating “traits”?

val_waeselynck17:07:53

Grouping attributes into traits/mixins definitely makes sense: however, if you're going to build something programmatically on top of it, don't base it on keyword-namespace. You're better off declaring the traits of the attributes explicitly in the database - it won't be that much effort.

hmaurer15:07:31

In the sense that they group attributes relating to a particular “trait” of an entity

hmaurer15:07:49

if that makes any sense

matan16:07:53

Are there special limitations to using datomic from Java?

matan18:07:28

Just wondering, if the Java API exposes "all there is to it"

dobladez18:07:40

Anybody knows if there are plans from Cognitect to offer "Datomic as a Service" ?

hmaurer23:07:13

Hi! Is it possible to configure the path to storage files when running the transactor in “dev” mode?

favila23:07:57

Yes. It's not in transactor.properties?