8000 GitHub - cachapa/crdt_server: Generic REST server based on Conflict-free Replicated Data Types (CRDTs)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cachapa/crdt_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRDT Server

Generic REST + WebSocket server based on Conflict-free Replicated Data Types (CRDTs).

Serves as a demonstration of real-world use of the CRDT package.

This server listens for REST requests and WebSocket connections and maintains independent CRDTs for each route (created lazily). It makes it trivial to test APIs by simply calling a '/users' or '/todo' routes.

Usage

Simply run main.dart:

$ cd crdt_server
$ pub get
$ dart bin/main.dart
Serving at http://localhost:8080

Perform a GET request against any path in the server to get the CRDT in JSON format:

curl http://localhost:8080/todo

Merge an existing CRDT with the server using POST requests:

curl -d '{"x":{"hlc":"2020-02-09T12:04:13.476Z-0000","value":{"Learn CRDTs":false}}}' http://localhost:8080/todo

To do

  • Optional parameters for fetching CRDT subsets (partial merges)

Features and bugs

Please file feature requests and bugs at the issue tracker.

About

Generic REST server based on Conflict-free Replicated Data Types (CRDTs)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0