baphled / chatterl

Home | Edit | New

Shell Interaction

Starting the server

erl -s chatterl -s reloader

Which will initialise the server & CWIGA The backend allowing clients to connect & groups to be created & admin the ability to manage the system. Groups can be created on differing nodes as long as the node can communicate with the chatterl_serv.

Chatterl server runs as an OTP application & uses a supervisor to manage it (in later versions there will be options to spawn multiple servers, allowing for a more fault tolerant chat system).

CWIGA allows for developers to interact with the API, giving them the ability use the basic CRUD functionalities of Chatterl as well as handle clients along with thier messages & other functionality.

Starting a group

chatterl_serv:create("room","description").

Which will spawn a group process which users can connect to.

Chatterl groups can be started on any node that can communicate with the server, this allows the user to create a number of groups on varying nodes, helping with general organisation as well a performance & reliablity.

Connection to chatterl

chatter_client:start(UserName).

Creating a connection to the server is done by using the following command.

At the time of this writing chatterl_clients can only spawn a client per node, this will later be changed once the web interface has been fully implemented, possibly to a refactoring the client to a parameterised module.
For the moment node users must follow the basic OTP configurations (same cookie, valid DNS name, etc).

This will initialise a user & connect them to chatterl_serv (must be done before users can join a group or communicate with other chatterl users).

Disconnecting from chatterl

chatterl_client:stop(UserName).

This will disconnect the user from all the groups they are currently connected to as well as the actual Chatterl server.

Sending private messages

chatterl_client:private_msg(Sender,Recipient,Message).

Where Sender is the client sending the message, Recipient as the name of the user the client wants to send the message to & Message being the message that you want to send to the receiving client. If the message is sent successfully the Recipient will receive the message.

Last edited by baphled, Sun Mar 15 09:16:10 -0700 2009
Home | Edit | New
Versions: