Uploaded on

The presentation covers the technical challenges which the developers faced while creating the service. Bartek Puzon explains why the Erlang language was chosen. He also describes how communication …

The presentation covers the technical challenges which the developers faced while creating the service. Bartek Puzon explains why the Erlang language was chosen. He also describes how communication within NKtalk works and he talks about the usage of XMPP in web applications.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,733
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
11
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. NKtalk Case Study Kraków Erlang User Group 26 January 2010 Bartłomiej Puzoń, Michał Ptaszek [email_address] Erlang Solutions Ltd
  • 2. Agenda
    • What is NKtalk?
    • Challenges
    • Technologies chosen
      • Erlang
      • XMPP
    • Integration
  • 3. What is NKtalk?
    • nasza-klasa.pl - large Polish social networking service
    • Over 13 mln users
    • Service aims at being a communication platform
    • NKtalk is an integrated instant messaging service
    • Provides new means of communication
  • 4. Challenges
    • Massive number of
      • messages per second
      • concurrent users
    • Integration with the portal
      • HTTP
      • Contact lists
    • Short time to market
  • 5. Technologies chosen: Erlang
    • What's Erlang?
    • Functional programming language
      • Unlike C++, Java, C#
      • Like LISP, Haskell
    • Open Source (www.erlang.org)
    • Platform independent, runs on
      • UNIX/Linux
      • Windows
      • Mac
      • Embedded Systems
  • 6. Why Erlang?
    • Created for a concurrent world
    • NKtalk: tens of thousands of users communicating simultaneously
    • Erlang provides concurrency based on share-nothing actors
  • 7. Why Erlang?
    • Created for a world that grows
    • NKtalk users number grows
    • Erlang has a built-in support for distributed applications
    • It is easy to extend an Erlang cluster with new nodes depending on the needs
  • 8. Why Erlang?
    • Created for a networked world
    • NKtalk is a web-based application
    • Erlang has an extensive build-in support for TCP/IP and HTTP
  • 9. Why Erlang?
    • Created for a demanding world
    • NKtalk requires high availability
    • If there is an error in one of the 10.000 connections, the other 9.999 can not be affected
    • Erlang encourages error isolation
  • 10. Technologies chosen: XMPP
    • What's XMPP?
    • eXtended Messaging and Presence Protocol
    • Based on XML
    • Used for instant messaging (GoogleTalk)
  • 11. Why XMPP?
    • XMPP advantages
    • open
    • popular
      • software and libraries available
    • proven
      • used since 1998
    • standarized (IETF)
    • extensible
      • many extensions already available
  • 12. XMPP + Erlang = Ejabberd
    • Ejabberd – E rlang jabber (XMPP) d aemon (server)
    • Open source
    • Modular
    • Utilizes the aforementioned Erlang traits
    • Successful deployments for million concurrent users
  • 13. Integration: The Problem
    • Ejabberd and other XMPP servers assume a stream-oriented connection
      • TCP
    • NKtalk works over the Web
      • HTTP
    • HTTP is a response-request protocol
    • TCP is a stream oriented protocol
  • 14. Integration: The Solution
    • BOSH (Bidirectional-streams Over Synchronous HTTP)
    • BOSH emulates a stream-oriented connection (TCP) over a response-request (HTTP) protocol
    • XMPP messages that would be sent over TCP are encapsulated into HTTP request
    • HTTP-specific mechanisms are used to emulate bidirectional connection
  • 15. Overview user's web browser nktalk.pl Internet node1 Ejabberd Cluster (powered by Erlang ) node2 node3 node4 HTTP requests
  • 16. Overview user's web browser Internet Hola! XMPP stanza Hola! HTTP request XMPP stanza Hola!
  • 17. Overview nktalk.pl Internet node1 Ejabberd Cluster (powered by Erlang ) node2 HTTP request XMPP stanza Hola! BOSH module (extracts XMPP) Ejabberd Server (routes traffic) Long-term storage XMPP stanza