Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 48e77528bd
Fetching contributors…

Cannot retrieve contributors at this time

49 lines (29 sloc) 1.675 kb
Background:
On the tenth hour of the Massive Dynamic Homecoming hackaton, your teams
polyglot system using Java, Ruby and Perl needs a simple and
homerolled publish subscribe system.
As the messaging backend, this must be tested before sent to the arena
as the judges only give each solution one chance.
There are high demands on fault handling.
Technical:
Implement a Publish Subscribe system described as the following
- Clients connect through TCP sockets
- Each client communicates with the PubSub system using
- A dedicated Send TCP connection for Publishing Messages
- A dedicated Receive TCP connection for Subscribing and Receiving Messages
- This is indicated by sending
- 'publish-connection'
- 'subscribe-connection'
on the chosen TCP connection once connected.
A connected client
- Subscribes to messages from a source by sending 'subscribe $NAME'
- Unsubscribes from messages from a source by sending 'unsubscribe $NAME'
- Sends messages to a named source by sending 'message $NAME $BYTE_SIZE $MESSAGE' through
the Publish connection
- Receives messages it subscribes to as 'message $MESSAGE_ID $BYTE_SIZE_OF_MESSAGE $MESSAGE'
these are received through the Subscribe connection
- ACKs each message received before receiving another, ack format is 'ack $MESSAGE_ID'
this is replied to through the Subscribe connection, i.e the same socket it received it from
In order to have a good view of the system, a good enough operator interface is needed
to allow the team to search for flaws while intergrating and adding more
services.
Jump to Line
Something went wrong with that request. Please try again.