I found a question and that is : to implement a key-value server
- User should be able to connect to server and be able to run command SET a = b.
- On running command GET a, it should print b.
First of all, I didn't really understand what the开发者_JS百科 question is all about.
In its simplest form, a Key-Value server is nothing more but a server that holds keys
in a dictionary structure and associates a value
with said key.
If it helps, you can think of a key as a variable name in a programming language or as an environment variable in the bash shell.
A client to the Key-Value server would either tell the server what value the key has, or request the current value of the key from the server.
As Ramon mentioned in his comment, memcached.org is such example of a Key-Value server.
Of course, the server can be much more complex that what I described above. Keys could be more than just values (for instance, objects) and the server/client could have a lot more functionality than the basic set/get.
Note that the term Key-Value server
is very broad and doesn't mean anything concrete by itself. NoSQL systems make use of key-value stores, for example, so you could technically call any NoSQL database system a Key-Value server
.
精彩评论