SlideShare a Scribd company logo
Messaging with Erlang and Jabber


    Erlang User Conference '04

              21st. October 2004


     Mickaël Rémond <mickael.remond@erlang-fr.org>



              www.erlang-projects.org
What are XMPP and Jabber ?
    XMPP stands for eXtensible Messaging & Presence Protocol
      
●



    XMPP is a generic and extensible messaging protocol based on
●

    XML. It is now an IETF standard

    Jabber is an Instant Messaging protocol that rely on XMPP
●



    Very active community:
●



         Several server implementations of XMPP and Jabber
     –

         Several client software and libraries
     –




                                    2
What does the XMPP protocol
             looks like ?
    Interleaved XML document
      
●

    streams: Client and serverstreams
    form an XML document.
    First level tag: <stream>
●



    Three types of second levels tags:
●



         message: asynchronous
     –
         communications
         iq: Synchronous
     –
         communications
         presence: presence and status
     –
         data


                                  3
Example XMPP telnet session
       0: telnet
 Step              localhost 5222
Step 1: Open XMPP stream
   Client sends:
<?xml version='1.0'?>
<stream:stream
  xmlns:stream=quot;http://etherx.jabber.org/streamsquot;
  to=quot;localhostquot; xmlns=quot;jabber:clientquot;>
   Server answers:
<?xml version='1.0'?>
<stream:stream xmlns='jabber:client'
  xmlns:stream='http://etherx.jabber.org/streams'
  id='3694886828' from='localhost'>
                              4
Example XMPP telnet session
       2: Login
 Step

     Client send login informations:
<iq type='set' id='auth'>
  <query xmlns='jabber:iq:auth'>
   <username>mremond</username>
   <password>azerty</password>
   <resource>TelnetClient</resource></query></iq>

     Server confirms login:
<iq type='result' id='auth'/>




                                  5
Example XMPP telnet session
       2: Login
 Step
   The server can returns an error on failed authentication for
     example:
<iq type='error' id='auth'>
  <query xmlns='jabber:iq:auth'>
   <username>mremond</username>
   <password>D</password>
   <resource>TelnetClient</resource></query>
   <error code='401' type='auth'>
    <not-authorized
     xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
   </error></iq>


                                 6
Example XMPP telnet session
       3: Presence
 Step

    Client sends presence data
<presence/>

    If applications in our client roster are online, our telnet client
       receives presence packets:
<presence from='mremond5@localhost/tkabber'
   to='mremond@localhost/TelnetClient'>
   <priority>8</priority>
  </presence>




                                    7
Example XMPP telnet session
       3: Presence
 Step

    From here, our telnet client is visible online by other clients:




                                   8
Example XMPP telnet session
       4: Sending a message
 Step

    Client sends a message to another user / application:
<message to='mremond5@localhost'>
  <subject>Hello</subject>
    <body>I am chatting with a Telnet client !
    </body>
  </message>

    No answer from the server




                                9
Example XMPP telnet session
       5: Receiving a message
 Step

    We can receive messages from other clients:
<message from='mremond5@localhost/tkabber'
  to='mremond@localhost/TelnetClient'
  type='chat'
  xml:lang='fr-FR'>
   <body>Answer from the other side</body>
   <x xmlns='jabber:x:event'>
    <offline/>
    <delivered/>
    <displayed/>
    <composing/>
  </x></message>

                                10
Example XMPP telnet session
       6: Presence update
 Step

    Presence informations are updated (For example here, when a
      user in our roster disconnect):
<presence from='mremond5@localhost/tkabber'
  to='mremond@localhost/TelnetClient'
  type='unavailable'/>




                              11
Example XMPP telnet session
       7: Closing the XML stream
 Step

    Client closes XML client stream tag (This end a valid XML
      document):
</stream:stream>
    Server then closes XML stream tag and disconnect (This end the
      second XML document):
</stream:stream>




                                   12
XMPP bus design
    XMPP rely on a naturally distributed architecture (No central server !)
      
●



         Includes server to server communications (with domain routing
     –
         between servers)
         Includes gateways to various other protocols
     –




                                    13
XMPP protocol extensions
    XMPP is an extensible protocol (with XML namespaces) that
      
●

    supports many interesting features:
         Service discovery and browsing
     –

         Publish & Subscribe: Allow 1 to n communications.
     –

         Reliable messages: can add confirmations delivery.
     –

         Message queues for offline applications and messages
     –
         expiration.
         Users or applications search.
     –

         Geolocalisation.
     –

         Message archiving.
     –

         ...
     –
                                 14
Fun things to do with XMPP and
                 Erlang
    Implementation: XMPP and Jabber servers are massively concurrent: a
      
●

    Jabber server must handle huge community of users.
        A Jabber server in Erlang makes sense to handle massive concurrency.
     –
     – It can prove Erlang reliability, scalability, ability to handle concurrency

    Extensions: XMPP server protocol is build around a complete XML API for
●

    client to server and server to server communications:
        Developping Erlang software agents that plug on the bus is easy:
     –
        Erlang expressiveness.
     – It allows to use the bus as a mediation layer between Erlang and non-
        Erlang software (Kind of web service but more simple and powerful)
     – Several levels of interaction for Erlang-based extensions: Plug-in in the
        XMPP bus with a service protocol or XMPP client connected to the bus
        (client protocol)
    Use: XMPP can be used as an instant messaging platform or integrated with
●

    other communication services.
                                      15
      
  Implementing an XMPP server in
              Erlang




                16
ejabberd
    ejabberd is an Erlang-based XMPP server implementation.
      
●



    It has been designed to support clustering, fault-tolerance and high-
●

    availability.
    It supports many features and extensions of the Jabber protocol:
●



         Built-in Multi-User Chat service
     –

         Distributed database (Mnesia)
     –

         Built-in IRC transport
     –

         Built-in Publish-Subscribe service
     –

         Support for LDAP authentification
     –

         Service discovery
     –

    It is more scalable than the most used open source implementation (Jabberd1.4
●

    and Jabber2).

                                        17
