Thursday, July 30, 2009

P2P Instance Messaging - Dalesa-Sallapa was born at LSF

At LSF I could able to develop a zeroconf Instance Messagin(IM) platform (we named it with the sinhala term "Sallapa" which gives the meaning of "chat"). This attempt was initiated as a requirement by ICTA who funded us. ICTA wanted to give the chatting facility to the peers which runs Dalesa. Therefore since Dalesa is a Peer-To-Peer(P2P) overlay this IM platform also should have been configured according P2P manner. Hence the Sallapa was needed to implement as a zeroconf IM which works in P2P manner. So Sallapa assures the concept of decentralization which we believe and work on at LSF.

Sallapa has designed and developed as a pidgin plugging. One could ask the question why Sallapa was born as a pidgin plugging. We basically did not want to implement all the GUI things that is needed to a IM client. Other reasons are those pidgin is open source and it provides a complete and clear API and docs to its plugging architecture.

Ok now I want to talk about how Sallapa works. Once you install Sallapa It appears as a new IM communication protocol like Yahoo IM, Google Talk in pidgin. Then you can create new pidgin login account to Sallapa. Now if you are running Dalesa on you computer you are getting signed-in to you newly created Sallapa account and list all the other peers in your network who running Dalesa and logged into their Sallapa.

Does Sallapa run on top of Dalesa?
No, not like that actually. Architecturally Sallapa does not run on Dalesa. Dalesa is a P2P overlay which is to run on and hide the IP layer. Sallapa is also running on IP layer. So if someone got to think as Sallapa is running on Dalesa then that is meaningless. But Sallapa and Dalesa has integrated by IPC module which is used to check the status of Dalesa from Sallapa. That is the only link that Dalesa and Sallapa are in.

How Sallapa works Technically?
Sallapa uses MDNS to publish its presence in the network. In linux like environments Sallapa uses Avahi to do this. But in win32 like environments it uses separate MDNS implementation developed for win32.
Once Sallapa published the presence of a peer in the network others peers are callbacked by MDNS-SD(MDNS-Service Discovery) running in them and updated their buddy list accordingly. Now at the moment Sallapa uses Bonjour as the communication protocol to exchange messages.