Erlang and XMPP can be used together in several ways:
1. Erlang is well-suited for implementing XMPP servers due to its high concurrency and reliability. ejabberd is an example of a popular Erlang XMPP server.
2. The XMPP protocol can be used to connect Erlang applications and allow them to communicate over the XMPP network. Libraries like Jabberlang facilitate writing Erlang XMPP clients.
3. XMPP provides a flexible messaging backbone that can be extended using Erlang modules. This allows Erlang code to integrate with and enhance standard XMPP server functionality.
Master Class : TCP/IP Mechanics from Scratch to ExpertAbhishek Sagar
This is Master Class course on TCP/IP protocol - Transmission Control Protocol. Since it is Master Class course, this course discusses the internal design and functioning of complex transport layer protocol - TCP.
Almost all traffic on internet today is transported by TCP protocol. TCP, as where it stands today, mature and solid, is the result of over 25 yrs of research by network gurus. TCP is complicated and difficult to understand, therefore i have paid utmost attention to present the concept in most simplest way as possible without any loss of information.
Overview of the Sun Remote Procedure Call (ONC RPC) technology
RPC allows a client application to call procedures in a different address space on the same or on a remote machine (= transfer of control and data to a different address space and process).
This means that RPC extends sockets with remote procedure call semantics. Thus RPC is an early approach for distributed applications.
Different flavors of RPC evolved over time. An early standard was set forth by Sun Microsystems with ONC RPC. It is defined in RFC1057 (protocol) and RFC4506 (XDR - data presentation).
The binder (formerly portmapper) is a central component of the RPC architecture. It is a deamon that serves as a registry for registering server procedures and allows a client to lookup procedures for being called remotely.
RPC defines three different call semantics. Maybe call semantics mean that a request may be lost without further notice by the RPC system. For applications requiring higher quality of service, at-least-once call semantics ensure that the call is successfully executed at least once. However, the call may be duplicated in case of packet loss. Exactly-once call semantics provide assurance that the call is executed at least and at most once.
Remote procedure call on client server computingSatya P. Joshi
Remote procedure call on client server computing, what is Remote procedure call on client server computing, Remote procedure call on java, Remote procedure call on client server computing
Master Class : TCP/IP Mechanics from Scratch to ExpertAbhishek Sagar
This is Master Class course on TCP/IP protocol - Transmission Control Protocol. Since it is Master Class course, this course discusses the internal design and functioning of complex transport layer protocol - TCP.
Almost all traffic on internet today is transported by TCP protocol. TCP, as where it stands today, mature and solid, is the result of over 25 yrs of research by network gurus. TCP is complicated and difficult to understand, therefore i have paid utmost attention to present the concept in most simplest way as possible without any loss of information.
Overview of the Sun Remote Procedure Call (ONC RPC) technology
RPC allows a client application to call procedures in a different address space on the same or on a remote machine (= transfer of control and data to a different address space and process).
This means that RPC extends sockets with remote procedure call semantics. Thus RPC is an early approach for distributed applications.
Different flavors of RPC evolved over time. An early standard was set forth by Sun Microsystems with ONC RPC. It is defined in RFC1057 (protocol) and RFC4506 (XDR - data presentation).
The binder (formerly portmapper) is a central component of the RPC architecture. It is a deamon that serves as a registry for registering server procedures and allows a client to lookup procedures for being called remotely.
RPC defines three different call semantics. Maybe call semantics mean that a request may be lost without further notice by the RPC system. For applications requiring higher quality of service, at-least-once call semantics ensure that the call is successfully executed at least once. However, the call may be duplicated in case of packet loss. Exactly-once call semantics provide assurance that the call is executed at least and at most once.
Remote procedure call on client server computingSatya P. Joshi
Remote procedure call on client server computing, what is Remote procedure call on client server computing, Remote procedure call on java, Remote procedure call on client server computing
Slides for my 32C3 (Chaos Computer Congress 2015) talk about how to sanitize and anonymize binary packet capture files (PCAP/PCAPng). The talk video recording can be found here: https://media.ccc.de/v/32c3-7294-sanitizing_pcaps#download
Remote Procedure Call (RPC) is a protocol that one program can use to request a service from a program located in another computer in a network without having to understand network details. (A procedure call is also sometimes known as a function call or a subroutine call.) RPC uses the client/server model. The requesting program is a client and the service-providing program is the server. Like a regular or local procedure call, an RPC is a synchronous operation requiring the requesting program to be suspended until the results of the remote procedure are returned. However, the use of lightweight processes or threads that share the same address space allows multiple RPCs to be performed concurrently.
This is a presentation I did years ago, but I heard that there are still people using it as a reference. So here it is, slightly cleaned up. If you are writing systems that process email addresses in some form or anotehr you might want to read this.
IoT Studio #1: Protocols introduction and connected jukeboxMickaël Rémond
This is the slides ProcessOne IoT Studio session #1.
At the core of the discussion is an introduction to Internet of Things protocols.
Here are the topics / questions that I have been addressing:
- What are the main classes of protocols for the Internet of Things ?
- What are the strengths of XMPP for the Internet of things ?
- What are the main XMPP Extensions for building the Internet of Things ?
- How can I leverage XMPP to build a real device / appliance ?
As such, the session ends with a hands-on demonstration of a Soundcloud connected Jukebox built with:
- Raspberry Pi 2
- Connected to ejabberd
- Client is developed in Go using Go XMPP library Gox
Video of the session is available on Youtube: https://www.youtube.com/watch?v=YtommTbCxCc
The Presentation given at Guru Gobind Singh Polytechnic, Nashik for Third Year Information Technology and Computer Engineering Students on 08/02/2011.
Topic: Java Network Programming
Grokking TechTalk #16: React stack at loziGrokking VN
Speaker: Thinh Nguyen - Web Developer @ Lozi.vn
Bio: I don't know what I've done, but people keep blaming me when they can't access the website ¯\_(ツ)_/¯
Description: How we build Lozi website with React and a team of 2
Teach your (micro)services talk Protocol Buffers with gRPC.Mihai Iachimovschi
When it comes to microservices, there’re a lot of things worth keeping in mind. Designing such fine-grained, loosely-coupled services requires paying lots of attention to various patterns and approaches to make them future-proof. A very important thing to consider, is the way those services will communicate with each-other in production. Usually the communication is done over the network using a technology-agnostic protocol. At the next level the service should provide an API for its friend services. Then, the data should be serialized without altering its meaning and transferred to the picked endpoint.
Nowadays, exposing a REST API that operates with JSON over plain HTTP is a usual way to lay the grounds of communication for the services. It is easy to accomplish, but it has some drawbacks. First of all, JSON is a human readable format, and it’s not as other serialization approaches. Also, with JSON it’s not possible to natively enforce the schema, and evolving the API may be painful.
This talk’s purpose is to describe in deep detail the benefits of protocol buffers, that offer us for free an easy way to define the API messages in the proto format, and then reuse them inside different services, without even being locked to use the same programming language for them. Moreover, with gRPC we can define the API’s endpoints easily in the same proto format. All these offer us a robust schema enforcement, compact binary serialization, and easy backward compatibility.
Erlang - Because s**t Happens by Mahesh Paolini-SubramanyaHakka Labs
Mahesh talks about the buddha-nature of Erlang/OTP, pointing out how the various features of the language tie together into one seamless Fault Tolerant whole. Mahesh emphasizes that Erlang begins and ends with Fault Tolerance. Fault Tolerance is baked into the very genes of Erlang/OTP - something that ends up being amazingly useful when building any kind of system. Mahesh Paolini-Subramanya is the V.P. of R&D at Ubiquiti Networks - a manufacturer of disruptive technology platforms for emerging markets. He has spent the recent past building out Erlang-based massively concurrent Cloud Services and VoIP platforms. Mahesh was previously the CTO of Vocalocity after its merger with Aptela, where he was a founder and CTO.
Having a fast, low-friction Edit/Build/Test cycle is one of the best and easiest ways to increase developer productivity across an organization.
This breadth-first tour covers some of the tools we use at Basho to speed up and streamline the Edit/Build/Test cycle for our Erlang projects.
Slides for my 32C3 (Chaos Computer Congress 2015) talk about how to sanitize and anonymize binary packet capture files (PCAP/PCAPng). The talk video recording can be found here: https://media.ccc.de/v/32c3-7294-sanitizing_pcaps#download
Remote Procedure Call (RPC) is a protocol that one program can use to request a service from a program located in another computer in a network without having to understand network details. (A procedure call is also sometimes known as a function call or a subroutine call.) RPC uses the client/server model. The requesting program is a client and the service-providing program is the server. Like a regular or local procedure call, an RPC is a synchronous operation requiring the requesting program to be suspended until the results of the remote procedure are returned. However, the use of lightweight processes or threads that share the same address space allows multiple RPCs to be performed concurrently.
This is a presentation I did years ago, but I heard that there are still people using it as a reference. So here it is, slightly cleaned up. If you are writing systems that process email addresses in some form or anotehr you might want to read this.
IoT Studio #1: Protocols introduction and connected jukeboxMickaël Rémond
This is the slides ProcessOne IoT Studio session #1.
At the core of the discussion is an introduction to Internet of Things protocols.
Here are the topics / questions that I have been addressing:
- What are the main classes of protocols for the Internet of Things ?
- What are the strengths of XMPP for the Internet of things ?
- What are the main XMPP Extensions for building the Internet of Things ?
- How can I leverage XMPP to build a real device / appliance ?
As such, the session ends with a hands-on demonstration of a Soundcloud connected Jukebox built with:
- Raspberry Pi 2
- Connected to ejabberd
- Client is developed in Go using Go XMPP library Gox
Video of the session is available on Youtube: https://www.youtube.com/watch?v=YtommTbCxCc
The Presentation given at Guru Gobind Singh Polytechnic, Nashik for Third Year Information Technology and Computer Engineering Students on 08/02/2011.
Topic: Java Network Programming
Grokking TechTalk #16: React stack at loziGrokking VN
Speaker: Thinh Nguyen - Web Developer @ Lozi.vn
Bio: I don't know what I've done, but people keep blaming me when they can't access the website ¯\_(ツ)_/¯
Description: How we build Lozi website with React and a team of 2
Teach your (micro)services talk Protocol Buffers with gRPC.Mihai Iachimovschi
When it comes to microservices, there’re a lot of things worth keeping in mind. Designing such fine-grained, loosely-coupled services requires paying lots of attention to various patterns and approaches to make them future-proof. A very important thing to consider, is the way those services will communicate with each-other in production. Usually the communication is done over the network using a technology-agnostic protocol. At the next level the service should provide an API for its friend services. Then, the data should be serialized without altering its meaning and transferred to the picked endpoint.
Nowadays, exposing a REST API that operates with JSON over plain HTTP is a usual way to lay the grounds of communication for the services. It is easy to accomplish, but it has some drawbacks. First of all, JSON is a human readable format, and it’s not as other serialization approaches. Also, with JSON it’s not possible to natively enforce the schema, and evolving the API may be painful.
This talk’s purpose is to describe in deep detail the benefits of protocol buffers, that offer us for free an easy way to define the API messages in the proto format, and then reuse them inside different services, without even being locked to use the same programming language for them. Moreover, with gRPC we can define the API’s endpoints easily in the same proto format. All these offer us a robust schema enforcement, compact binary serialization, and easy backward compatibility.
Erlang - Because s**t Happens by Mahesh Paolini-SubramanyaHakka Labs
Mahesh talks about the buddha-nature of Erlang/OTP, pointing out how the various features of the language tie together into one seamless Fault Tolerant whole. Mahesh emphasizes that Erlang begins and ends with Fault Tolerance. Fault Tolerance is baked into the very genes of Erlang/OTP - something that ends up being amazingly useful when building any kind of system. Mahesh Paolini-Subramanya is the V.P. of R&D at Ubiquiti Networks - a manufacturer of disruptive technology platforms for emerging markets. He has spent the recent past building out Erlang-based massively concurrent Cloud Services and VoIP platforms. Mahesh was previously the CTO of Vocalocity after its merger with Aptela, where he was a founder and CTO.
Having a fast, low-friction Edit/Build/Test cycle is one of the best and easiest ways to increase developer productivity across an organization.
This breadth-first tour covers some of the tools we use at Basho to speed up and streamline the Edit/Build/Test cycle for our Erlang projects.
There is an increasing interest in functional programming from Java developers and the organisations in which they work. For many companies the challenge now is how to make use of the competitive advantage of functional programming. For developers, how do you adapt your mindset to this newly reimagined paradigm? Through the use of examples and a modular approach to design, Clojure made simple will show how developers can be productive quickly without a major change to their current development life-cycle. We will also cover the Clojure build process, tools and exciting projects out there.
VoltDB and Erlang: two very promising beasts, made for the new parallel world, but still lingering in the wings. Not only are they addressing todays challenges but they are using parallel architectures as corner stone of their new and surprising approach to be faster and more productive. What are they good for? Why are we working to team them up?
Erlang promises faster implementation, way better maintenance and 4 times shorter code. VoltDB claims to be two orders of magnitude faster than its competitors. The two share many similarities: both are the result of scientific research and designed from scratch to address the new reality of parallel architectures with full force.
This talk presents the case for Erlang as server language, where it shines, how it looks, and how to get started. It details Erlang's secret sauce: microprocesses, actors, atoms, immutable variables, message passing and pattern matching. (Note: for a longer version of this treatment of Erlang only see: Why Erlang? http://www.slideshare.net/eonblast/why-erlang-gdc-online-2012)
VoltDB's inner workings are explained to understand why it can be so incredibly fast and still better than its NoSQL competitors. The well publicized Node.js benchmark clocking in at 695,000 transactions per second is described and the simple steps to get VoltDB up and running to see the prodigy from up close.
Source examples are presented that show Erlang and VoltDB in action.
The speaker is creator and maintainer of the Erlang VoltDB driver Erlvolt.
Introduction to Erlang for Python ProgrammersPython Ireland
What is Erlang? Why it is important? Why should Python programmers learn Erlang? How is Erlang different? How is Erlang the same? These and other questions will be answered during this talk, as well as this one: Should Erlang be the new programming language you learn this year?
This presentation is aimed at students of the bachelors degree course Applied Computer Science who (almost) finished the course “Advanced Programming Concepts - Functional Programming with Erlang”
This presentation was created for the course “Independent Coursework” at the University of Applied Sciences Berlin.
Supervisor was Professor Dr.-Ing. Hendrik Gärtner
The goal of this talk is to provide new and existing Elixir programmers with knowledge on how to get their application into production and, once it's there, how to tune it for scale.
Erlang begins and ends with Fault Tolerance.
Fault Tolerance is - formally! - baked into the very genes of Erlang/OTP - something that ends up being amazingly useful when you are building any kind of system. Remember, your clients (and co-workers!) will find new ways to break things, ways that you could never have imagined in your wildest dreams.
This, this is the reason to use Erlang. Once you get it, it completely changes the way you approach development, and you will find yourself writing "erlang" in whatever language you happen to be using (Mind you, writing tail-recursive code in java is a recipe for disaster, but thats another story…)
In this talk, I'll get into this buddha-nature of Erlang/OTP, pointing out how the various features of the language tie together into one seamless Fault Tolerant whole. It'll probably run 45 minutes or so, not counting questions…
Clojure is wonderful new language for the JVM that's really making waves: a functional Lisp dialect with full interoperation with Java, and a suite of excellent concurrency utilities ... but it's more than that.
Clojure is a highly expressive and highly adaptable language that allows you to focus on your craft in a way traditional languages such as Java and C# do not. In this session, we'll introduce the language and its core utilities and then introduce the fundamental concepts of functional programming as they apply to Clojure. Clojure has been described as a "high level language beamed back from the near future" ... come see what your future may hold, and why you're really going to like it!
This introduction to Clojure was given to the Utah Java Users Group Aug. 15. It's main focus was on Clojure's time model and how the design of Clojure separates (decomplects) many concepts which are all implemented onto of Objects in Java, and other OO languages. This is the abstract for the original talk:
Tony Hoare famously said "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." Clojure is a functional Lisp that targets, among other platforms, the JVM and strives to enable the former approach to building software.
In its pursuit of simplicity Clojure encourages the use of pure functions, sequence abstractions which allow for lazy and parallel processing of data, persistent (immutable) data structures, and a novel way of dealing with state as a succession of values. While these concepts may sound intimidating for those unfamiliar with functional programming, they are actually less complicated than many programming constructs that programmers use everyday.
This talk will cover these concepts and the motivation behind them. You will learn the basics of Clojure programming and will be given a taste of what developing an application in Clojure is like.
Genora has pioneered high end chat applications development using xmpp architechture. Here is a detailed report you need to know while developing chat applications.
Reach us at https://www.genorainfotech.com/
A vision for ejabberd - ejabberd SF MeetupMickaël Rémond
This is Mickaël Rémond presentation from ejabberd San Francisco Bay Area Meetup in march 2015. He presents latest achievements and progress made on ejabberd during the last few months. He then share his vision about the next steps to bring ejabberd XMPP platform to the next level.
This is the slide deck for ProcessOne first live XMPP Academy.
Here are the questions covered:
1. ejabberd SaaS architecture questions
- What is the best way to archive user messages if we do not want to sync data from user device?
- Why does ejabberd SaaS not use async mechanisms for archiving messages to customer back-end server?
- Mobile XMPP support: Explain standby, push and detached modes.
2. XMPP / ejabberd questions
- How does ejabberd internally store messages which are not yet delivered?
- How are privacy lists managed in ejabberd?
- What is on the ejabberd roadmap ? OAuth !
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
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
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
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
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
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