Benchmarks: how does ejabberd
             perform ?
    Jabber benchmarks realized with the Tsunami benchmarking
      
●

    tool.
    Ejabberd performs very well:
●



         It can route more than 2000 simple messages per
     –
         second (on a single CPU 1,5 Ghz machine).
         It can handle a huge number of concurrent users on a
     –
         single machine (Has reached 7000 users connected
         without troubles. We need to push the test further).
         This good performance is achieved while being the most
     –
         featureful and stable server XMPP.
         ejabberd design can be improved to achieve better
     –
         performance.
                                18
ejabberd to send short messages
         simultaneous users           Delay


      




                   Response time and connection establishement




                                       19
The benchmark server
      
 ● CPU: Bi-Xeon 2,4 Ghz


    Ram: 1 Go
●


    Operating System: Linux
●




Note: The second CPU was not used as only
 one ejabberd instance was running on the
 server.


                      20
      
         Developing XMPP clients in
                  Erlang




                    21
Jabberlang: Helper library to write
     XMPP client in Erlang
    Jabberlang is a client library to write XMPP client in
      
●

    Erlang.
    It can be used both a library or as Erlang behaviour.
●



    It allow to write XMPP services in Erlang.
●



    Can be used for inter Erlang programs communication.
●

    Several options for inter applications communications:
         term to binary <-> binary_to_term
     –

         UBF
     –

         ASN.1
     –


                             22
Jabberlang features
      
 ● Auto registration


    Subscriptions management
●


    Roster management
●


    Message and IQ packet support
●




                       23
Jabberlang: Simple echo (library
               version)
 -module(xmpp_echo).

      
 -export([start/1, presence/4, message/7]).

 start(Host) ->

     {ok, XMPP} = xmpp:start(Host),

     xmpp:set_login_information(XMPP, quot;mremondquot;,{password,quot;azertyquot;},quot;ErlangEchoquot;),

     xmpp:set_callback_module(XMPP, ?MODULE),

     xmpp:connect(XMPP).



 %% Ignore presence packets

 presence(_XMPP, _Type, _Attrs, _Elts) ->     ok.



 %% Echo: Reply to messages with the same message

 message(XMPP, Type, From, Subject, Body, Attrs, _Elts) ->

     xmpp:message(XMPP, From, Type, Subject, Body).

                                        24
Jabberlang: Simple echo
     (behaviour and attributes 1/2)
      -module(xmpp_echo_behaviour).
      -behaviour(gen_xmpp_client).

     %% XMPP configuration attributes
     -host(quot;localhostquot;).
     -port(5222).
     -username(quot;mremondquot;).
     -authentication({password,quot;azertyquot;}).
     -resource(quot;Erlang echo behaviourquot;).

     %% Optional:
     -include(quot;xmpp.hrlquot;).

     %% Behaviour callbacks
     -export([init/2,
          presence/4,
          message/7]).

     -export([start/0]).

                                  25
Jabberlang: Simple echo
     (behaviour and attributes 2/2)
      %% Module API
      start() ->
         gen_xmpp_client:start_link(?MODULE, [], []).

     %% gen_xmpp_client callbacks
     init(Args, State) ->
         {ok, State}.

     %% Ignore presence packets
     presence(_XMPP, _Type, _Attrs, _Elts) ->
         ok.

     %% Echo: Reply to messages with the same message
     message(XMPP, Type, From, Subject, Body, Attrs, _Elts) ->
         xmpp:message(XMPP, From, Type, Subject, Body).




                                    26
Jabberlang: Simple echo
  (behaviour and no attributes 1/2)
      
     -module(xmpp_echo_behaviour2).
     -behaviour(gen_xmpp_client).

     %% Optional:
     -include(quot;xmpp.hrlquot;).

     %% Behaviour callbacks
     -export([init/2,
          presence/4,
          message/7]).

     -export([start/0]).




                                 27
Jabberlang: Simple echo
  (behaviour and no attributes 2/2)
      
     %% Module API
     start() ->
         Args = [
             {host, quot;localhostquot;},
             {port, 5222},
             {username, quot;mremondquot;},
             {authentication, {password, quot;azertyquot;}},
             {resource, quot;Echo XMPP behaviour 2quot;}],
         gen_xmpp_client:start_link(?MODULE, Args, []).

     %% gen_xmpp_client callbacks
     init(Args, State) ->
         {ok, State}.

     %% Ignore presence packets
     presence(_XMPP, _Type, _Attrs, _Elts) ->
         ok.

     %% Echo: Reply to messages with the same message
     message(XMPP, Type, From, Subject, Body, Attrs, _Elts) ->
         xmpp:message(XMPP, From, Type, Subject, Body).
                                    28
Using our simple echo client from
          a Jabber client
      




                29
Erlang to Erlang communication
              through XMPP
           launch the Erlang program two time as two
     We
●

     differents resources
    The program receives messages, extracts
●

    Erlang term and increments the value and send
    it back to where it came from, and so on (ping
    – pong).
     {ok, XMPP}   = xmpp_erlang_example:start(quot;pingquot;).
     {ok, XMPP2} = xmpp_erlang_example:start(quot;pongquot;).
     xmpp_erlang_example:initialize_counter_pong(XMPP, 1).


                              30
Erlang to Erlang through XMPP 1/2
-module(xmpp_erlang_example).
-behaviour(gen_xmpp_client).

%% XMPP configuration attributes
-host(quot;localhostquot;).
        
-username(quot;mremondquot;).
-authentication({password,quot;azertyquot;}).

%% Optional:
-include(quot;xmpp.hrlquot;).

%% Behaviour callbacks
-export([init/2,
     presence/4,
     message/7]).

-export([start/1,
     initialize_counter_pong/2]).

%% Module API
start(Resource) ->
    gen_xmpp_client:start_link(?MODULE, [{resource,Resource}], []).

