Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mochi-boot-camp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sds
mochi-boot-camp
Commits
e56a966a
Commit
e56a966a
authored
Sep 23, 2019
by
Rob Latham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revise sdskv writeup
parent
9b689704
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
6 deletions
+30
-6
sessions/s4-components/README.md
sessions/s4-components/README.md
+30
-6
No files found.
sessions/s4-components/README.md
View file @
e56a966a
...
@@ -120,19 +120,43 @@ inconsistency. That's entirely RobL's fault.
...
@@ -120,19 +120,43 @@ inconsistency. That's entirely RobL's fault.
spack install sdskeyval
spack install sdskeyval
```
```
We don't need to write a simple sds-keyval server because the package already provides one for us:
In the
`sdskv`
directory you will find
`server.c`
and
`client.c`
, demonstrating
a simple client and server that does a basic put and get of a key/val pair
```
```
sdskv-server-daemon na+sm testdb:ldb -f sdskv.addr
cd sdskv
make
```
```
That command asks the SDS Keyval server to listen over the "shared memory"
In one shell, launch the server (or put it in the background if you want one shell)
interconnect, operate on a database called "testdb" using the "leveldb"
backend, and to write the server address out to a file 'sdskv.addr' that we can
For example:
then use for our client.
```
./server
Server running at address na+sm://12829/0
```
Then the client can connect to that server, run its simple exercise, and shut down the server:
```
./client na+sm://12829/0
key 10 had value 99
```
### Exercise
### Exercise
In this exercse instead of putting an integer key and an integer value, I
want you to store a bunch of strings. Turns out a good source of string is in
`/usr/share/dict/words`
. Can you prove you stored what you thought you stored?
We provided a simple sds-keyval server in the prior example, but the package
already provides a standalone, full sds-keyval server for us:
```
sdskv-server-daemon na+sm testdb:ldb -f sdskv.addr
```
That command asks the SDS Keyval server to listen over the "shared memory"
interconnect, operate on a database called "testdb" using the "leveldb"
backend, and to write the server address out to a file 'sdskv.addr' that we can
then use for our client.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment