vrdt's People
vrdt's Issues
VRDT typeclass proofs
Implement the typeclass laws (lawCommutativity
, lawNonCausal
) for all of the VRDTs.
- MultiSet
- CausalTree
- TwoPMap
- Max
- Min
- LWW
Ps. I added this Makefile to run LH on all the modules. It uses CPP flags to ignore irrelevant code (like serialization).
Prove strong eventual consistency
Prove strong eventual consistency. Depends on Yiyun's LH branch.
Implement todo list example
Create a new todo list example. You'll probably want to define a Todo
datatype with LWW fields for the task, whether it's completed, a due date, etc. You can use deriveVRDT
to create the instance/handle the syncing. For the overall state, I'd probably use a TwoPMap UniqueId Todo
. It may make sense to use splitV
to display the selected todo's details on a separate widget.
Potentially helpful references include the vty todo list example (switch to this widget) and the existing event scheduler example.
CI/CD
Since this repo is private, our options for CI/CD might be more limited.
I have used Travis CI for personal projects in the past. The Travis CI faq includes Does Travis CI for private repositories include a trial period?, but I'm unable to see this repo on my Travis CI account. I'll research a bit more and report back here.
There's also Circle CI and Jenkins.io. I'll look into them if I can't figure out the issue with Travis.
Integrate CausalTree with Reflex
Reconsider Kyowon.Client.Reflex implementation
Kyowon.Client.Reflex
currently forkIO
s internally and uses channels. This is probably not necessary. The implementation of Kyowon.Client
does not take-over the thread where it is started, instead it uses a callback interface. Kyowon.Client.Client
constructors take a Recv (a -> IO ())
which it will call when messages are received from the server, and they return a send :: a -> IO()
which applications can use to send messages to the server. The application continues to control the starting thread.
Merge ClientId's so that CausalTree uses the unified type
Cannot build 'vrdt' package on master
> cabal v2-build vrdt/
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
- vrdt-0.1.0.0 (lib) (first run)
Preprocessing library for vrdt-0.1.0.0..
cabal: can't find source for ProofCombinators in src,
/home/mote/code-SORT/hs/vrdt/dist-newstyle/build/x86_64-linux/ghc-8.6.5/vrdt-0.1.0.0/build/autogen,
/home/mote/code-SORT/hs/vrdt/dist-newstyle/build/x86_64-linux/ghc-8.6.5/vrdt-0.1.0.0/build/global-autogen
If I remove the ProofCombinators
module from vrdt.cabal
the cabal build on master succeeds.
Switch proofs to use typeclasses
Integrate with Yiyun's branch of LH and move the proofs into typeclass instances.
Implement denotational semantics
Define and implement the denotational semantics for the VRDTs.
- MultiSet
- TwoPMap
- CausalTree
System exhausts resources when a client joins with many existing operations
When I run the collaborate
example and type in many characters (hundreds) and then start a new client, the system crashes when the server is streaming the existing operations to the client.
Here's an excerpt from the server's output:
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000024s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000072s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000061s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000053s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000054s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000023s
Network.Socket.sendBuf: protocol error (Protocol wrong type for socket)
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000021s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000018s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.00002s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000022s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000067s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000047s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000036s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000032s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000023s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000025s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000022s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000041s
Network.Socket.sendBuf: protocol error (Protocol wrong type for socket)
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000023s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000021s
POST /v0/listen/TODO
Accept: application/octet-stream
Status: 200 OK 0.000024s
Eventually it stops with resource exhausted (Too many open files)
.
Here are some logs from the client:
Received from wire: "{\"parent\":{\"t\":\"1858-11-17T00:00:00Z\",\"c\":\"00000000-0000-0000-0000-000000000000\"},\"atom\":{\"id\":{\"t\":\"2020-04-04T07:39:51.550762Z\",\"c\":\"c4485e88-5345-4155-a3cd-6a327100ff90\"},\"letter\":{\"c\":\"letter\",\"letter\":\"k\"}}}"
Received from wire: "{\"parent\":{\"t\":\"1858-11-17T00:00:00Z\",\"c\":\"00000000-0000-0000-0000-000000000000\"},\"atom\":{\"id\":{\"t\":\"2020-04-04T07:39:51.517037Z\",\"c\":\"c4485e88-5345-4155-a3cd-6a327100ff90\"},\"letter\":{\"c\":\"letter\",\"letter\":\"k\"}}}"
Applying
Applying
Received from wire: "{\"parent\":{\"t\":\"1858-11-17T00:00:00Z\",\"c\":\"00000000-0000-0000-0000-000000000000\"},\"atom\":{\"id\":{\"t\":\"2020-04-04T07:39:51.482474Z\",\"c\":\"c4485e88-5345-4155-a3cd-6a327100ff90\"},\"letter\":{\"c\":\"letter\",\"letter\":\"k\"}}}"
Applying
[2020-04-04 07:40:01.708101 UTC, WARNING] Received from stream: too few bytes
From: demandInput
[2020-04-04 07:40:01.708497 UTC, DEBUG] Listener connecting
[2020-04-04 07:40:01.709854 UTC, WARNING] connectListen,catches: HttpException with InternalException
[2020-04-04 07:40:01.709924 UTC, DEBUG] Demerits:1, BackoffSec:2
[2020-04-04 07:40:03.711264 UTC, DEBUG] Listener connecting
This doesn't happen if the second client is running and listening as the operations are happening on the first client.
Do you know what might be happening @plredmond?
Implement a collaborative text editor example
LH says safe when it isn't?
In commit 81a148a
, liquid MultiSet.hs
returns safe even though the refinement for lawCommutativity
doesn't type check. Any idea why this might be @nikivazou?
$ liquid --version
LiquidHaskell Version 0.8.6.0, Git revision 2d3c4009b80a714247648c2234cc34910b855643 (dirty) [develop@2d3c4009b80a714247648c2234cc34910b855643 (Mon Feb 24 13:26:16 2020 +0100)]
Route Kyowon.Client.Client.{client,store} fields through kyowon-reflex
Applications need access to Kyowon.Client.Client.{client,store}
. If applications don't choose their own on startup, then those values are set internally. Therefore, they need to be routed through Kyowon.Client.Reflex
somehow. A raw value would be sufficient, since these don't change during a session.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.