initialize_counter_pong(XMPP, Counter) ->
    xmpp:message(XMPP, quot;mremond@localhost/pongquot;, quot;chatquot;, quot;quot;, encode
(Counter)).
                                    31
Erlang to Erlang through XMPP 2/2
%% gen_xmpp_client callbacks
init(Args, State) ->
    {ok, State}.

%% Ignore presence packets
        
presence(_XMPP, _Type, _Attrs, _Elts) ->
    ok.

%% Reply to increment
message(XMPP, Type, From, Subject, Body, Attrs, _Elts) ->
    Value = decode(Body),
    io:format(quot;Value: ~p~nquot;, [Value]),
    xmpp:message(XMPP, From, Type, Subject, encode(Value+1)).

%% Take term and return encoded string
encode(Term) ->
    httpd_util:encode_base64(binary_to_list(term_to_binary(Term))).

%% Take String and return term
decode(String) ->
    binary_to_term(list_to_binary(httpd_util:decode_base64(String))).




                                   32
      
 Extending the services offered by
     a standard Jabber server




                33
J-EAI: an XMPP based integration
             tool
      
 ● J-EAI is an Enterprise Application

    Integration tool.
    It is intended to control and organize data
●

    streams in a given information system.
    It allow transformation, routing, queueing
●

    of all the data exchanges between
    applications in a given company or outside a
    company.

                       34
J-EAI: an XMPP based integration
             tool
      
 ● J-EAI supports handy features such as:


       Messages trace, to know what is exchanged
   –
       between applications,
       Error message trace (« hospital »), to be able
   –
       to take actions upon message problems,
       Connectors to existing protocols and
   –
       applications,
       Enhanced publish & subscribe mechanism,
   –

       Full control from a central console,
   –


                           35
      
         Integrating XMPP with other
                  applications




                     36
Integration in Web application
    XMPP can turn web applications into event-based systems.
      
●

    You are not anymore limited to pull mode. You can send
    events to the web browser.
    Those features are being implemented as browser
●

    extensions.
    Metafrog, a project tracker platform, will be the test-bed for
●

    this development approach:
         Go to http://metafrog.erlang-projects.org
     –

         Look at light bulbs
     –




                                 37
SIP and XMPP integration
       / XMPP gateway: Running together ejabberd and yxa to
    SIP
●

    share user base and presence information. Can provide:
         Integration between SIP and XMPP client. It could be
     –
         possible to see if someone is one the phone from a Jabber
         client.
         Missed called or voice mail could be moved from the SIP
     –
         protocol to other (mail or XMPP).




                                38
Using XMPP for Erlang distribution
               ?
       XMPP for Erlangrunning through the allow to develop
    Using                    distribution could
●

    distributed applications                    Internet.
    This approach can solve some security aspects: Rosters
●

    configuration can decide if two process are allowed to exchanged
    messages.
    SSL is supported.
●



    Performance penalty: only relevant for non heavy-loaded critical
●

    message passing applications.
    Application design in such a way could switch to Erlang standard
●

    distribution to get more performance.



                                 39
Thank you !
    Alexey Shchepin: Lead ejabberd developer
      
●



    Jonathan Bresler: Benchmarks
●



    Nicolas Niclausse: Benchmarks and lead Tsunami
●

    developer
    Christophe Romain: development on Erlang
●

    REPOS
    Thierry Mallard: Help for the conference
●



    Catherine Mathieu: Help for preparing the Erlang
●

    REPOS EUC 2004 CDROM
                          40
References
      
 ● http://www.jabber.org


    http://www.jabber.org/press/2004-10-04.php
●


    http://ejabberd.jabberstudio.org/
●


    http://www.erlang-projects.org/
●


    Erlang REPOS CDROM (see Erlang-projects
●

    website)



                        41
Messaging with Erlang and Jabber
      




           Questions



               42

More Related Content

What's hot

Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)Sri Prasanna
 
Rpc
RpcRpc
CoAP in Reactive Blocks
CoAP in Reactive BlocksCoAP in Reactive Blocks
CoAP in Reactive Blocks
Bitreactive
 
ACIT Mumbai - OSI Model
ACIT Mumbai - OSI ModelACIT Mumbai - OSI Model
ACIT Mumbai - OSI Model
Sleek International
 
Ds objects and models
Ds objects and modelsDs objects and models
Ds objects and modelsMayank Jain
 
Sanitizing PCAPs
Sanitizing PCAPsSanitizing PCAPs
Sanitizing PCAPs
Jasper Bongertz
 
Improving Robustness In Distributed Systems
Improving Robustness In Distributed SystemsImproving Robustness In Distributed Systems
Improving Robustness In Distributed Systemsl xf
 
Introduction to Remote Procedure Call
Introduction to Remote Procedure CallIntroduction to Remote Procedure Call
Introduction to Remote Procedure CallAbdelrahman Al-Ogail
 
Rpc
RpcRpc
Zero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with NettyZero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with NettyDaniel Bimschas
 
A Short Java Socket Tutorial
A Short Java Socket TutorialA Short Java Socket Tutorial
A Short Java Socket TutorialGuo Albert
 
RfC2822 for Mere Mortals
RfC2822 for Mere MortalsRfC2822 for Mere Mortals
RfC2822 for Mere Mortals
Schalk Cronjé
 
IoT Coap
IoT Coap IoT Coap
IoT Coap
Rajanikanth U
 
Network protocols and Java programming
Network protocols and Java programmingNetwork protocols and Java programming
Network protocols and Java programming
difatta
 
IoT Studio #1: Protocols introduction and connected jukebox
IoT Studio #1: Protocols introduction and connected jukeboxIoT Studio #1: Protocols introduction and connected jukebox
IoT Studio #1: Protocols introduction and connected jukebox
Mickaël Rémond
 
Network programming in Java
Network programming in JavaNetwork programming in Java
Network programming in Java
Tushar B Kute
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
Sunita Sahu
 
Grokking TechTalk #16: React stack at lozi
Grokking TechTalk #16: React stack at loziGrokking TechTalk #16: React stack at lozi
Grokking TechTalk #16: React stack at lozi
Grokking VN
 
