Transcript of "An eclipse client server architecture with asynchronous messaging"
An eclipse client server architecture with asynchronous messaging based on XMPP Thomas Kratz EclipseCon Europe 2011
What is XMPP?• eXtensible Messaging and Presence Protocol• Bi-directional streaming XML• Core: IETF RFC 3920, 3921• Extensions: XMPP Standards Foundation (XSF) – Membership-based – Elected technical council – Unit of work: XMPP Extension Protocol (XEP) – Process: Experimental, Proposed, Draft, Final• Goals: – Simple clients – Federate everything
XMPP Architecture• Addressing Scheme: node@domain/resource – JID = Jabber ID – Node: identity, e.g. user name – Domain: DNS domain name – Resource: device identifier – node@domain identifies a person• Client talks to “local” server – Wherever the user account is hosted – Tied to directory if desired – Organizational policy enforced• Servers talk to other servers – DNS lookup on domain portion of address – Dialback, MTLS for security – One connection for many conversations
The Mango stack Client Synchronous remote Asynchronous service calls notifications through Spring‘s through Smack HttpInvoker XMPP Api Server
Long running tasks• http-service call spawns a worker thread on the server and returns immediately• Client UI runs a fake worker job (Eclipse Jobs API) that listens to XMPP messages• Worker Thread reports progress to client Job through XMPP messages• Client Job fetches result through second http- service call
Not so optimisticlocking• Eclipse Editor lifecycle sends XMPP messages on open/save/close• Server keeps track of opened database entities• Sends warning on possible conflict• If an enitity gets changed, other users get notified to reload their editor input to prevent conflicts.
Floating Licene• Server listens to the „Presence“ part of the XMPP protocol• Keeps track of online users• Rejects login if maximum user count is exceeded• Notifies online users before server shutdown to prevent data loss.
Q&A• Thank you for listening!• Reach me at email@example.com