Alchemy Readme
This is the source code for Alchemy, a configuration database system.
The main home for Alchemy is currently on GitHub:
The author’s name is James Pharaoh and he can be contacted on james@phsys.co.uk.
The source code is released under the Apache Licence, version 2. The full text of the licence is included in the file
named LICENSE. It is also available online:
Quick start
Alchemy is written in erlang, and a bit of Ruby. You will also need RabbitMQ and CouchDB to get things going.
First of all, get a copy of the Alchemy source code from github:
~$ git clone https://github.com/jamespharaoh/alchemy.git Cloning into alchemy... remote: Counting objects: 13, done. remote: Compressing objects: 100% (10/10), done. remote: Total 13 (delta 1), reused 13 (delta 1) Unpacking objects: 100% (13/13), done. ~$ cd alchemy
You also need mochiweb:
~alchemy$ git clone https://github.com/mochi/mochiweb.git Cloning into mochiweb... remote: Counting objects: 1735, done. remote: Compressing objects: 100% (684/684), done. remote: Total 1735 (delta 1171), reused 1537 (delta 1020) Receiving objects: 100% (1735/1735), 753.70 KiB | 409 KiB/s, done. Resolving deltas: 100% (1171/1171), done.
Run rake to compile the erlang source files
~alchemy$ rake erlc -o build erlang/alc_misc.erl erlc -o build erlang/mochijson2.erl erlc -o build erlang/scratch.erl erlc -o build erlang/alc_hyper.erl erlc -o build erlang/alc_main.erl erlc -o build erlang/alc_console_client.erl erlc -o build erlang/alc_boot.erl erlc -o build erlang/alc_mq.erl erlc -o build erlang/alc_server.erl erlc -o build erlang/alc_store.erl erlc -o build erlang/alc_console.erl
Next, start the server. This takes a server name, we’ll use “test”:
alchemy$ ./alchemy-server test Alchemy (development version) Server name: test Queue name: alchemy-server-test Ready
And finally start the client, in a separate terminal. We pass the same server name here:
alchemy$ ./alchemy-client test test>
You can enter commands here. The “help” command will give you a list of other
things you can try. When you want to shut down the server, send the command
“shutdown”:
alchemy$ ./alchemy-client test test> shutdown
And you should see the server exit in the other window:
alchemy$ ./alchemy-server test Alchemy (development version) Server name: test Queue name: alchemy-server-test Ready Connection from james@simba (sidrbrfpmk) Got command: shutdown Shutting down Shutdown complete
Available commands
Shutdown
Syntax:
shutdown
Description:
Shuts down the configuration database server process.