Teach your (micro)services talk Protocol Buffers with gRPC.
Teach your (micro)services talk Protocol Buffers with gRPC.Teach your (micro)services talk Protocol Buffers with gRPC.
Teach your (micro)services talk Protocol Buffers with gRPC.
Mihai Iachimovschi
 

What's hot (20)

Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)
 
Rpc
RpcRpc
Rpc
 
CoAP in Reactive Blocks
CoAP in Reactive BlocksCoAP in Reactive Blocks
CoAP in Reactive Blocks
 
ACIT Mumbai - OSI Model
ACIT Mumbai - OSI ModelACIT Mumbai - OSI Model
ACIT Mumbai - OSI Model
 
Ds objects and models
Ds objects and modelsDs objects and models
Ds objects and models
 
Sanitizing PCAPs
Sanitizing PCAPsSanitizing PCAPs
Sanitizing PCAPs
 
Improving Robustness In Distributed Systems
Improving Robustness In Distributed SystemsImproving Robustness In Distributed Systems
Improving Robustness In Distributed Systems
 
Introduction to Remote Procedure Call
Introduction to Remote Procedure CallIntroduction to Remote Procedure Call
Introduction to Remote Procedure Call
 
Rpc
RpcRpc
Rpc
 
Zero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with NettyZero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with Netty
 
A Short Java Socket Tutorial
A Short Java Socket TutorialA Short Java Socket Tutorial
A Short Java Socket Tutorial
 
RfC2822 for Mere Mortals
RfC2822 for Mere MortalsRfC2822 for Mere Mortals
RfC2822 for Mere Mortals
 
IoT Coap
IoT Coap IoT Coap
IoT Coap
 
Network protocols and Java programming
Network protocols and Java programmingNetwork protocols and Java programming
Network protocols and Java programming
 
IoT Studio #1: Protocols introduction and connected jukebox
IoT Studio #1: Protocols introduction and connected jukeboxIoT Studio #1: Protocols introduction and connected jukebox
IoT Studio #1: Protocols introduction and connected jukebox
 
Sockets
SocketsSockets
Sockets
 
Network programming in Java
Network programming in JavaNetwork programming in Java
Network programming in Java
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
 
Grokking TechTalk #16: React stack at lozi
Grokking TechTalk #16: React stack at loziGrokking TechTalk #16: React stack at lozi
Grokking TechTalk #16: React stack at lozi
 
Teach your (micro)services talk Protocol Buffers with gRPC.
Teach your (micro)services talk Protocol Buffers with gRPC.Teach your (micro)services talk Protocol Buffers with gRPC.
Teach your (micro)services talk Protocol Buffers with gRPC.
 

Viewers also liked

Erlang - Because s**t Happens by Mahesh Paolini-Subramanya
Erlang - Because s**t Happens by Mahesh Paolini-SubramanyaErlang - Because s**t Happens by Mahesh Paolini-Subramanya
Erlang - Because s**t Happens by Mahesh Paolini-Subramanya
Hakka Labs
 
Winning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test CycleWinning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test Cycle
Rusty Klophaus
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
JAX London
 
Elixir talk
Elixir talkElixir talk
Elixir talk
Cory Gwin
 
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)
Pavlo Baron
 
20 reasons why we don't need architects (@pavlobaron)
20 reasons why we don't need architects (@pavlobaron)20 reasons why we don't need architects (@pavlobaron)
20 reasons why we don't need architects (@pavlobaron)
Pavlo Baron
 
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Howard Lewis Ship
 
From Perl To Elixir
From Perl To ElixirFrom Perl To Elixir
From Perl To Elixir
Ruben Amortegui
 
VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012
Eonblast
 
NDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Erlang Patterns Matching Business NeedsNDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Erlang Patterns Matching Business Needs
Torben Hoffmann
 
Introduction to Erlang for Python Programmers
Introduction to Erlang for Python ProgrammersIntroduction to Erlang for Python Programmers
Introduction to Erlang for Python Programmers
Python Ireland
 
Clojure Intro
Clojure IntroClojure Intro
Clojure Intro
thnetos
 
Elixir for aspiring Erlang developers
Elixir for aspiring Erlang developersElixir for aspiring Erlang developers
Elixir for aspiring Erlang developers
Torben Dohrn
 
Elixir Into Production
Elixir Into ProductionElixir Into Production
Elixir Into Production
Jamie Winsor
 
Erlang - Because S**t Happens
Erlang - Because S**t HappensErlang - Because S**t Happens
Erlang - Because S**t Happens
Mahesh Paolini-Subramanya
 
Clojure: Towards The Essence of Programming
Clojure: Towards The Essence of ProgrammingClojure: Towards The Essence of Programming
Clojure: Towards The Essence of Programming
Howard Lewis Ship
 
Clojure, Plain and Simple
Clojure, Plain and SimpleClojure, Plain and Simple
Clojure, Plain and Simple
Ben Mabey
 

Viewers also liked (20)

Erlang - Because s**t Happens by Mahesh Paolini-Subramanya
Erlang - Because s**t Happens by Mahesh Paolini-SubramanyaErlang - Because s**t Happens by Mahesh Paolini-Subramanya
Erlang - Because s**t Happens by Mahesh Paolini-Subramanya
 
Winning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test CycleWinning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test Cycle
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
 
Elixir talk
Elixir talkElixir talk
Elixir talk
 
Clojure class
Clojure classClojure class
Clojure class
 
Clojure values
Clojure valuesClojure values
Clojure values
 
High Performance Erlang
High  Performance  ErlangHigh  Performance  Erlang
High Performance Erlang
 
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)
 
20 reasons why we don't need architects (@pavlobaron)
20 reasons why we don't need architects (@pavlobaron)20 reasons why we don't need architects (@pavlobaron)
20 reasons why we don't need architects (@pavlobaron)
 
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
 
