Congruent Push Left Push Right Push Left Push Right Incongruent HEARTS & FLOWERS Press Return.
ProcessOne Push Platform: pubsub.p1pp.net
-
Upload
processone -
Category
Technology
-
view
2.577 -
download
1
description
Transcript of ProcessOne Push Platform: pubsub.p1pp.net
![Page 1: ProcessOne Push Platform: pubsub.p1pp.net](https://reader034.fdocuments.us/reader034/viewer/2022052618/554fa11eb4c90586258b49a5/html5/thumbnails/1.jpg)
XMPP-based Push Solutions - pubsub.p1pp.netXMPP, HTTP and how to use ProcessOne Push Platform
February 2012
![Page 2: ProcessOne Push Platform: pubsub.p1pp.net](https://reader034.fdocuments.us/reader034/viewer/2022052618/554fa11eb4c90586258b49a5/html5/thumbnails/2.jpg)
Violet use case: Nabaztag push architecture
Initial architecture based onpure polling to check «inbox»
Based on database and HTTP front servers
Database with rabbits'messages
Data publication
BroadcastserviceHTTP Fronts
Query to check inbox(every 5 seconds)
![Page 3: ProcessOne Push Platform: pubsub.p1pp.net](https://reader034.fdocuments.us/reader034/viewer/2022052618/554fa11eb4c90586258b49a5/html5/thumbnails/3.jpg)
Violet use case: Nabaztag push architecture
New push architecture on XMPP
Lower latency and more reliable delivery
HTTP infrastructure could be halfed
Database storing therabbits' inbox
Publishing data
broadcastservice
ejabberd servers
Persistant XMPPconnection
Messages are pushedwhen needed
History of data
![Page 4: ProcessOne Push Platform: pubsub.p1pp.net](https://reader034.fdocuments.us/reader034/viewer/2022052618/554fa11eb4c90586258b49a5/html5/thumbnails/4.jpg)
Example: Gitlive
This is our technological demo showing in browser, anonymous pubsub.
![Page 5: ProcessOne Push Platform: pubsub.p1pp.net](https://reader034.fdocuments.us/reader034/viewer/2022052618/554fa11eb4c90586258b49a5/html5/thumbnails/5.jpg)
Example: The Upik case
Posting blog post on web server(triggers a hub "ping")
PubsubhubbubHub
for subscribers
XMPP servers
Persistant XMPPconnection
Messages are pushedwhen needed
PubsubhubbubHub
for publisher
Could be the samehub
![Page 6: ProcessOne Push Platform: pubsub.p1pp.net](https://reader034.fdocuments.us/reader034/viewer/2022052618/554fa11eb4c90586258b49a5/html5/thumbnails/6.jpg)
Enabling all those cases with ProcessOne Push Platform (P1PP)
Build a generic platform able to manage all those cases for our users in a
standard way.
Build a development community around realtime protocols.
Share our XMPP pubsub expertise with developers around the world.
Propose our ability to make XMPP Pubsub scale as a service.
Support innovation around notification and new usage:
Mobile.
Web protocols: websockets.
![Page 7: ProcessOne Push Platform: pubsub.p1pp.net](https://reader034.fdocuments.us/reader034/viewer/2022052618/554fa11eb4c90586258b49a5/html5/thumbnails/7.jpg)
ProcessOne Push Platform (P1PP) - Overview
Browser Desktop ormobile client
P1 Push Platform
XMPP overHTTP /
Websocket
XMPP overTCP - s2s
XMPP server(Gtalk for example)
XMPP overTCP - c2s
Publisher
XMPP (throughout 3rd party server)or
HTTP publish protocol
![Page 8: ProcessOne Push Platform: pubsub.p1pp.net](https://reader034.fdocuments.us/reader034/viewer/2022052618/554fa11eb4c90586258b49a5/html5/thumbnails/8.jpg)
Resources
Main P1PP page:http://www.process-one.net/en/solutions/p1pp
Developer page:http://www.process-one.net/en/solutions/p1pp_dev
Github ProcessOne:https://github.com/organizations/processone
P1PP Javascript library on Github:https://github.com/processone/p1pp-js
P1PP Command-line tool on Github:https://github.com/processone/p1pp
XMPP protocol level documentationhttps://support.process-one.net/doc/display/XMPP/P1PP+documentation
![Page 9: ProcessOne Push Platform: pubsub.p1pp.net](https://reader034.fdocuments.us/reader034/viewer/2022052618/554fa11eb4c90586258b49a5/html5/thumbnails/9.jpg)
Command-line
./bin/p1.rb create test12
./bin/p1.rb list
./bin/p1.rb delete
./bin/p1.rb subscribe test12
./bin/p1.rb unsubscribe test12
./bin/p1.rb listenecho ‘test’ | ./bin/p1.rb publish test12
![Page 10: ProcessOne Push Platform: pubsub.p1pp.net](https://reader034.fdocuments.us/reader034/viewer/2022052618/554fa11eb4c90586258b49a5/html5/thumbnails/10.jpg)
Javascript examples: sending
https://github.com/processone/p1pp-js/blob/master/examples/ticker/sender.html<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.js'></script>
<script src="../../p1pp.js"></script> <script type="text/javascript"> $(function() { $("#connect").click(function() { connect($("#password").val()) })
$("#update").click(function() { var el = Strophe.xmlElement("value"); el.appendChild(Strophe.xmlTextNode($("#newContent").val()));
P1PP.publish("ticker", null, el, function() { });
$("#newContent").val(""); }) });
function connect(password) { P1PP.connect({ jid: "[email protected]", password: password, debug: false, // Change to true to see messages trafic on_strophe_event: on_state_change }); }
![Page 11: ProcessOne Push Platform: pubsub.p1pp.net](https://reader034.fdocuments.us/reader034/viewer/2022052618/554fa11eb4c90586258b49a5/html5/thumbnails/11.jpg)
Javascript examples: Receving<script src="../../p1pp.js"></script>
<script type="text/javascript"> $(function() { P1PP.connect({ debug: false, "// Change to true to see messages trafic nodes: ["[email protected]/ticker"], publish: on_publish, retract: on_retract, on_strophe_event: on_state_change }); $("#ticker").liScroll(); });
function on_state_change(state, c){ if(state === Strophe.Status.CONNECTED || state === Strophe.Status.ATTACHED) { } }
function on_publish(id, value, node, timestamp) { $("#ticker").stop(); $("#ticker").append("<li id='"+id+"'><span>"+$(value).text()+"</span></li>"); $("#ticker").liScrollRestart(); }
function on_retract() { } </script>
![Page 12: ProcessOne Push Platform: pubsub.p1pp.net](https://reader034.fdocuments.us/reader034/viewer/2022052618/554fa11eb4c90586258b49a5/html5/thumbnails/12.jpg)
Online
http://dev1.process-one.net/~pchmielowski/ticker/ticker3.html
http://dev1.process-one.net/~pchmielowski/ticker/sender.html