Fork me on GitHub
#datomic
<
2017-04-26
>
jonpither13:04:29

hi all, Anyone used Datomic with Gemfire/Apache-Geode rather than Memcached?

baptiste-from-paris14:04:36

hello friends, I need some help to sell Datomic to my client. What are the best arguments that I can give for selling Datomic to a business profile (and not technical at all) ? Thanks a lot.

jimmy14:04:30

@baptiste-from-paris good question, I would love to hear this from ones have done this before as well 🙂

val_waeselynck15:04:40

@baptiste-from-paris I definitely need to make a blog post for this, as it was a tough sell to the non-technical founder of my startup as well (which later acknowledged it was a tremendously good choice)

val_waeselynck15:04:18

of course it's hard to justify a technical choice with a non-technical vocabulary, but here are some ideas.

val_waeselynck15:04:01

1. high query power (thanks to Datalog and the fact that querying is effectively non-remote) means I can get new features done more quickly.

val_waeselynck15:04:13

2. you never lose data -> means you recover easily from human or programmatic errors. Example: once my Operations director calls me while I'm out buying lunch "Hey Val, I just accidently deleted one of our customers organization along with 100s of user profiles". Me: "OK, don't worry, I'll put it back in 30 mins."

val_waeselynck15:04:04

3. high schema flexibility -> means it's easy to modify features.

baptiste-from-paris15:04:26

@val_waeselynck that’s what my slide looks like lol

baptiste-from-paris15:04:41

great synthesis skill 😉

val_waeselynck15:04:06

4. Very effective testing at a low cost thanks to speculative writes, a feature unique to Datomic with far-reaching consequences -> means I don't have to do quick and dirty, I can just do quick and clean, with huge benefits once your codebase is a few months old.

val_waeselynck15:04:51

5. The hardest technical problems of traditional databases are just gone : Impedance Mismatch, Cache Invalidation, N+1 problem, Concurrency / Distributed systems issues.

val_waeselynck15:04:59

6. Easy modeling thanks to the universal schema -> means you don't spend time anticipating how you'll query your data when you're storing it

val_waeselynck15:04:46

7. Trivial Change Data Capture thanks to the Log, which means Datomic is an excellent data source to integrate to other data systems (BI, derived data, materialized views etc.) -> means Datomic will be an asset, not a liability, when you need to integrate other data engines as your system grows.

val_waeselynck15:04:12

Note that I haven't included the 'time travel' features of Datomic - I think most people who use Datomic to keep several versions of some piece of data end up disappointed

jeff.terrell15:04:35

I just totally shared that list with my team, as part of my efforts to evangelize Datomic. Thanks @val_waeselynck!

val_waeselynck15:04:51

(Personally, my main reason for choosing Clojure for my startup was idiomatic access to Datomic. You can usually work around the deficiencies of your programming language - I'm looking at you, JavaScript!- but not those of your database system)

val_waeselynck15:04:07

OK putting the blog post on my todo list.

val_waeselynck16:04:59

Guess it wasn't here a few months ago, you may have missed it too.

sineer17:04:23

How can I log transactions using log4j? I've enabled <logger name="datomic" level="DEBUG" /> and I see lots of things like peer connections but I don't see any trace for my queries

souenzzo18:04:28

(fn equal? [entity1 entity2] (= (:db/id entity1) (:db/id entity2))) There is an "smarter" way to compare entities?

favila18:04:25

@souenzzo entities have identity semantics

favila18:04:39

comparing them is application-specific

souenzzo18:04:36

I can safely make compare datomic.query.EntityMap with =?

favila18:04:59

I mean datomic entities, not the EntityMap

favila18:04:30

I don't know if EntityMap implements iequiv, or what it does

favila18:04:04

you also have to consider databases, and whether they have filters applied

souenzzo18:04:22

I will check :db/id. Working for now.

Alex Miller (Clojure team)18:04:26

if you are trying to compare whether two entity maps are for the same entity that seems like what you should do

Alex Miller (Clojure team)18:04:16

an entity map is a collection of attributes from a point in time so you can have different entity maps for the same id with different things in them

Alex Miller (Clojure team)18:04:07

and then they also have lazy read semantics so that is also worth consideration

souenzzo18:04:12

I have a single db that instance all entityes. Sometimes I'm "walking" on entites and sometimes I need to compare

Alex Miller (Clojure team)18:04:29

“compare” is too weak a word to describe the operation you mean :)

Alex Miller (Clojure team)18:04:54

it can mean both “have the same contents” or “refer to the same entity”?

souenzzo18:04:14

refer to same entity... Entity has same db/id... (fn equal? [entity1 entity2] (= (:db/id entity1) (:db/id entity2))) < it's working.

souenzzo18:04:52

So, in this semantics (= entity1 entity2) will work or is better get the id's?

favila18:04:12

@souenzzo If that isn't just java object identity, the semantics are so ambiguous and unclear that you are better off being more specific

favila18:04:56

the problem of entity equality is the same as of Java object equality, except worse because of time travel or db filtering

favila18:04:17

so you need to be specific about what constitutes equality for you. If it means "same db/id", that's fine. But the entity maps may have different attributes or values on them, be for a different db t, or be from completely different dbs

favila18:04:07

they may even have the same visible assertions, but be from different dbs; or from the same db with different filters, as-of-t, or since-t

favila18:04:22

and that's not even considering shallow vs deep equality

marshall20:04:44

@sineer Datomic doesn’t provide logging of the queries themselves. What specifically are you wanting to record/identify?

sineer20:04:10

@marshall I'm just beginning to learn how to use datomic and my pedestal app does a simple query and I guess I was expecting to see the query being logged having turned on full logging. I'm surprised that it doesn't provide that debug feature?

marshall21:04:33

@sineer all the work of query occurs on the peer. If you enable peer logging you will see some reports of what the peer is doing

sineer21:04:45

I enable log ALL for datomic and all I see for peer is this: 2017-04-26 17:39:30 INFO datomic.peer - {:event :peer/connect-transactor, :host "0.0.0.0", :alt-host "192.168.99.100", :port 4334, :version "0.9.5561", :pid 80946, :tid 87} followed later by: 2017-04-26 17:39:30 INFO datomic.peer - {:event :peer/cache-connection, :protocol :dev, :db-name "xxx-dev", :system-root "192.168.99.100:4334", :host "192.168.99.100", :port 4334, :db-id "xxx-dev-8c7fdb4b-86ec-46c5-95cb-a9e6932b99fd", :pid 80946, :tid 87}

sineer21:04:23

I suppose it does tell me :tid 87 and I must learn how to access the transaction log if I care to see the query?

marshall22:04:44

@sineer it depends what you mean by “see the query” Queries themselves aren’t logged by Datomic Transactions do result in a line in the transactor logs

sineer23:04:23

Yeah I believe it's the transaction log that I expected to see when I enabled logging on ALL. I haven't figured that one out yet, I'll just read more doc 🙂 Thanks!