From Perl To Elixir
From Perl To ElixirFrom Perl To Elixir
From Perl To Elixir
 
VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012
 
NDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Erlang Patterns Matching Business NeedsNDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Erlang Patterns Matching Business Needs
 
Introduction to Erlang for Python Programmers
Introduction to Erlang for Python ProgrammersIntroduction to Erlang for Python Programmers
Introduction to Erlang for Python Programmers
 
Clojure Intro
Clojure IntroClojure Intro
Clojure Intro
 
Elixir for aspiring Erlang developers
Elixir for aspiring Erlang developersElixir for aspiring Erlang developers
Elixir for aspiring Erlang developers
 
Elixir Into Production
Elixir Into ProductionElixir Into Production
Elixir Into Production
 
Erlang - Because S**t Happens
Erlang - Because S**t HappensErlang - Because S**t Happens
Erlang - Because S**t Happens
 
Clojure: Towards The Essence of Programming
Clojure: Towards The Essence of ProgrammingClojure: Towards The Essence of Programming
Clojure: Towards The Essence of Programming
 
Clojure, Plain and Simple
Clojure, Plain and SimpleClojure, Plain and Simple
Clojure, Plain and Simple
 

Similar to Messaging With Erlang And Jabber

Ejabberd with xmpp
Ejabberd with xmppEjabberd with xmpp
Ejabberd with xmpp
Prem Narain
 
Chat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIPChat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIP
Genora Infotech
 
Xmpp presentation
Xmpp   presentationXmpp   presentation
Xmpp presentation
javaranger123
 
Ejabberd Session
Ejabberd SessionEjabberd Session
Ejabberd Session
Kunal Saxena
 
An eclipse client server architecture with asynchronous messaging
An eclipse client server architecture with asynchronous messagingAn eclipse client server architecture with asynchronous messaging
An eclipse client server architecture with asynchronous messagingThomas Kratz
 
A vision for ejabberd - ejabberd SF Meetup
A vision for ejabberd - ejabberd SF MeetupA vision for ejabberd - ejabberd SF Meetup
A vision for ejabberd - ejabberd SF Meetup
Mickaël Rémond
 
Xmpp presentation
Xmpp presentationXmpp presentation
Xmpp presentation
Java Pro
 
Jabber is more than instant messaging
Jabber is more than instant messagingJabber is more than instant messaging
Jabber is more than instant messagingFlorian Holzhauer
 
Extensible Messaging and Presence Protocol (XMPP) with GCM
Extensible Messaging and Presence Protocol (XMPP) with GCMExtensible Messaging and Presence Protocol (XMPP) with GCM
Extensible Messaging and Presence Protocol (XMPP) with GCM
Malwinder Singh
 
XML-RPC and SOAP (April 2003)
XML-RPC and SOAP (April 2003)XML-RPC and SOAP (April 2003)
XML-RPC and SOAP (April 2003)
Kiran Jonnalagadda
 
XMPP Academy #1
XMPP Academy #1XMPP Academy #1
XMPP Academy #1
Mickaël Rémond
 
Microblogging via XMPP
Microblogging via XMPPMicroblogging via XMPP
Microblogging via XMPPStoyan Zhekov
 
Nimbuzz march2012
Nimbuzz march2012Nimbuzz march2012
Nimbuzz march2012
nlwebperf
 
XMPP Intro 1101 - 2008
XMPP Intro 1101 - 2008XMPP Intro 1101 - 2008
XMPP Intro 1101 - 2008
Steffen Larsen
 
Linked Process
Linked ProcessLinked Process
Linked Process
Joshua Shinavier
 
Rails hosting
Rails hostingRails hosting
Rails hosting
wonko
 
XMPP-IoT Protocol designed mainly to send mesages
XMPP-IoT Protocol designed mainly to send mesagesXMPP-IoT Protocol designed mainly to send mesages
XMPP-IoT Protocol designed mainly to send mesages
ssuserd1be3f1
 
Performance Evaluation of XMPP on the Web
Performance Evaluation of XMPP on the WebPerformance Evaluation of XMPP on the Web
Performance Evaluation of XMPP on the Web
Markku Laine
 
Use perl creating web services with xml rpc
Use perl creating web services with xml rpcUse perl creating web services with xml rpc
Use perl creating web services with xml rpcJohnny Pork
 

Similar to Messaging With Erlang And Jabber (20)

Ejabberd with xmpp
Ejabberd with xmppEjabberd with xmpp
Ejabberd with xmpp
 
Chat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIPChat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIP
 
Xmpp presentation
Xmpp   presentationXmpp   presentation
Xmpp presentation
 
Ejabberd Session
Ejabberd SessionEjabberd Session
Ejabberd Session
 
An eclipse client server architecture with asynchronous messaging
An eclipse client server architecture with asynchronous messagingAn eclipse client server architecture with asynchronous messaging
An eclipse client server architecture with asynchronous messaging
 
A vision for ejabberd - ejabberd SF Meetup
A vision for ejabberd - ejabberd SF MeetupA vision for ejabberd - ejabberd SF Meetup
A vision for ejabberd - ejabberd SF Meetup
 
Xmpp presentation
Xmpp presentationXmpp presentation
Xmpp presentation
 
Jabber is more than instant messaging
Jabber is more than instant messagingJabber is more than instant messaging
Jabber is more than instant messaging
 
Extensible Messaging and Presence Protocol (XMPP) with GCM
Extensible Messaging and Presence Protocol (XMPP) with GCMExtensible Messaging and Presence Protocol (XMPP) with GCM
Extensible Messaging and Presence Protocol (XMPP) with GCM
 
XML-RPC and SOAP (April 2003)
XML-RPC and SOAP (April 2003)XML-RPC and SOAP (April 2003)
XML-RPC and SOAP (April 2003)
 
XMPP Academy #1
XMPP Academy #1XMPP Academy #1
XMPP Academy #1
 
Microblogging via XMPP
Microblogging via XMPPMicroblogging via XMPP
Microblogging via XMPP
 
