Download presentation
Presentation is loading. Please wait.
1
ShortTalk - http://shorttalk.sourceforge.net/ XMPP messaging in a peer to peer manner Instructed by: Edward Bortnikov Supervisor: Dr. Ilana David Developed by: Michael Gartsbein
2
Project goal Create a package that uses the XMPP protocol as the transport but distributes the server functionality among the participating nodes Create a package that uses the XMPP protocol as the transport but distributes the server functionality among the participating nodes Create a lightweight XMPP server than can be embedded to each node in system Create a lightweight XMPP server than can be embedded to each node in system Develop a demo messaging application Develop a demo messaging application
3
Motivation To have fun To have fun Explore the filed of distributed systems Explore the filed of distributed systems Experience with the newest open source development tools Experience with the newest open source development tools Experience … Experience … Experience is what one gets when he doesn’t get what he wanted Experience is what one gets when he doesn’t get what he wanted
4
Constraints OS independence OS independence Use only open source modules Use only open source modules The whole system should be small and understandable by a single person The whole system should be small and understandable by a single person The whole system should be delivered as a homogenous python package The whole system should be delivered as a homogenous python package
5
Why distribute? Distributed p2p: Distributed p2p: Many same or almost same nodes Many same or almost same nodes New participating nodes can contribute resources New participating nodes can contribute resources Harder to make secure Harder to make secure Can be very scalable Can be very scalable Can be very fault tolerant Can be very fault tolerant Client server: Client server: There are client nodes and one or (a much smaller) set of servers There are client nodes and one or (a much smaller) set of servers There are limitations on scalability There are limitations on scalability New users consume resources from servers New users consume resources from servers Easier to monitor/control access Easier to monitor/control access
6
Example of distributed system File sharing (torrents) File sharing (torrents) Distributed hash tables Distributed hash tables Distributed file system Distributed file system Messaging (skype) Messaging (skype) http://en.wikipedia.org/wi ki/List_of_distributed_co mputing_projects http://en.wikipedia.org/wi ki/List_of_distributed_co mputing_projects
7
Peer to peer Natural to use p2p in distributed systems Natural to use p2p in distributed systems Bandwidth and other resources sharing Bandwidth and other resources sharing Symmetric design Symmetric design Scalable Scalable Many DS are p2p Many DS are p2p
8
What is XMPP? Xml based messaging protocol also known as jabber Xml based messaging protocol also known as jabber Open protocol and internet standard Open protocol and internet standard Used by google in google-talk and in many other messaging systems Used by google in google-talk and in many other messaging systems *
9
XMPP (cont. 1) XMPP uses a servers based scheme to deliver messages. XMPP uses a servers based scheme to deliver messages. Sender’s server delivers the message to the recipient’s server, and the last to the recipient Sender’s server delivers the message to the recipient’s server, and the last to the recipient
10
Why python? Developing with python is fun! Developing with python is fun! A free and 100% open source platform A free and 100% open source platform OS independent and extra flexible language OS independent and extra flexible language linux+unix/mac/win32/winCE+mobile linux+unix/mac/win32/winCE+mobile Millions of packages Millions of packages If its good for google, NASA and nokia– it should be good enough for me If its good for google, NASA and nokia– it should be good enough for me
11
Why python? (cont.) Experiencing with new programming paradigm Experiencing with new programming paradigm Learning new language and new set of tools Learning new language and new set of tools
12
Architecture Use an open dht system (bamboo open-dht) for the signaling Use an open dht system (bamboo open-dht) for the signaling Use the xmpp protocol at the transport between nodes Use the xmpp protocol at the transport between nodes The dht application will use a small dht-handler, xmpp client and server to communicate The dht application will use a small dht-handler, xmpp client and server to communicate
13
Block scheme ShortTalk application instance GUI XMPP server XMPP client DHT handler User agent ShortTalk application instance GUI XMPP server XMPP client DHT handler User agent DHT node P2p session
14
The technology The project is built as a composition of python packages The project is built as a composition of python packages XMPP – client and server according to the XMPP standard RFC 3920 XMPP – client and server according to the XMPP standard RFC 3920 DHT – free publicly open DHT service – based on the bamboo project DHT – free publicly open DHT service – based on the bamboo project Tkinter – a “standard” python GUI Tkinter – a “standard” python GUI
15
Main technical milestones Creating a smart and reliable DHT handler Creating a smart and reliable DHT handler Assembling a lightweight XMPP sever engine that will run on both linux and windows Assembling a lightweight XMPP sever engine that will run on both linux and windows Most of the existing available XMPP servers are pretty heavy and complicated, and contain features I don't need. Most of the existing available XMPP servers are pretty heavy and complicated, and contain features I don't need.
16
Main technical milestones (cont 1) Embedding XMPP client to the project Embedding XMPP client to the project Assembling the whole system together in a demo messaging application Assembling the whole system together in a demo messaging application Must do GUI Must do GUI
17
Entities
18
Typical workflow sequence
19
Step by step workflow Start the application Start the application Creating the DHT handler and choosing a closet DHT node to work with Creating the DHT handler and choosing a closet DHT node to work with When a the connection breaks, a new one is transparently established When a the connection breaks, a new one is transparently established XMPP client DHT handler User agent
20
Step by step workflow (cont 1) Starting the XMPP server Starting the XMPP server Starting the XMPP client and logging to the server Starting the XMPP client and logging to the server Callbacks to GUI are set Callbacks to GUI are set ShortTalk application instance GUI XMPP server XMPP client DHT handler User agent
21
Step by step workflow (cont 2) Subscribing Subscribing User can subscribe to DHT handler for event -> other users go online User can subscribe to DHT handler for event -> other users go online
22
Step by step workflow (cont 3) Logging to the DHT Logging to the DHT This will create an entry in the DHT with name-ip and will refresh it This will create an entry in the DHT with name-ip and will refresh it The user agent will get notifications on when users will get online The user agent will get notifications on when users will get online ShortTalk application instance GUI XMPP server XMPP client DHT handler User agent
23
Step by step workflow (cont 4) Chatting Chatting User can send a message to another online user User can send a message to another online user The message will go from user’s XMPP client directly to remote user XMPP server The message will go from user’s XMPP client directly to remote user XMPP server GUI XMPP server XMPP client DHT handler User agent GUI XMPP server XMPP client DHT handler User agent 1 2 3
24
Look and feel
25
Special thanks To Eddie Bortnikov for the whole project concept and support To Eddie Bortnikov for the whole project concept and support To the lab for the infrastructure To the lab for the infrastructure XMPP community and specially Alexey "Snake" Nezhdanov for python’s XMPP support XMPP community and specially Alexey "Snake" Nezhdanov for python’s XMPP support Open bamboo team for the free DHT Open bamboo team for the free DHT To sourceforge for hosting and technological support To sourceforge for hosting and technological support To Guido van Rossum for the language To Guido van Rossum for the language
26
Future development Embedding the DHT with the application Embedding the DHT with the application Adding authentication Adding authentication Changing the polling of the DHT to a event driven pub/sub Changing the polling of the DHT to a event driven pub/sub Using DHT to implement “offline messaging” and saving user list in the grid Using DHT to implement “offline messaging” and saving user list in the grid Through NAT support Through NAT support
27
Future Development (cont.) Contact information Contact information srvrules@t2.technion.ac.il srvrules@t2.technion.ac.il srvrules@t2.technion.ac.il Project developer’s page Project developer’s page http://sourceforge.net/projects/shorttalk/ http://sourceforge.net/projects/shorttalk/
28
News from the world XEP-0174: Serverless Messaging XEP-0174: Serverless Messaging A new standard from October 2008 http://xmpp.org/extensions/xep-0174.html A new standard from October 2008 http://xmpp.org/extensions/xep-0174.html http://xmpp.org/extensions/xep-0174.html Python 3.0 Python 3.0 A new significant release in December 2008 A new significant release in December 2008
29
This slide was left blank on purpose
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.