Laharsub, a .NET Messaging Server

by Abel Avram on Oct 26, 2010 |

Laharsub is an open source .NET publish-subscribe message server for real time web applications like chat, online collaboration, news or stock trade updates, etc.

Laharsub is a publish-subscribe message server built on a 3-tier architecture: the front end - the client, a middle tier - a web service, and the back-end - a system with publish/subscribe functionality and storage capabilities. The client is typically a browser but can be anything knowing to make HTTP requests. The middle tier is a WCF HTTP service receiving and delivering messages from/to clients, and the back-end contains the actual message-related logic.

The clients can create topics and submit messages to them through a RESTful API, while other clients subscribe to multiple topics through HTTP long polling. One client can subscribe to multiple topics using one request. Laharsub provides jQuery, Silverlight and .NET 4.0 clients taking care of framing, multiplexing and long polling management. Laharsub will use WebSockets in the future according Tomasz Janczuk, the coordinator of the project.

The web service is stateless so it can scale-out well, according to Janczuk. Laharsub comes with an in-memory back-end scaling out to several thousands of users but limited to a single node. Those interested in better scalability have the option of “a custom backend that provides publish\subscribe functionality, message storage, and scale-out to multiple nodes in a web farm.” The web service runs as a Windows service or as a console application.

An example of subscribing to a topic is the following:

GET http://laharsrv/ps/sql/subscriptions/volatile?subs[0][topicid]=14&subs[0][from]=1 HTTP/1.1
Host: laharsrv

while the response could be

HTTP/1.1 200 OK
Content-Length: 406
Content-Type: multipart/mixed; boundary=1d69db84.154e.47f7.be93.cc8b65b6efd0
Server: Microsoft-HTTPAPI/2.0
Date: Tue, 18 May 2010 23:14:24 GMT

Content-Type: text/plain; charset=UTF-8
Content-Description: 14/929

Hello, world!

The project is hosted on CodePlex having a New BSD License (BSD). A page describing the some stress tests applied to the server and performance results was published here. Plans for the future include the ability to deploy the server on Windows Azure and Amazon EC2 including the capability to scale out to several machines.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

General Feedback
Marketing and all content copyright © 2006-2016 C4Media Inc. hosted at Contegix, the best ISP we've ever worked with.
Privacy policy

We notice you're using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.