In this tutorial, we will build a simple, distributed chat system based on RSB.
The initial goal of the first part is having a chat client which sends and receives text messages to and from other clients without the need for a server. A session could look like this:
$ rsb-chat-client
> hi, anyone listening?
other-user: hi, i thought, i was the only one :)
> /quit
$
As an extension, in the second part the chat program should be able to send and receive avatar images to and from other chat clients.
The distributed chat system can be organized by assigning a scope or the form /chat/text/NICKNAME to each participating nickname. This allows receiving messages from a particular sender by listening on /chat/text/NICKNAME and receiving all messages by listening on the superscope /chat/text/.
Implementation-wise, sending and receiving textual chat messages, requires an informer and a listener on the respective appropriate scope:
Avatar images are exchanged between participants of the distributed chat via RSB‘s RPC mechanism. In order to implement this, each chat program