+ All Categories
Home > Documents > Interwidget Communication with...

Interwidget Communication with...

Date post: 30-Sep-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
15
© www.role-project.eu Interwidget Communication with XMPP Dominik Renzel ([email protected]) Chair of Computer Science 5 – Databases & Information Systems RWTH Aachen University, Germany FOSDEM 2012 – XMPP DevRoom Feb 4, 2012, Brussels, Belgium
Transcript
Page 1: Interwidget Communication with XMPPdbis.rwth-aachen.de/~renzel/slides/fosdem-2012-xmpp/20120204... · XMPP over BOSH (XEP-206) Multiuser Chat (XEP -45) Publish-Subscribe (XEP -60)

© www.role-project.eu

Interwidget Communication with XMPP

Dominik Renzel ([email protected]) Chair of Computer Science 5 – Databases & Information Systems

RWTH Aachen University, Germany

FOSDEM 2012 – XMPP DevRoom Feb 4, 2012, Brussels, Belgium

Page 2: Interwidget Communication with XMPPdbis.rwth-aachen.de/~renzel/slides/fosdem-2012-xmpp/20120204... · XMPP over BOSH (XEP-206) Multiuser Chat (XEP -45) Publish-Subscribe (XEP -60)

Widget Mashups as Personal Learning Environments (PLE)

Page 3: Interwidget Communication with XMPPdbis.rwth-aachen.de/~renzel/slides/fosdem-2012-xmpp/20120204... · XMPP over BOSH (XEP-206) Multiuser Chat (XEP -45) Publish-Subscribe (XEP -60)

Remote Communication & Collaboration in Widget-based PLE

Page 5: Interwidget Communication with XMPPdbis.rwth-aachen.de/~renzel/slides/fosdem-2012-xmpp/20120204... · XMPP over BOSH (XEP-206) Multiuser Chat (XEP -45) Publish-Subscribe (XEP -60)

ROLE Setup

Page 6: Interwidget Communication with XMPPdbis.rwth-aachen.de/~renzel/slides/fosdem-2012-xmpp/20120204... · XMPP over BOSH (XEP-206) Multiuser Chat (XEP -45) Publish-Subscribe (XEP -60)

ROLE Widget Container Technologies

ROLE Widget Container Apache Shindig/Rave/Wookie

OpenSocial Gadgets (& W3C Widgets) Widget container & rendering

ROLE RESTful Services ROLE Interwidget Communication Framework

Local: HTML5 Web Messaging Remote: XMPP Publish-Subscribe

ejabberd + nginx + strophe.js + strophejs-plugins Core RFCs (6120,6121,6122) XMPP over BOSH (XEP-206) Multiuser Chat (XEP-45) Publish-Subscribe (XEP-60) Some extensions of strophejs-plugins recently upstream More to follow

Page 7: Interwidget Communication with XMPPdbis.rwth-aachen.de/~renzel/slides/fosdem-2012-xmpp/20120204... · XMPP over BOSH (XEP-206) Multiuser Chat (XEP -45) Publish-Subscribe (XEP -60)

ROLE Interwidget Communication Architecture

Page 8: Interwidget Communication with XMPPdbis.rwth-aachen.de/~renzel/slides/fosdem-2012-xmpp/20120204... · XMPP over BOSH (XEP-206) Multiuser Chat (XEP -45) Publish-Subscribe (XEP -60)

ROLE Interwidget Communication Client API

Function Description connect(callback) Connects the client to local interwidget communication.

After successful call, the client is able to publish and receive intents. Received intents are passed to the callback function.

disconnect() Disconnects the client from interwidget communication. publish(intent) Publishes a JSON-encoded intent.

ROLE IWC Client Initialization var client = new iwc.Client(); client.connect(function(intent){ // process intent });

Page 9: Interwidget Communication with XMPPdbis.rwth-aachen.de/~renzel/slides/fosdem-2012-xmpp/20120204... · XMPP over BOSH (XEP-206) Multiuser Chat (XEP -45) Publish-Subscribe (XEP -60)

ROLE IWC Intent Payload Format

Google Android-like Intents Developers decide local/remote publish Special flags: PUBLISH_GLOBAL, PUBLISH_LOCAL

var intent = { "component": "", "sender":"[email protected]?http://widget.org/sender.xml", "data":"http://data.org/some/data", "dataType":"text/xml", "action":"ACTION_UPDATE", "categories":["category1","category2"], "flags" :["PUBLISH_GLOBAL"], "extras":{"key1":val1, "key2":val2} };

Page 10: Interwidget Communication with XMPPdbis.rwth-aachen.de/~renzel/slides/fosdem-2012-xmpp/20120204... · XMPP over BOSH (XEP-206) Multiuser Chat (XEP -45) Publish-Subscribe (XEP -60)

Publishing ROLE IWC Intents

function sendIntent(intent) { if (iwc.util.validateIntent(intent)){ client.publish(intent); } }

Create Intent Validate Intent Publish Intent

Page 11: Interwidget Communication with XMPPdbis.rwth-aachen.de/~renzel/slides/fosdem-2012-xmpp/20120204... · XMPP over BOSH (XEP-206) Multiuser Chat (XEP -45) Publish-Subscribe (XEP -60)

ROLE Interwidget Communication Architecture

Major requirement: User must stay aware and in control of incoming/ outgoing intents

Trust-based approach User me sets trust value t(me,u) for other user u User me sets trust threshold T(me) Intents from u dropped by me, if t(me,u)<T(me) Trust inference for unknown peers based on trust network

Page 12: Interwidget Communication with XMPPdbis.rwth-aachen.de/~renzel/slides/fosdem-2012-xmpp/20120204... · XMPP over BOSH (XEP-206) Multiuser Chat (XEP -45) Publish-Subscribe (XEP -60)

(XMPP over) BOSH vs. WebSocket

Property BOSH WebSocket Connections Two concurrent One Connection Persistence Repeated open/close Persistent Transportable Data Textual only Textual, binary Latency High Low Package Overhead High (180+ bytes for

headers per roundtrip) Low (2 bytes for frame headers)

Uptake High Low XMPP Servers Most Few XMPP JS Libraries All Only some experimental Browser support Most Few

XMPP over WebSocket to obsolete BOSH with stable specifications and implementations

Page 13: Interwidget Communication with XMPPdbis.rwth-aachen.de/~renzel/slides/fosdem-2012-xmpp/20120204... · XMPP over BOSH (XEP-206) Multiuser Chat (XEP -45) Publish-Subscribe (XEP -60)

WebSocket XMPP Gateway (WXG)

Based on "An XMPP Sub-protocol for WebSocket" (J. Moffit, E. Cestari) Experimental implementation based on Jetty Source: https://github.com/hocken/wxg Additional experimental JS lib for XMPP over WebSocket JS Lib (-> strophe.js?) Unfortunately broken with appearance of new WebSocket RFC

Page 14: Interwidget Communication with XMPPdbis.rwth-aachen.de/~renzel/slides/fosdem-2012-xmpp/20120204... · XMPP over BOSH (XEP-206) Multiuser Chat (XEP -45) Publish-Subscribe (XEP -60)

XMPP at Our Chair

Inter/National Project Work (ROLE, UMIC, etc.) XMPP Working Group Teaching: Web Science Lecture feat. XMPP Basics Bachelor & Master Theses


Recommended