Cloud Services
Palm webOS is designed around the needs of connected applications, including the deep integration of web or cloud services into the platform. The intention is to create a platform supporting not just client application UIs and services, but web services as well. This extends the platform beyond the boundaries of the device to the Web itself.
The initial webOS cloud service offering is Mojo Messaging, an XMPP-based messaging service supporting notifications from web services to the device and eventually between device applications and services. Push notifications are much more power-efficient and extend battery life. Applications will be notified when there is a service update, eliminating the need to poll. In addition, the Mojo Messaging architecture extends the messaging model to enable client applications and services to communicate with each other.
You will typically use Mojo Messaging following these basic steps:
Create an endpoint, to which a key is returned.
Share the key with the cloud service from which you need updates.
Subscribe to the endpoint with a callback to receive messages.
Wake when a message arrives from the cloud on the defined callback.
Start by creating a notification endpoint. This registers the receiving application with the messaging service and establishes a publishing key for notifications:
this.controller.serviceRequest("palm://com.palm.pubsubservice", { method: "createEndpoint", parameters: { endpoint: "com.palm.app.news.newstories", description: ...Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access