View
219
Download
3
Tags:
Embed Size (px)
Citation preview
ShortTalk - ShortTalk - http://shorttalk.sourceforhttp://shorttalk.sourcefor
ge.net/ge.net/XMPP messaging in a peer to peer XMPP messaging in a peer to peer
mannermannerInstructed by:
Edward Bortnikov
Supervisor: Dr. Ilana David
Developed by: Michael Gartsbein
Project goalProject goal
Create a package that uses the Create a package that uses the XMPP protocol as the transport but XMPP protocol as the transport but distributes the server functionality distributes the server functionality among the participating nodesamong the participating nodes
Create a lightweight XMPP server Create a lightweight XMPP server than can be embedded to each node than can be embedded to each node in systemin system
Develop a demo messaging Develop a demo messaging applicationapplication
MotivationMotivation
To have funTo have fun Explore the filed of Explore the filed of
distributed systemsdistributed systems Experience with the Experience with the
newest open source newest open source development toolsdevelopment tools
Experience …Experience … Experience is what one gets Experience is what one gets
when he doesn’t get what he when he doesn’t get what he wantedwanted
ConstraintsConstraints
OS independence OS independence Use only open source Use only open source
modulesmodules The whole system should be The whole system should be
small and understandable by small and understandable by a single persona single person
The whole system should be The whole system should be delivered as a homogenous delivered as a homogenous python packagepython package
Why distribute?Why distribute? Distributed p2p:Distributed p2p:
Many same or Many same or almost same nodesalmost same nodes
New participating New participating nodes can nodes can contribute resourcescontribute resources
Harder to make Harder to make securesecure
Can be very scalableCan be very scalable Can be very fault Can be very fault
toleranttolerant
Client server:Client server: There are client nodes There are client nodes
and one or (a much and one or (a much smaller) set of serverssmaller) set of servers
There are limitations There are limitations on scalabilityon scalability
New users consume New users consume resources from resources from serversservers
Easier to Easier to monitor/control monitor/control access access
Example of distributed Example of distributed systemsystem
File sharing (torrents)File sharing (torrents) Distributed hash Distributed hash
tablestables Distributed file system Distributed file system MessagingMessaging (skype) (skype) http://http://
en.wikipedia.org/wiki/en.wikipedia.org/wiki/List_of_distributed_coList_of_distributed_computing_projectsmputing_projects
Peer to peerPeer to peer
Natural to use p2p in Natural to use p2p in distributed systemsdistributed systems
Bandwidth and other Bandwidth and other resources sharingresources sharing
Symmetric designSymmetric design ScalableScalable
Many DS are p2pMany DS are p2p
What is XMPP?What is XMPP? Xml based messaging protocol also known as Xml based messaging protocol also known as
jabberjabber Open protocol and internet standardOpen protocol and internet standard Used by google in google-talk and in many Used by google in google-talk and in many
other messaging systemsother messaging systems
*
XMPP (cont. 1)XMPP (cont. 1) XMPP uses a servers based scheme to XMPP uses a servers based scheme to
deliver messages.deliver messages. Sender’s server delivers the message to the Sender’s server delivers the message to the
recipient’s server, and the last to the recipient’s server, and the last to the recipientrecipient
Why python?Why python?
Developing with python is fun!Developing with python is fun! A free and 100% open source platformA free and 100% open source platform OS independent and extra flexible OS independent and extra flexible
languagelanguage linux+unix/mac/win32/winCE+mobilelinux+unix/mac/win32/winCE+mobile
Millions of packages Millions of packages If its good for google, NASA and nokia– If its good for google, NASA and nokia–
it should be good enough for meit should be good enough for me
Why python? (cont.)Why python? (cont.)
Experiencing with new programming Experiencing with new programming paradigm paradigm
Learning new language and new set Learning new language and new set of toolsof tools
ArchitectureArchitecture
Use an open dht system Use an open dht system (bamboo open-dht) for (bamboo open-dht) for the signalingthe signaling
Use the xmpp protocol Use the xmpp protocol at the transport at the transport between nodesbetween nodes
The dht application will The dht application will use a small dht-handler, use a small dht-handler, xmpp client and server xmpp client and server to communicateto communicate
Block schemeBlock 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
The technologyThe technology
The project is built as a composition The project is built as a composition of python packagesof python packages
XMPP – client and server according XMPP – client and server according to the XMPP standard RFC 3920to the XMPP standard RFC 3920
DHT – free publicly open DHT DHT – free publicly open DHT service – based on the bamboo service – based on the bamboo projectproject
Tkinter – a “standard” python GUITkinter – a “standard” python GUI
Main technical Main technical milestonesmilestones
Creating a smart and reliable DHT Creating a smart and reliable DHT handlerhandler
Assembling a lightweight XMPP sever Assembling a lightweight XMPP sever engine that will run on both linux and engine that will run on both linux and windowswindows Most of the existing available XMPP Most of the existing available XMPP
servers are pretty heavy and servers are pretty heavy and complicated, and contain features I don't complicated, and contain features I don't need.need.
Main technical Main technical milestones (cont 1)milestones (cont 1)
Embedding XMPP client to the Embedding XMPP client to the projectproject
Assembling the whole system Assembling the whole system together in a demo messaging together in a demo messaging application application
Must do GUI Must do GUI
Step by step workflowStep by step workflow
Start the Start the applicationapplication Creating the DHT Creating the DHT
handler and handler and choosing a closet choosing a closet DHT node to work DHT node to work withwith
When a the When a the connection breaks, connection breaks, a new one is a new one is transparently transparently establishedestablished XMPP client
DHT handler
User agent
Step by step workflow Step by step workflow (cont 1)(cont 1)
Starting the Starting the XMPP serverXMPP server
Starting the Starting the XMPP client and XMPP client and logging to the logging to the serverserver
Callbacks to Callbacks to GUI are setGUI are set
ShortTalk application instance
GUI
XMPP server
XMPP client
DHT handler
User agent
Step by step workflow Step by step workflow (cont 2)(cont 2)
SubscribingSubscribing User can User can
subscribe to subscribe to DHT handler for DHT handler for event -> other event -> other users go onlineusers go online
Step by step workflow Step by step workflow (cont 3)(cont 3)
Logging to the Logging to the DHTDHT This will create This will create
an entry in the an entry in the DHT with name-ip DHT with name-ip and will refresh itand will refresh it
The user agent The user agent will get will get notifications on notifications on when users will when users will get onlineget online
ShortTalk application instance
GUI
XMPP server
XMPP client
DHT handler
User agent
Step by step workflow Step by step workflow (cont 4)(cont 4)
ChattingChatting User can send a User can send a
message to message to another online another online useruser
The message The message will go from will go from user’s XMPP user’s XMPP client directly to client directly to remote user remote user XMPP serverXMPP server
GUI
XMPP server
XMPP client
DHT handler
User agent
GUI
XMPP server
XMPP client
DHT handler
User agent1 2
3
Special thanksSpecial thanks
To Eddie Bortnikov for the whole To Eddie Bortnikov for the whole project concept and supportproject concept and support
To the lab for the infrastructureTo the lab for the infrastructure XMPP community and specially Alexey XMPP community and specially Alexey
"Snake" Nezhdanov for python’s "Snake" Nezhdanov for python’s XMPP supportXMPP support
Open bamboo team for the free DHTOpen bamboo team for the free DHT To sourceforge for hosting and To sourceforge for hosting and
technological supporttechnological support To Guido van Rossum for the languageTo Guido van Rossum for the language
Future developmentFuture development
Embedding the DHT with the Embedding the DHT with the applicationapplication Adding authenticationAdding authentication
Changing the polling of the DHT to a Changing the polling of the DHT to a event driven pub/subevent driven pub/sub
Using DHT to implement “offline Using DHT to implement “offline messaging” and saving user list in the messaging” and saving user list in the gridgrid
Through NAT support Through NAT support
Future Development Future Development (cont.)(cont.)
Contact informationContact information [email protected]@t2.technion.ac.il
Project developer’s pageProject developer’s page http://sourceforge.net/projects/http://sourceforge.net/projects/
shorttalk/shorttalk/
News from the worldNews from the world
XEP-0174: Serverless MessagingXEP-0174: Serverless Messaging A new standard from October 2008A new standard from October 2008
http://xmpp.org/extensions/xep-0174.htmhttp://xmpp.org/extensions/xep-0174.htmll
Python 3.0 Python 3.0 A new significant release in December A new significant release in December
20082008