Fork me on GitHub
#datomic
<
2020-02-24
>
mv04:02:23

Is there a good tutorial or guide I can read for advice on which libraries to choose to make a datomic backed web api?

dmarjenburgh07:02:15

After ionizing your request-handler, it’s not really different from building a web api with ring/pedestal.

dmarjenburgh07:02:01

This was assuming datomic-cloud…

🙏 4
mkvlr08:02:35

I recently came across https://blog.acolyer.org/2019/06/17/towards-multiverse-databases/ and found it quite interesting. The central idea behind multiverse databases is to push the data access and privacy rules into the database itself. The database takes on responsibility for authorization and transformation, and the application retains responsibility only for authentication and correct delegation of the authenticated principal on a database call. Such a design rules out an entire class of application errors, protecting private data from accidentally leaking. Is anybody aware of a similar thing being tried for datomic?

mkvlr08:02:15

@U4YGF4NGM and @U09R86PA4: I think it should also solve the security issues when trying to cache parts of datomic locally?

coby20:02:54

Wow, fascinating! I'd guess that probably no one's working on this (would love to be wrong!), but I imagine given the degree of immutability and lazy eval built into Datomic already, it'd have a leg up on any other database software trying to add this in. I could imagine the API being as simple as:

(def db (d/with-context {:user-id uid}))

Arek Flinik13:02:36

Has anybody tried running Datomic on top of MSSQL? (please don’t blame me, talking with a potential enterprise customer that insists on doing that because “based on their experiences PostgreSQL is a terrible choice” :face_with_rolling_eyes:)

favila16:02:59

I’ve run it on top of mysql. You’ll be fine

favila16:02:19

datomic uses sql as a key-value store for binary blobs

favila16:02:26

optimize your tables and schema for that workload

marshall14:02:53

@aflinik Many of our customers run on SQL Server

Arek Flinik20:02:23

Thanks! Would be able to share some insights about potential pitfalls, differences in performance characteristics, or any other learnings?

marshall15:02:34

Generally speaking most SQL stores are fairly reliable We have many customers using postgres, SQL Server, and Oracle Like most Datomic storage options, the most common issues are usually general misconfiguration of storage itself. If you’re comfortable running the storage and/or have a good DBA who knows it well, they all perform fairly similarly

arohner17:02:58

Are in-memory databases still supported for testing purposes? I’m having trouble finding docs on how to set that up

favila18:02:09

If you’re talking about on-prem, yes definitely. If you’re talking about cloud AFAIK it has never supported in-memory? (why say “still supported”?)

arohner18:02:38

In production I plan to use datomic client against an on-prem transactor. What is the best way to write tests against that?

arohner18:02:03

To get the in-memory database it looks like the app needs to include the full datomic-pro dependency

favila19:02:16

Cognitect’s official recommendation is “use random database names and an aws connection for testing”

favila19:02:50

This thing also exists, but requires datomic-pro as you noticed: https://github.com/ComputeSoftware/datomic-client-memdb