ff-notes / ron Goto Github PK
View Code? Open in Web Editor NEWHaskell implementation of RON and RON-RDT
License: BSD 3-Clause "New" or "Revised" License
Haskell implementation of RON and RON-RDT
License: BSD 3-Clause "New" or "Revised" License
-- now
note_status_assignIfDiffer newStatus = do
curStatus <- note_status_read
when (curStatus /= newStatus) $
note_status_assign newStatus
-- should be
assignIfDiffer new = do
cur <- read
when (cur /= new) $
assign new
- note_status_assignIfDiffer
+ note_status &~ assignIfDiffer
Example from ff:
(ron_schema_edn [1 0]
(opaque Status)
(opaque NoteStatus)
(struct_lww Tracked
(provider String)
(source String)
(externalId String)
(url String))
(struct_lww Contact
(status Status)
(name RgaString)
#Haskell {field_prefix "contact_"})
(struct_lww Note
(status NoteStatus)
(text RgaString)
(start Day)
(end (Option Day))
(tracked (Option Tracked))
#Haskell {field_prefix "note_"})
)
measure performance
(moved from cblp/crdt#22)
proposed by @gritzko
Problem:
+--> Arne --+
| |
| v
Bjorne Annie
| ^
| |
+-> Bonnie -+
Automatic character-base RGA merge may give words semantically misleading, contradicting human-written versions.
Proposed solution: generate ops using words.
+--> Arne --+
| |
| v
Bjorne ArneBonnie
| ^
| |
+-> Bonnie -+
Unresolved questions:
[mkReplicated|
(struct_lww Node
name RgaString
children (ORSet Node)
)
|]
Clean up documentation first.
Validate consistency of different RON implementations and their conformance to the Spec
Configure:
; built-in, implicit
; (import Atom)
; (import RDT [RGA, ORSet, VersionVector])
; stdlib
(import Time Day)
(... use Day ...)
; user libraries?
$ $STACK exec -- weeder
weeder: /home/travis/build/ff-notes/ron/ron-test/.stack-work/dist/x86_64-linux/Cabal-2.2.0.1: getDirectoryContents:openDirStream: does not exist (No such file or directory)
The command "$STACK exec -- weeder" exited with 1.
Try to generate RGAs from a series of ops.
items = value items of composite types like RGA or OR-Set
Problem: LWW doesn't guarantee correctness in case of concurrent key adding.
Solution: ORSet of pairs (key, UUID-ref to value object)
Useful for RGA
To allow Hackage build docs, https://hackage.haskell.org/package/ron-0.1/reports/
λ> mkName "VeryLongName" >>= getName
Just ("VeryLongNa","")
λ> mkName "ABitLongerName" >>= getName
Nothing
Write own string encoding.
A fresh timestamp may clash with existing.
Add an abstraction level instead of playing around monad transformers.
if it has one
E. g. why Base32 is used and when.
and lift them to the application via OnDocumentChanged
and relax constraint on 'a' from 'ReplicatedAsPayload' to 'Replicated'
use approach from 'isUpperHexDigit'
So far, it's only a stub:
removeBy :: ([Atom] -> Bool) -> StateT (Object (ORSet a)) m ()
removeBy = undefined
and use it when no reducer found
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.