September 2013
Intermediate to advanced
548 pages
12h 25m
English
A name server is a program that, given a name, returns a value associated with that name. We can also change the value associated with a particular name.
Our first name server is extremely simple. It is not fault tolerant, so all the data it stores will be lost if it crashes. The point of this exercise is not to make a fault-tolerant name server but to get started with distributed programming techniques.
Our name server kvs is a simple Key
→ Value, server. It has the following
interface:
-spec kvs:start() -> trueStart the server; this creates a server with
the registered name kvs.
-spec kvs:store(Key, Value) -> trueAssociate Key with Value.
-spec kvs:lookup(Key) -> {ok, Value} | undefined ...Read now
Unlock full access