Nimbuzz march2012
Nimbuzz march2012Nimbuzz march2012
Nimbuzz march2012
 
Tbp
TbpTbp
Tbp
 
XMPP Intro 1101 - 2008
XMPP Intro 1101 - 2008XMPP Intro 1101 - 2008
XMPP Intro 1101 - 2008
 
Linked Process
Linked ProcessLinked Process
Linked Process
 
Rails hosting
Rails hostingRails hosting
Rails hosting
 
XMPP-IoT Protocol designed mainly to send mesages
XMPP-IoT Protocol designed mainly to send mesagesXMPP-IoT Protocol designed mainly to send mesages
XMPP-IoT Protocol designed mainly to send mesages
 
Performance Evaluation of XMPP on the Web
Performance Evaluation of XMPP on the WebPerformance Evaluation of XMPP on the Web
Performance Evaluation of XMPP on the Web
 
Use perl creating web services with xml rpc
Use perl creating web services with xml rpcUse perl creating web services with xml rpc
Use perl creating web services with xml rpc
 

More from l xf

Asynchronous Io Programming
Asynchronous Io ProgrammingAsynchronous Io Programming
Asynchronous Io Programmingl xf
 
The Proactor Pattern
The Proactor PatternThe Proactor Pattern
The Proactor Patternl xf
 
Scalable Networking
Scalable NetworkingScalable Networking
Scalable Networkingl xf
 
Erlang Message Passing Concurrency, For The Win
Erlang  Message  Passing  Concurrency,  For  The  WinErlang  Message  Passing  Concurrency,  For  The  Win
Erlang Message Passing Concurrency, For The Winl xf
 
Stackless Python In Eve
Stackless Python In EveStackless Python In Eve
Stackless Python In Evel xf
 
Comparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms SoftwareComparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms Softwarel xf
 
Concurrency And Erlang
Concurrency And ErlangConcurrency And Erlang
Concurrency And Erlangl xf
 
Learning Erlang And Developing A Sip Server Stack With 30k Potential Users
Learning Erlang And Developing A Sip Server Stack With 30k Potential UsersLearning Erlang And Developing A Sip Server Stack With 30k Potential Users
Learning Erlang And Developing A Sip Server Stack With 30k Potential Usersl xf
 
A Virtual World Distributed Server Developed In Erlang As A Tool For Analysin...
A Virtual World Distributed Server Developed In Erlang As A Tool For Analysin...A Virtual World Distributed Server Developed In Erlang As A Tool For Analysin...
A Virtual World Distributed Server Developed In Erlang As A Tool For Analysin...l xf
 

More from l xf (9)

Asynchronous Io Programming
Asynchronous Io ProgrammingAsynchronous Io Programming
Asynchronous Io Programming
 
The Proactor Pattern
The Proactor PatternThe Proactor Pattern
The Proactor Pattern
 
Scalable Networking
Scalable NetworkingScalable Networking
Scalable Networking
 
Erlang Message Passing Concurrency, For The Win
Erlang  Message  Passing  Concurrency,  For  The  WinErlang  Message  Passing  Concurrency,  For  The  Win
Erlang Message Passing Concurrency, For The Win
 
Stackless Python In Eve
Stackless Python In EveStackless Python In Eve
Stackless Python In Eve
 
Comparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms SoftwareComparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms Software
 
Concurrency And Erlang
Concurrency And ErlangConcurrency And Erlang
Concurrency And Erlang
 
Learning Erlang And Developing A Sip Server Stack With 30k Potential Users
Learning Erlang And Developing A Sip Server Stack With 30k Potential UsersLearning Erlang And Developing A Sip Server Stack With 30k Potential Users
Learning Erlang And Developing A Sip Server Stack With 30k Potential Users
 
A Virtual World Distributed Server Developed In Erlang As A Tool For Analysin...
A Virtual World Distributed Server Developed In Erlang As A Tool For Analysin...A Virtual World Distributed Server Developed In Erlang As A Tool For Analysin...
A Virtual World Distributed Server Developed In Erlang As A Tool For Analysin...
 

Recently uploaded

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 

