A new way to communicate with Erlang and NKtalk

A new way to communicate with Erlang and NKtalk

Nasza Klasa (NK) is Poland's biggest social networking site, with over 13 million active users. They developed and launched their web-based instant messaging service, NKtalk, with the help of Erlang Solutions.

The project posed many technical challenges, with very tight deadlines. The marketing plan for the launch meant that development had to be completed in only six weeks. Challenges included the massive number of messages per second, the high number of concurrent users, and integration with the portal and users' existing contact lists.

Different XMPP servers were investigated. ejabberd (written in Erlang) provided better scalability than a Java competitor, making it the optimal choice.

After a series of training courses at NK's offices, development of the system started. Erlang Solutions had a number of features to implement:

  • Synchronising users' contacts lists and friends lists, through integration with NK's PHP stack
  • Monitoring: implementing a large number of SNMP counters, which ejabberd doesn't provide
  • Throttling, to control the frequency of messages and presence updates through adjustable rules
  • A flexible and fault-tolerant database connectivity layer
  • A message archiver, to save messages sent in the system to the MySQL database
  • Privacy restrictions, to allow users to send messages only to contacts in their roster.

Erlang Solutions and NK established a very productive working relationship, with NK being very responsive and quick to provide feedback.

All work was completed in time for the launch, and the code has been running since then. When some minor problems occurred, NK were able to solve them internally, thanks to their training and the experience of working with Erlang experts.

Facing all the challenges head on, the two companies rose to the challenge and demonstrated that with the right team, technical choices and clear vision, it is possible to deliver robust high-performance solutions.

Why Erlang

  • Concurrency. With tens of thousands of users communicating simultaneously on NKtalk, Erlang provides concurrency based on share-nothing actors.
  • Scalability. As the number of NKtalk users grows, it is easy to extend an Erlang cluster with new nodes.
  • High availability and fault tolerance. NKtalk requires high availability. If there is an error in one of 10,000 connections, the other 9,999 can not be affected. Erlang encourages error isolation.

Customer benefits

  • Fast time to market. Erlang/OTP makes it possible to produce production-quality systems in a very short time. The development work was completed by a small team in only six weeks.
  • An integrated service. Erlang Solutions could provide both training and development services.
  • Made to order. Open source technologies were harnessed to build a custom solution very cost-effectively.

Customer Data

  • Description:
    Polish social network
  • Launched in:
    November 2006
  • Registered users:
    13.5 million
  • Daily active users:
    7.5 million average
  • Website:

Technical Data

  • XMPP server:
  • Protocols:
  • Programming languages:
    Erlang, PHP, Python, JavaScript (client)
  • Database:
  • Operating system: