The document discusses how the technologies developed in the ROLE project for building personal learning environments using widgets could potentially contribute to and integrate with the Apache Rave project. It provides background on ROLE and describes several ROLE technologies, including the ROLE sandbox for widget development, APIs for inter-widget communication and managing linked data resources, and efforts to support real-time collaboration using XMPP. It suggests areas of overlap between ROLE and Rave and invites the Apache community to explore opportunities for collaboration between the two projects.
9. ROLE Interwidget Communication – Facts
Message-based communication between widgets
Two different forms
Single-user-single-browser:
Integration of local widget instances to full applications
Realized with HTML5 Web Messaging (other mechanisms realizable, too)
Multi-user-multi-browser:
Remote user collaboration in real-time
Realized with XMPP Publish-Subscribe
Message types
Events: what happened upon sending message
Intents: what should happen on receiving message
(Use of semantic descriptions in message representations)
Context
In general: XMPP Publish-Subscribe Channel
ROLE Reference Implementation: ROLE Spaces
Refers to Epic RAVE-25
12. Efforts in XMPP Community: XMPP over WebSocket
XMPP over WebSocket Gateway (WXG)
Based on "An XMPP Sub-protocol for WebSocket" (J. Moffit, E. Cestari)
Jetty-based implementation (supporting RFC 6455)
Source: https://github.com/hocken/wxg
Web Client Library Extension (strophe.js)
(Semi-)transparent BOSH/XMPP over WS
Refers to Strophe Issue 68:
Source: https://github.com/Gordin/strophejs
13. (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 Low (2 bytes for frame
headers per roundtrip) 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
16. OpenApp – Concept
API for Linked Data-style resource management
Everything is a Resource
URI
Representation
Metadata
Data
Resources can have sub-resources
Access to sub-resources filtered by type or relation to parent
Special Resources
Space is topmost resource in a space (shared)
User is topmost personal resource (protected)
17. OpenApp – Client API
openapp.oo.Resource
create getInfo
del setInfo
getSubResources getMetadata
refresh setMetadata
getRepresentation
setRepresentation
Get current space & user as resources
var space = new openapp.oo.Resource(openapp.param.space());
var user = new openapp.oo.Resource(openapp.param.user());
Get resource information (JSON object with key/value pairs)
space.getInfo(function(info) {
alert(info);
});
18. OpenApp – Client API (Code Samples continued)
Create data sub-resource under space
space.create({
Get space resource metadata "data",
relation: openapp.ns.role +
type: "my:data:namespace:uri",
metadata: meta,
callback: function(sub){
//do something with new sub-resource
}
});
Find sub-resources via relation and type
space.getSubResources({
relation: openapp.ns.role + "data",
type: "my:data:namespace:uri",
onAll: function(arr) { //alternatively use onEach
//Do something with array of found subresources
}
});
19. OpenApp – Browsing Resources with the Index Page
For any resource open index page with <RESOURCE_URI>/:index