Messaging With Erlang And Jabber

  • 1. Messaging with Erlang and Jabber Erlang User Conference '04 21st. October 2004 Mickaël Rémond <mickael.remond@erlang-fr.org> www.erlang-projects.org
  • 2. What are XMPP and Jabber ? XMPP stands for eXtensible Messaging & Presence Protocol        ● XMPP is a generic and extensible messaging protocol based on ● XML. It is now an IETF standard Jabber is an Instant Messaging protocol that rely on XMPP ● Very active community: ● Several server implementations of XMPP and Jabber – Several client software and libraries – 2
  • 3. What does the XMPP protocol looks like ? Interleaved XML document        ● streams: Client and serverstreams form an XML document. First level tag: <stream> ● Three types of second levels tags: ● message: asynchronous – communications iq: Synchronous – communications presence: presence and status – data 3
  • 4. Example XMPP telnet session        0: telnet Step localhost 5222 Step 1: Open XMPP stream Client sends: <?xml version='1.0'?> <stream:stream xmlns:stream=quot;http://etherx.jabber.org/streamsquot; to=quot;localhostquot; xmlns=quot;jabber:clientquot;> Server answers: <?xml version='1.0'?> <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3694886828' from='localhost'> 4
  • 5. Example XMPP telnet session        2: Login Step Client send login informations: <iq type='set' id='auth'> <query xmlns='jabber:iq:auth'> <username>mremond</username> <password>azerty</password> <resource>TelnetClient</resource></query></iq> Server confirms login: <iq type='result' id='auth'/> 5
  • 6. Example XMPP telnet session        2: Login Step The server can returns an error on failed authentication for example: <iq type='error' id='auth'> <query xmlns='jabber:iq:auth'> <username>mremond</username> <password>D</password> <resource>TelnetClient</resource></query> <error code='401' type='auth'> <not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> </error></iq> 6
  • 7. Example XMPP telnet session        3: Presence Step Client sends presence data <presence/> If applications in our client roster are online, our telnet client receives presence packets: <presence from='mremond5@localhost/tkabber' to='mremond@localhost/TelnetClient'> <priority>8</priority> </presence> 7
  • 8. Example XMPP telnet session        3: Presence Step From here, our telnet client is visible online by other clients: 8
  • 9. Example XMPP telnet session        4: Sending a message Step Client sends a message to another user / application: <message to='mremond5@localhost'> <subject>Hello</subject> <body>I am chatting with a Telnet client ! </body> </message> No answer from the server 9
  • 10. Example XMPP telnet session        5: Receiving a message Step We can receive messages from other clients: <message from='mremond5@localhost/tkabber' to='mremond@localhost/TelnetClient' type='chat' xml:lang='fr-FR'> <body>Answer from the other side</body> <x xmlns='jabber:x:event'> <offline/> <delivered/> <displayed/> <composing/> </x></message> 10
  • 11. Example XMPP telnet session        6: Presence update Step Presence informations are updated (For example here, when a user in our roster disconnect): <presence from='mremond5@localhost/tkabber' to='mremond@localhost/TelnetClient' type='unavailable'/> 11
  • 12. Example XMPP telnet session        7: Closing the XML stream Step Client closes XML client stream tag (This end a valid XML document): </stream:stream> Server then closes XML stream tag and disconnect (This end the second XML document): </stream:stream> 12
  • 13. XMPP bus design XMPP rely on a naturally distributed architecture (No central server !)        ● Includes server to server communications (with domain routing – between servers) Includes gateways to various other protocols – 13
  • 14. XMPP protocol extensions XMPP is an extensible protocol (with XML namespaces) that        ● supports many interesting features: Service discovery and browsing – Publish & Subscribe: Allow 1 to n communications. – Reliable messages: can add confirmations delivery. – Message queues for offline applications and messages – expiration. Users or applications search. – Geolocalisation. – Message archiving. – ... – 14
  • 15. Fun things to do with XMPP and Erlang Implementation: XMPP and Jabber servers are massively concurrent: a        ● Jabber server must handle huge community of users. A Jabber server in Erlang makes sense to handle massive concurrency. – – It can prove Erlang reliability, scalability, ability to handle concurrency Extensions: XMPP server protocol is build around a complete XML API for ● client to server and server to server communications: Developping Erlang software agents that plug on the bus is easy: – Erlang expressiveness. – It allows to use the bus as a mediation layer between Erlang and non- Erlang software (Kind of web service but more simple and powerful) – Several levels of interaction for Erlang-based extensions: Plug-in in the XMPP bus with a service protocol or XMPP client connected to the bus (client protocol) Use: XMPP can be used as an instant messaging platform or integrated with ● other communication services. 15
  • 16.        Implementing an XMPP server in Erlang 16
  • 17. ejabberd ejabberd is an Erlang-based XMPP server implementation.        ● It has been designed to support clustering, fault-tolerance and high- ● availability. It supports many features and extensions of the Jabber protocol: ● Built-in Multi-User Chat service – Distributed database (Mnesia) – Built-in IRC transport – Built-in Publish-Subscribe service – Support for LDAP authentification – Service discovery – It is more scalable than the most used open source implementation (Jabberd1.4 ● and Jabber2). 17
  • 18. Benchmarks: how does ejabberd perform ? Jabber benchmarks realized with the Tsunami benchmarking        ● tool. Ejabberd performs very well: ● It can route more than 2000 simple messages per – second (on a single CPU 1,5 Ghz machine). It can handle a huge number of concurrent users on a – single machine (Has reached 7000 users connected without troubles. We need to push the test further). This good performance is achieved while being the most – featureful and stable server XMPP. ejabberd design can be improved to achieve better – performance. 18
  • 19. ejabberd to send short messages simultaneous users Delay        Response time and connection establishement 19
  • 20. The benchmark server        ● CPU: Bi-Xeon 2,4 Ghz Ram: 1 Go ● Operating System: Linux ● Note: The second CPU was not used as only one ejabberd instance was running on the server. 20
  • 21.        Developing XMPP clients in Erlang 21
  • 22. Jabberlang: Helper library to write XMPP client in Erlang Jabberlang is a client library to write XMPP client in        ● Erlang. It can be used both a library or as Erlang behaviour. ● It allow to write XMPP services in Erlang. ● Can be used for inter Erlang programs communication. ● Several options for inter applications communications: term to binary <-> binary_to_term – UBF – ASN.1 – 22
  • 23. Jabberlang features        ● Auto registration Subscriptions management ● Roster management ● Message and IQ packet support ● 23
  • 24. Jabberlang: Simple echo (library version) -module(xmpp_echo).        -export([start/1, presence/4, message/7]). start(Host) -> {ok, XMPP} = xmpp:start(Host), xmpp:set_login_information(XMPP, quot;mremondquot;,{password,quot;azertyquot;},quot;ErlangEchoquot;), xmpp:set_callback_module(XMPP, ?MODULE), xmpp:connect(XMPP). %% Ignore presence packets presence(_XMPP, _Type, _Attrs, _Elts) -> ok. %% Echo: Reply to messages with the same message message(XMPP, Type, From, Subject, Body, Attrs, _Elts) -> xmpp:message(XMPP, From, Type, Subject, Body). 24
  • 25. Jabberlang: Simple echo (behaviour and attributes 1/2)       -module(xmpp_echo_behaviour). -behaviour(gen_xmpp_client). %% XMPP configuration attributes -host(quot;localhostquot;). -port(5222). -username(quot;mremondquot;). -authentication({password,quot;azertyquot;}). -resource(quot;Erlang echo behaviourquot;). %% Optional: -include(quot;xmpp.hrlquot;). %% Behaviour callbacks -export([init/2, presence/4, message/7]). -export([start/0]). 25
  • 26. Jabberlang: Simple echo (behaviour and attributes 2/2)       %% Module API start() -> gen_xmpp_client:start_link(?MODULE, [], []). %% gen_xmpp_client callbacks init(Args, State) -> {ok, State}. %% Ignore presence packets presence(_XMPP, _Type, _Attrs, _Elts) -> ok. %% Echo: Reply to messages with the same message message(XMPP, Type, From, Subject, Body, Attrs, _Elts) -> xmpp:message(XMPP, From, Type, Subject, Body). 26
  • 27. Jabberlang: Simple echo (behaviour and no attributes 1/2)        -module(xmpp_echo_behaviour2). -behaviour(gen_xmpp_client). %% Optional: -include(quot;xmpp.hrlquot;). %% Behaviour callbacks -export([init/2, presence/4, message/7]). -export([start/0]). 27
  • 28. Jabberlang: Simple echo (behaviour and no attributes 2/2)        %% Module API start() -> Args = [ {host, quot;localhostquot;}, {port, 5222}, {username, quot;mremondquot;}, {authentication, {password, quot;azertyquot;}}, {resource, quot;Echo XMPP behaviour 2quot;}], gen_xmpp_client:start_link(?MODULE, Args, []). %% gen_xmpp_client callbacks init(Args, State) -> {ok, State}. %% Ignore presence packets presence(_XMPP, _Type, _Attrs, _Elts) -> ok. %% Echo: Reply to messages with the same message message(XMPP, Type, From, Subject, Body, Attrs, _Elts) -> xmpp:message(XMPP, From, Type, Subject, Body). 28
  • 29. Using our simple echo client from a Jabber client        29
  • 30. Erlang to Erlang communication through XMPP        launch the Erlang program two time as two We ● differents resources The program receives messages, extracts ● Erlang term and increments the value and send it back to where it came from, and so on (ping – pong). {ok, XMPP} = xmpp_erlang_example:start(quot;pingquot;). {ok, XMPP2} = xmpp_erlang_example:start(quot;pongquot;). xmpp_erlang_example:initialize_counter_pong(XMPP, 1). 30
  • 31. Erlang to Erlang through XMPP 1/2 -module(xmpp_erlang_example). -behaviour(gen_xmpp_client). %% XMPP configuration attributes -host(quot;localhostquot;).        -username(quot;mremondquot;). -authentication({password,quot;azertyquot;}). %% Optional: -include(quot;xmpp.hrlquot;). %% Behaviour callbacks -export([init/2, presence/4, message/7]). -export([start/1, initialize_counter_pong/2]). %% Module API start(Resource) -> gen_xmpp_client:start_link(?MODULE, [{resource,Resource}], []). initialize_counter_pong(XMPP, Counter) -> xmpp:message(XMPP, quot;mremond@localhost/pongquot;, quot;chatquot;, quot;quot;, encode (Counter)). 31
  • 32. Erlang to Erlang through XMPP 2/2 %% gen_xmpp_client callbacks init(Args, State) -> {ok, State}. %% Ignore presence packets        presence(_XMPP, _Type, _Attrs, _Elts) -> ok. %% Reply to increment message(XMPP, Type, From, Subject, Body, Attrs, _Elts) -> Value = decode(Body), io:format(quot;Value: ~p~nquot;, [Value]), xmpp:message(XMPP, From, Type, Subject, encode(Value+1)). %% Take term and return encoded string encode(Term) -> httpd_util:encode_base64(binary_to_list(term_to_binary(Term))). %% Take String and return term decode(String) -> binary_to_term(list_to_binary(httpd_util:decode_base64(String))). 32
  • 33.        Extending the services offered by a standard Jabber server 33
  • 34. J-EAI: an XMPP based integration tool        ● J-EAI is an Enterprise Application Integration tool. It is intended to control and organize data ● streams in a given information system. It allow transformation, routing, queueing ● of all the data exchanges between applications in a given company or outside a company. 34
  • 35. J-EAI: an XMPP based integration tool        ● J-EAI supports handy features such as: Messages trace, to know what is exchanged – between applications, Error message trace (« hospital »), to be able – to take actions upon message problems, Connectors to existing protocols and – applications, Enhanced publish & subscribe mechanism, – Full control from a central console, – 35
  • 36.        Integrating XMPP with other applications 36
  • 37. Integration in Web application XMPP can turn web applications into event-based systems.        ● You are not anymore limited to pull mode. You can send events to the web browser. Those features are being implemented as browser ● extensions. Metafrog, a project tracker platform, will be the test-bed for ● this development approach: Go to http://metafrog.erlang-projects.org – Look at light bulbs – 37
  • 38. SIP and XMPP integration        / XMPP gateway: Running together ejabberd and yxa to SIP ● share user base and presence information. Can provide: Integration between SIP and XMPP client. It could be – possible to see if someone is one the phone from a Jabber client. Missed called or voice mail could be moved from the SIP – protocol to other (mail or XMPP). 38
  • 39. Using XMPP for Erlang distribution ?        XMPP for Erlangrunning through the allow to develop Using distribution could ● distributed applications Internet. This approach can solve some security aspects: Rosters ● configuration can decide if two process are allowed to exchanged messages. SSL is supported. ● Performance penalty: only relevant for non heavy-loaded critical ● message passing applications. Application design in such a way could switch to Erlang standard ● distribution to get more performance. 39
  • 40. Thank you ! Alexey Shchepin: Lead ejabberd developer        ● Jonathan Bresler: Benchmarks ● Nicolas Niclausse: Benchmarks and lead Tsunami ● developer Christophe Romain: development on Erlang ● REPOS Thierry Mallard: Help for the conference ● Catherine Mathieu: Help for preparing the Erlang ● REPOS EUC 2004 CDROM 40
  • 41. References        ● http://www.jabber.org http://www.jabber.org/press/2004-10-04.php ● http://ejabberd.jabberstudio.org/ ● http://www.erlang-projects.org/ ● Erlang REPOS CDROM (see Erlang-projects ● website) 41
  • 42. Messaging with Erlang and Jabber        Questions 42