Real­time
web
Cadec
2011


Niklas
Gustavsson
|
niklas.gustavsson@callistaenterprise.se
|
@protocol7
REST
won
(at
least
outside
the
6irewall)




                                            Out
of
2724
public
APIs


    Real‐&me
web                  ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
3   Real‐&me
web   ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Client­server

               Short
lived
requests




Real‐&me
web                     ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
The
Justin
Bieber
use
case




5     Real‐&me
web               ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Polling
(sometimes)
sucks




  Real‐&me
web              ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Or,
it
really
sucks




  Real‐&me
web        ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Enter
real
time
web





Real‐&me
web                    ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
What
about
messaging,
WS­Noti6ication

       and
all
that
great
stuff?




 Real‐&me
web             ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Streaming
               (Comet,
TwiLer,
websockets)




Real‐&me
web                                 ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
!"#$%&'()*+$,##-%./.




                     ,##-$%./.$011$23
               45')6'5$7$528!$9:);)(<<.<5$=
                45')6'5$7$59:);)($(>?@&5$=
                           ///
               45')6'5$7$5AB+$*$;)C:);)(5$=




Real‐&me
web                                  ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Websockets




12     Real‐&me
web   ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
hLp://www.adambarth.com/experimental/websocket.pdf
Real‐&me
web                             ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Webhooks
               The
Hollywood
principle




Real‐&me
web                             ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
!"#$%&'()*+,-.*%/$$!&010
                         2%3'()*+,-.3%4%35)6.,.7%-8%9,8)1113:
                    3;699<6;=3%4%3>++?4&&@>,+)A,;)>'1;-A&6.*@)B*3%C




                           !"#$%&6.*@)B*%/$$!&010
                             2%36.*@)B3%4%DE%C




15   Real‐&me
web                                                     ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Real‐&me
web   ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
PubSubHubbub




Real‐&me
web                  ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
PubSubHubbub




Real‐&me
web                  ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Subscriber




               Publisher         Subscriber




                           Subscriber




Real‐&me
web                  ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Subscriber




Publisher       Hub                   Subscriber




                            Subscriber




 Real‐&me
web         ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Subscriber




Publisher          Hub                Hub                             Subscriber




                         Subscriber




    Real‐&me
web                            ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Hub
<link>




Real‐&me
web                ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
XMPP
               (aka
Jabber)




Real‐&me
web                  ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Client




                     Server   Server                    Client




                    Client
                                Server




                                         Client




24   Real‐&me
web                             ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
http://superfeedr.com/documentation

25   Real‐&me
web          ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Case:
distribuUng
content
                        Sökmotor


                    2



        Alfresco

                                               EPiServer

               1               2




Real‐&me
web                       ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Sökmotor




                               3

        Alfresco

                        PuSH                       EPiServer
                   2
                                   3
               1




Real‐&me
web                           ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Publisher            Subscriber
                           PubSub
                           engine
               Publisher            Subscriber


               Publisher            Subscriber




Real‐&me
web                            ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
PuSH
               publisher    PubSub
                            engine
               Twitter               PuSH
               Stream API            subscriber
               publisher
                                     Websocket
                                     subscriber




Real‐&me
web                              ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Open
source
               http://code.google.com/p/oppna‐program‐pubsub‐service




Real‐&me
web                                             ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
Demo




Real‐&me
web          ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
The
players




Real‐&me
web                 ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
#cadec




Real‐&me
web            ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
http://dev.twitter.com/pages/streaming_api



  http://wiki.webhooks.org/




                                More?

    hLp://xmpp.org/
                                                            hLp://s4.io/




                 hLp://code.google.com/p/pubsubhubbub/




Real‐&me
web                                              ©
2011
Callista
Enterprise
|
www.callistaenterprise.se
?




Real‐&me
web       ©
2011
Callista
Enterprise
|
www.callistaenterprise.se

Real-time web