Skip to content

A multi-client server for a simple shared ledger written in OCaml

License

Notifications You must be signed in to change notification settings

Isaac-DeFrain/multi-client-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

multi-client-server

Simple multi-client server which maintains a shared ledger of (int, string) pairs

Run the server

Clone the repo and change to the repo directory

$ git clone https://github.com/Isaac-DeFrain/multi-client-server.git
$ cd multi-client-server

Install dependencies and build the project

$ opam install --deps-only .
$ dune build

Open a terminal from this directory and start the server

$ dune exec -- ./_build/default/bin/mcs.exe

Open a fresh terminal (or several), connect to the server, and send some messages

$ telnet localhost 9000

Valid messages

Message What it does
# returns the server's current number of connections
id returns the client's internal id number
get <key> returns the ledger value associated with the key (if it exists)
set <key> <value> sets the value for the key in the ledger
del <key> deletes the key from the ledger

About

A multi-client server for a simple shared ledger written in OCaml

Topics

Resources

License

Stars

Watchers

Forks