Showing posts with label rabbitmq. Show all posts
Showing posts with label rabbitmq. Show all posts

10/08/2010

Technical Diagram 1A

I was bored so I thought I'd map out the game's network architecture.  
Each component in itself is complex.  
This is the most basic diagram with the server running in a single machine.  
However, it should be fairly easy to decouple each component into separate servers and scale as necessary.  


Anyway, now I'm working on creating tilesets to continue mapping the game.
The SolomonRPG game engine is at version 0.3.  
It's solid and stable enough where I can finally concentrate on adding and creating the content!





10/07/2009

RabbitMQ + Erlang Client = Yay!

UPDATE: Read the second part at:  http://developingthedream.blogspot.com/2010/08/setting-up-queue-consumer-with.html

Creating a new erlang project based on the rabbitmq erlang client.
Please take these instructions with a giant grain of salt as I am still an erlang noob.
This is how I got started on my CentOS 5 machine.
I installed erlang via yum.
Everything else is installed manually.

First, create a proper folder structure for the new project. This seems to be pretty standard in some of the erlang projects I've seen so far:

project/
project/db/
project/deps/
project/ebin/
project/include/
project/src/

Then install the latest version of rabbitmq and the rabbitmq erlang client like so:

cd deps
hg clone http://hg.rabbitmq.com/rabbitmq-server
hg clone http://hg.rabbitmq.com/rabbitmq-codegen
hg clone http://hg.rabbitmq.com/rabbitmq-erlang-client
cd rabbitmq-server && make && cd ..
cd rabbitmq-erlang-client && make && cd ..
ln -s /path/to/project/deps/rabbitmq-server/ /usr/lib/erlang/lib/rabbitmq_common
ln -s /path/to/project/deps/rabbitmq-server/ /usr/lib/erlang/lib/rabbitmq_erlang_client


This downloads and builds rabbitmq and the erlang client to the project's deps/ directory.
Then it links it to erlang's lib directory.

Now it's time to create a makefile to simplify building the code.

Makefile.am
.SUFFIXES: .erl .beam 
.erl.beam:  
erlc -W $< 

ERL = erl -pa ebin -boot start_sasl -s rabbit -mnesia dir 'db' 
ERLC = erlc -o ebin 
MODS = src/consumer.erl 
all:  
${ERLC} ${MODS} 
run:  
${ERL} 
clean:  
rm -rf ebin/*.beam erl_crash.dump 


Now we're ready to go and write a consumer using the erlang client, coming up next.