XMPP Intro that also involves more advanced topics like pub/sub, using components and plugins on the XMPP server side.
The Last section covers recommendations of servers and how to install a full XMPP setup for a web scenario (using pure HTML and Strophe.js for client side).
An introduction to REST and RESTful web services.
You can take the course below to learn about REST & RESTful web services.
https://www.udemy.com/building-php-restful-web-services/
Servlet is java class which extends the functionality of web server by dynamically generating web pages.
Servlet technology is used to create Dynamic web application. Servlet technology is robust and scalable. init() and service() methods are more important in life cycle of a servlet. doGet() and doPost() are methods used under service() method.
Internet Message Access Protocol (IMAP) is a communications protocol for email retrieval and storage developed by Mark Crispin in 1986 at Stanford University as an alternative to POP.
IMAP uses port 143, and IMAP over SSL (IMAPS) uses port 993. IMAP, unlike POP, specifically allows multiple clients simultaneously connected to the same mailbox, and through flags stored on the server, different clients accessing the same mailbox at the same or different times can detect state changes made by other clients.
This presentation walks through essential points for developing and working with REST APIs or web services to communicate through various platforms. This also explains HTTP methods.
Realtime applications with EmberJS and XMPPrjvegasf
Slides for talk at EmberJS meet up in San Francisco. This talk covers building a scalable real time application with EmberJS and XMPP. A show case of use cases for building a robust real time app and a live demo of an instant message application built with EmberJS.
An introduction to REST and RESTful web services.
You can take the course below to learn about REST & RESTful web services.
https://www.udemy.com/building-php-restful-web-services/
Servlet is java class which extends the functionality of web server by dynamically generating web pages.
Servlet technology is used to create Dynamic web application. Servlet technology is robust and scalable. init() and service() methods are more important in life cycle of a servlet. doGet() and doPost() are methods used under service() method.
Internet Message Access Protocol (IMAP) is a communications protocol for email retrieval and storage developed by Mark Crispin in 1986 at Stanford University as an alternative to POP.
IMAP uses port 143, and IMAP over SSL (IMAPS) uses port 993. IMAP, unlike POP, specifically allows multiple clients simultaneously connected to the same mailbox, and through flags stored on the server, different clients accessing the same mailbox at the same or different times can detect state changes made by other clients.
This presentation walks through essential points for developing and working with REST APIs or web services to communicate through various platforms. This also explains HTTP methods.
Realtime applications with EmberJS and XMPPrjvegasf
Slides for talk at EmberJS meet up in San Francisco. This talk covers building a scalable real time application with EmberJS and XMPP. A show case of use cases for building a robust real time app and a live demo of an instant message application built with EmberJS.
"How to make a watersquare?" Lessons learned from the realisation of the Watersquare in Rotterdam (NL). Presentation by Dirk van Peijpe / De_Urbanisten in New York at the NY Climate Week, Sept. 2016.
Vortrag in Deutsch:
Einführung und detaillierte Betrachtung von XMPP. XMPP (Jabber) als freie Alternative zu den properitären IM-Protokollen wie MSN, OSCAR (ICQ, AOL) und Yahoo.
This shows how one can use XMPP in one's Java coding to make an IM communication. It'd be really amusing to see your Facebook or Google chat in action with your own code.
Review of basic XML
Review of XML in Domino
Web Services defined
XML and SOAP
Finding Web Services "Out There"
Building Web Services "In Here"
Domino as WS client
Domino as WS server
Security?
The Road Ahead
600M+ Unsuspecting FreeBSD Users (MeetBSD California 2014)iXsystems
The slides for Rick Reed's presentation, “WhatsApp: Half a billion unsuspecting FreeBSD users”, given at MeetBSD California 2014 in San Jose.
A recording of the talk can be viewed at: http://bit.ly/1HFc53n.
Volker Fröhlich - How to Debug Common Agent IssuesZabbix
Probably every Zabbix user has a story of a Zabbix agent suddenly failing to work. Computers and networks are complex and diverse, and so are the causes of these problems.
This talk introduces a structured approach to debugging configuration problems, connectivity problems and problems in the execution of the agent. It will spotlight common problems, but also some rather obscure ones I met in the wild.
Zabbix Conference 2015
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
XMPP Intro - The camp2012
1. XMPP intro & 101
TheCamp - July 2012
Steffen Larsen (slarsen@braintrust.dk)
Thursday, August 2, 12
2. This Presentation
I) Intro and presentation of the protocol
What is it?, Usage
Basics and architecture
Examples
II) Advanced Topics and loose talk
Extensions
Plugins and components
III) XMPP 101 - Kick start and play!
Thursday, August 2, 12
3. About me (blah blah)
Studied Computer Science @ Copenhagen
CEO / Founder of BrainTrust ApS 2010 (Solo Ent.)
Prof. Software Developer for 15+ years
Java (JSE / JEE), C, Erlang, Ruby, Perl.
Open Source developer.. Tigase, Strophe-plugins, XMPPConsole etc.
Thursday, August 2, 12
4. My XMPP Involvement
Member of XMPP Standard Foundation (XSF)
Developing XMPP since 2007 (Ms.Thesis, pidgin/VOIP)
Done XMPP design and impl. for:
WAOO, Nordija (Set-top-boxes and over-the-top TV and IPTV)
Thrane&Thrane (Maritime Satellite Communication project)
Danske Spil / BetWare (Game software for Bingo etc)
Thursday, August 2, 12
5. XMPP Intro
What is it?
XMPP - eXtensible Message and Presence
Protocol
Earlier known as Jabber - 1998
Real time messages system for communication
Routes small snipplets of XML - called stanzas
Thursday, August 2, 12
6. XMPP - What?
Who uses it? Most of you use it every day as chat..
You? Jabber client (pidgin/adium/messenger (m$))
Google (gmail, google hangouts)
Cisco (webex)
Facebook (chat)
Even Micro$oft have XMPP gateways integrated into
their messaging system
Thursday, August 2, 12
7. XMPP Basics
What can you do with it?
Everything that you can imagine (almost) :-)
More than just chat -- Its about presence, routing
and real-time communication!
Real time web!.. its there - push it!
Thursday, August 2, 12
8. XMPP Basics
Basic Services and applications
Encryption / Authentication
Presence
Contact / Buddy lists
Messaging (1-1 or group chat)
Push Notifications (individual or publish/subscribe)
Service discovery and device capability advertisement
Geolocation and notifications
Voice over IP (VOIP)
Collaborative text editing etc.
Thursday, August 2, 12
9. XMPP applications
Set-top box and OTT implementation done my self..
Taxi service real-time: http://cabulous.com/
Yammer.com - work in social context (ala facebook)
status.net - DISTRIBUTED twitter (micro blog) - download and federate..
JIVE sbs - big social site for business / whiteboarding
Apple mobile push
stand-alone - adium/pidgin clients etc.
Customer Service - chat and voip - call forwarding/queue
games: tic-tac toe / chess
Energy Trading software
Thursday, August 2, 12
10. XMPP Basics
Why XMPP? just use normal HTTP (polling), or we
(almost) have websockets and others..)
XMPP is an Open Standard (like HTTP) - XSF and the council does the work
openly.
Proven tech. Almost 15 years of dev.
Secure - Channel encryption and strong auth.
Decentralized. no stand-alone silos (hello twitter and fb..)
Huge community
Extensibility!.. We have above 300 extensions to the XMPP core
Thursday, August 2, 12
11. XMPP Protocol
Core specifies (RFC 6120 / RFC 6121)
http://xmpp.org/xmpp-protocols/rfcs/
Connect with TCP or other transport protocols (HTTP/
websockets, specified in extensions)
Opening a Stream tag with with streaming XML stanzas
(<stanza>.. stanza xml .. </stream>)
stanzas
Thursday, August 2, 12
12. XMPP Architecture
XMPP can consist of many modules:
Servers (many through federation)
Plugins
Components (XEP-0114)
Clients (typically many..)
Proxies
Database, LDAP, SIP and other systems (gateways)
Thursday, August 2, 12
14. XMPP Addressing & Routing
Standard routing through JID
full JID: <id>@<domain>/<resource>
bare JID: <id>@<domain> (autom. resource)
Domain routing like normal mail (smtp).
Thursday, August 2, 12
15. XMPP Connection Lifecycle
To illustrate a chat client connecting
• Initiating TCP connection to the XMPP server
• Opening an XML <stream> for session..
• Negotiating stream features and SASL negotiation (Simple Authentiation
and Security Layer)
•Auth mechanisms: PLAIN, DIGETS-MD5, SCRAM, EXTERNAL etc.
• TLS secure layer (authentication towards the server)
• The clients resource gets bound to the session
• The client sends out initial presence
• The client can now communicate (send/receive stanzas)
• The client ends session
• </stream> is send. And TCP connection is closed.
Thursday, August 2, 12
16. Communication Primitives
Simple, we only have 3 ways:
Stanzas (xml snipplets that flow async.)
Presence
Message
IQ (Information/Query)
Thursday, August 2, 12
17. Stanzas: Presence
Sets and shows the availability of the entity that is
connected.
chat
away
dnd (do not disturb)
Presence for the system and the subscribers of
the entity (e.g. buddylist)
Specialized Presence extension (PEP) shows what
music you are playing..
Thursday, August 2, 12
18. Stanzas: Presence
// initial simple presence
<presence/>
// sending away to subscribers
<presence>
<show>away</show>
</presence>
<presence>
<show>dnd</show>
<status>I am working.. </status
</presence>
// before logging off.. more realtime
<presence type='unavailable'/>
Thursday, August 2, 12
19. Stanzas: Presence
// direct presence
<presence from='juliet@example.com balcony’
to='romeo@example.net'/>
// Capabilities.. version, voip etc.
<presence from='romeo@example.net'>
<c xmlns='http://jabber.org/protocol/caps'
hash='sha-1'
node='http://psi-im.org'
ver='q07IKJEyjvHSyhy//CH0CxmKi8w='/>
</presence>
Thursday, August 2, 12
20. Stanzas: Message
Using it to communicate with other clients
TO attribute
full JID: direct messaging to specific entity (e.g. device/computer).
bare JID: will route to one or more of the connected resources - depends of
status, presence, message type etc.
Type attribute (chat, normal, groupchat, headline etc) -
presentation and routing
Body Element - the message
Thursday, August 2, 12
21. Stanzas: Message
normal message
<message
from='juliet@example.com/balcony'
id='ktx72v49'
to='romeo@example.net'
type='chat'
xml:lang='en'>
<body>Hi romeo where art thou?</body>
</message>
direct message
<message
from='juliet@example.com/balcony'
id='ktx72v50'
to='romeo@example.net/thecastle'
type='chat'
xml:lang='en'>
<body>will you come and visit?</body>
</message>
Thursday, August 2, 12
22. Stanzas: IQ
A more request / response model. For getting
information and query the server / entities.
Request: GET / SET
Response: RESULT / ERROR
Using it for getting roster, ad-hoc command and
statistics for server (if admin).. etc.
Thursday, August 2, 12
23. Stanzas: IQ
Example 1: User requests current roster from server
UC: <iq from='romeo@example.net/orchard'
id='hf61v3n7'
type='get'>
<query xmlns='jabber:iq:roster'/>
</iq>
Example 2: User receives roster from server
US: <iq id='hf61v3n7'
to='romeo@example.net/orchard'
type='result'>
<query xmlns='jabber:iq:roster'>
<item jid='juliet@example.com'
name='Juliet'
subscription='both'>
<group>Friends</group>
</item>
<item jid='benvolio@example.org'
name='Benvolio'
subscription='to'/>
<item jid='mercutio@example.org'
name='Mercutio'
subscription='from'/>
</query>
</iq>
Thursday, August 2, 12
24. Now.. Lets have Coffee!
While having a break and if you want to play with XMPP
later on..
Install java sdk
Install apache
Thursday, August 2, 12
25. II) Advanced Topics
Extensions:
Pub / Sub (XEP-0060)
BOSH (XMPP over HTTP)
External Database and LDAP
Internal routing and modifications via. plugins
Components
Thursday, August 2, 12
26. XMPP Extensions
XSF defines a set of XMPP Extension Protocols (XEPs).
> 300 at the moment
http://xmpp.org/xmpp-protocols/xmpp-extensions/.
Jingle (Gtalk), MUC (hangouts), file transfer, etc..
publish/subscribe
We will concentrate on:
publish / subscribe & BOSH (XMPP on the web)
Thursday, August 2, 12
27. Publish / Subscribe
(XEP-0060)
Pub/Sub embbeds in IQ stanza
Put JIDs into groups and push out messages to many
subscribers!
Let people subscribe/unsubscribe for data on a node
Setup roles and affiliates..
Thursday, August 2, 12
28. Publish / Subscribe
(XEP-0060)
<iq type='set'
from='hamlet@denmark.lit/blogbot'
to='pubsub.shakespeare.lit'
id='pub1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='princely_musings'>
<item>
<entry xmlns='http://www.w3.org/2005/Atom'>
<title>Soliloquy</title>
<summary>
To be, or not to be: that is the question:
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them?
</summary>
<link rel='alternate' type='text/html'
href='http://denmark.lit/2003/12/13/atom03'/>
<id>tag:denmark.lit,2003:entry-32397</id>
<published>2003-12-13T18:30:02Z</published>
<updated>2003-12-13T18:30:02Z</updated>
</entry>
</item>
</publish>
</pubsub>
</iq>
Thursday, August 2, 12
30. BOSH (XEP-0124)
Bidrectional streams Over Synchronous Http
(BOSH)
HTTPs api are great - Polling sucks.
Long Polling. XMPP embedded into HTTP
why? simple, known tech. use compress etc.
Small problem: cross origin policy (diff. ports)
default BOSH port 5280 - HTTP 80
Thursday, August 2, 12
31. BOSH
HTTP hold the connection until there is something
to send
Thursday, August 2, 12
32. BOSH - XMPP over HTTP
POST /webclient HTTP/1.1
Host: httpcm.example.com
Accept-Encoding: gzip, deflate
Content-Type: text/xml; charset=utf-8
Content-Length: 188
<body rid='1249243562'
sid='SomeSID'
xmlns='http://jabber.org/protocol/httpbind'>
<message to='contact@example.com'
xmlns='jabber:client'>
<body>Good morning!</body>
</message>
</body>
Thursday, August 2, 12
33. BOSH - XMPP over HTTP
• No data - empty body tag from server
• Works through header setup and timeouts
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 64
<body xmlns='http://jabber.org/protocol/
httpbind'/>
Thursday, August 2, 12
35. Some advanced features
Normal client “bots” easy to do, but have limitations
To incorporate your own business logic you need some
more..
To make advanced features on the server side
Server Plugins
Components
External Auth.. either plain db, ldap or others.
Thursday, August 2, 12
36. Server Plugins
Located on the server
Change routing strategy
Filter packages / Drop packages
Do statistics etc.
Bound to the server implementation - not portable
Can hog mem/cpu from the server. Its embedded!.
(take care)
Thursday, August 2, 12
37. Components (XEP-0114)
Components conn. to the server or vice versa (normal
TCP)
Handshakes and authenticates (trusted by server)
Portable
Can be run externally with code implemented in almost
every language.
Thursday, August 2, 12
38. Components (XEP-0114)
Acts almost like a “normal” client. e.g. JID
(comp@braintrust.dk)...
Can act and interact on the whole domain.. not multiple
Can alter the to/from fields...
Can’t drop/filter packages for every domain.
Thursday, August 2, 12
39. Break!! ...
Next developing XMPP 101
Lets have some hands-on experience.
Install Java (version 6 and up is fine)
Install Apache web server
Get XMPP server up and running
Play..
Thursday, August 2, 12
40. XMPP 101 - playtime!
Install your very own XMPP server!
Setup Apache or other httpd / proxy
Download Strophe and setup examples..
Play!
Thursday, August 2, 12
41. Developing XMPP
Learned so far:
XMPP can run on every device, on mobile, on the web
on
XMPP makes a bridge and makes the device present
and available to communicate with other entities..
Client frameworks for almost every language
Java, Javascript, C / C++, Erlang, C#, Python, Ruby, Perl etc.
We will focus on the web (client side) and hence do
javascript
Thursday, August 2, 12
42. XMPP Kick Start!
But first! to make it work, we need a server
• Choose your favorite XMPP server!
• The list is long: http://xmpp.org/xmpp-software/servers/
• Be ware of the license. Some are
commercial/gpl/gpl3/apache etc.
Thursday, August 2, 12
43. XMPP Servers
Administrators would look for monitoring and tools.
Extensions.. E.g. some can pub/sub, some can’t. So
choose from your specific application.
Clustering or not? What is your demand? 5k users?
500k users?
Thursday, August 2, 12
44. My recommendations
Ejabberd 2.1.11 (http://www.ejabberd.im/)
cool features dist. out-of-the-box. Thanks
erlang!
high load factor
Tigase 5.1.x (linux, mac etc. *NIX.)
very flexible. Code injection on the fly. Groovy /
Java. Easy to understand
Many extensions available
Good monitoring tools!
Thursday, August 2, 12
45. Windows users?...
If you can’t run shell scripts etc.
Openfire might be easier:
http://goo.gl/9HYeb
Should be easy to setup.. I’ll help later. No worry. :-)
Thursday, August 2, 12
46. Tigase XMPP server
Install Java if you dont have it!
Install tigase:
download http://goo.gl/jYNFD
run the downloaded jar file: java -jar tigase...jar
Setup easy. in step 7, choose only base, extras and derby database. in the other
steps just press next!
cd {TIGASE_HOME} (where you installed it)
Start: ./scripts/tigase.sh start etc/tigase.conf
Stop: ./scripts/tigase.sh stop
add a new user to the server (use a client: PSI, Adium , Pidgin etc)
Thursday, August 2, 12
47. Proxy setup
because of same origin policy.. if you have a
CORS enabled browser, this is not needed
http://httpd.apache.org/download.cgi
proxy_module should be enabled.
in httpd.conf (proxy port 80 to port 5280)
ProxyPass /http-bind/ http://localhost:5280/http-bind/
Thursday, August 2, 12
48. XMPP libraries..
There a many! http://xmpp.org/xmpp-software/libraries/
Native or BOSH (XMPP over HTTP)
We focus on BOSH.. lets enable real-time push on the
web.
Strophe.js!
Thursday, August 2, 12
49. Strophe Install
Download here: http://goo.gl/5btM2
unzip / untar the downloaded package into your
Apache web folder (on mac: Library/WebServer/
Documents).
You can change the folder in the httpd.conf if you want.
change in examples/echobot.js :
var BOSH_SERVICE = '/http-bind/';
Ready to run!. if server is running, fire up your browser
and use the user created just before when logging in.
Thursday, August 2, 12
50. Strophe
Pure javascript XMPP library (integrated with jquery)
Using BOSH as connection type
Simple manipulations with Stanzas
Build everything like DOM
Light and Event driven..
Here is my example: http://localhost/webchat
Thursday, August 2, 12
51. Strophe
Make connection on the BOSH URL defined in
apache proxy:
var conn = new Strophe.connection(“localhost/http-bind”);
Connect with JID (full/bare) and make cb function:
conn.connect(JID, password, callbackfn);
Thursday, August 2, 12
52. Strophe
Strophe have static status to check on the connection
function onConnection () {
if (status == Strophe.Status.CONNECTED) {
// do something!
} else if (status ...
..
}
Thursday, August 2, 12
54. Strophe..
1. function onMessage(msg) {
2. $(msg).find("message[type='chat'][from]:has(body)")
3. .each(function () {
4. var body = $(this).find("body:first").text();
5. var from = $(this).attr("from");
6.
7. log('ECHOBOT: I got a message from ' + from + ': ' + body);
8.
9. var reply = $msg({to: from, type: "chat"})
10. .c("body")
11. .t(body);
12. connection.send(reply.tree());
13.
14. log('ECHOBOT: I sent ' + from + ': ' + body);
15. });
16.}
Thursday, August 2, 12
55. Strophe - Stanzas..
Strophe have convenience methods:
$pres(attributes..);
$msg(attributes..);
$iq(attributes..);
Thursday, August 2, 12
56. Strophe - Stanzas
Sending initial presence:
$pres();
Building a message stanza:
$msg({to: ‘zooldk@gmail.com’, ‘type’ :
‘chat’}).c(‘body’).t(‘Hello zool!’);
Thursday, August 2, 12
57. </stream>..the end..
Contact me at
Email/XMPP: slarsen@braintrust.dk / zooldk@gmail.com
LinkedIn: http://dk.linkedin.com/in/zooldk
Illustrations by Adrian Teh (Too lazy to draw my self..)
XMPP standard foundation: http://xmpp.org
Links
Server list: http://xmpp.org/xmpp-software/servers/
Client list: http://xmpp.org/xmpp-software/clients/
Libraries: http://xmpp.org/xmpp-software/libraries/
Strophe:
Thursday, August 2, 12