Fork me on GitHub
#re-frame
<
2017-02-05
>
lsenta03:02:04

Does datascript sync with remote databases?

lsenta03:02:48

I'm experimenting with offline-first app with cljs+reframe+pouchdb/couchdb, I'm all hears if there are other dbs

qqq03:02:13

I was looking for datascript (cljs) <-> datastore (gae), but the closest I've found is datascript <-> datomic

qqq03:02:37

@lsenta: how does pouchdb's merging work? I was looking into it, but did not figure that partout

lsenta03:02:14

@qqq I only tried basic replication, I can't speak about merging

qqq03:02:39

every time I look into client/server sync, I end up reading about CRDTs

qqq03:02:44

which I unfortunately still do not understand

lsenta03:02:36

@qqq looks overpowered for my use case, I could live with a simple append-only log

lsenta03:02:38

What are you trying to do? Have you tried pouchdb before looking into (state of the art)+1 techs? 🙂

qqq04:02:26

@lsenta: I saw Elixir/Phoenix Presence, was trying to understand it, run into "Delta-State based CRDTs" -- and now, everything I read leads to CRDTs.

lsenta06:02:35

@qqq after a quick look, it looks like CRDT is all about commutative operations: all your replicas live their life and sometime they share data (whether deltas or the full database). Eventually, and because their can't be any conflicts, all your data is replicated.

lsenta06:02:18

I'm probably missing a lots of refinements

qqq06:02:39

yeah, it's about ops that are associaciatve, commuitative, and indempotent

qqq06:02:47

there's two general approaches, "state based" and "ops based"

qqq06:02:59

^^----- that is the entireity of my knwoeldge of CRDTs

qqq06:02:16

then they go into heavy math using unions and sigmas, and I"m thikning "just give me a damn concrete example" 🙂

qqq06:02:58

it also turns out that not all ops on all datastructures can be mapped this way, so the field becomes a bag of tricks of "what ops on what data structures" can be mapped this way

lsenta06:02:04

Yea, that's why I miss to see the improvement, let me know if you find more details or any practical example

qqq06:02:56

I'm clearly not qualified to defend CRDT, but I think the goal is: instead of everyone rolling their own eventual-consistent techniques let's just formalize things (like how we have big-Oh notation for vectors, lists, heaps, etc ...) let's ust formalize: here's a list of data structures here's a list of ops you can do CRDTs on qed

qqq06:02:09

^^-- this is all just my intuition, not any official CRDT stance from any ezpert

lsenta06:02:31

@qqq that makes sense, thanks for the insight! 🙂

Pablo Fernandez12:02:50

Odd... using a method as a reagent component used to work well and now it isn't. I'm not sure why.

akiroz14:02:13

Just revisited the re-frame documentation and WOW it's simply amazing! Easily one of the best docs I've ever seen, it's almost like a book now! 👏

brthrjon18:02:13

i'm probably missing something... does anybody else think that it would be a good idea to have "bootstrap" as an option to the re-framed template?

sandbags20:02:34

@pupeno as in a multi-method? It's still working here... in what way is it not working for you? What version of the various cljs/reagent/re-frame?

Pablo Fernandez23:02:09

@sandbags it doesn't properly re-load the component when it changes. ClojureScript 1.9.299, Reagent 0.6.0 and Re-Frame 0.9.1.