GitXplorerGitXplorer
g

socket.io-servicebus

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
9aa196c9ffc31f1b30ea56548472c93450af0412

Passing callback when starting sb

committed 12 years ago
Unverified
76bf0cf17f5dee2a133d0b14b974d307b1fd3c89

crlf issues

committed 12 years ago
Unverified
477ad4f800485fd4c47e94a69c1cd2a4c09430ef

Fixing return value for factory function

committed 12 years ago
Unverified
40c5d68acef2b9a9ccb732769560648fdb63f2d0

Pointing to master branch

committed 12 years ago
Unverified
d1ec2ad58942906298ff7bb4030d5d614159e457

adding all references to package.json. Temporarily pointing socket.io-servicebus ref to github repo until published

committed 12 years ago
Unverified
8593651cae1df08cbf975caf6ad12a5cbac270e2

changing require so that module references are not local, adding parameter for ServiceBus connection string

committed 12 years ago

README

The README file for this repository.

socket.io-servicebus - socket.io store using Windows Azure Service Bus

This project provides a Node.js package that lets you use Windows Azure Service Bus as a back-end communications channel for socket.io applications.

Library Features

  • Service Bus Store
    • Easily connect multiple socket.io server instances over Service Bus

Getting Started

Download Source Code

To get the source code of the SDK via git just type:

git clone https://github.com/WindowsAzure/socket.io-servicebus
cd ./socket.io-servicebus

Install the npm package

You can install the azure npm package directly.

npm install socket.io-servicebus

Usage

First, set up your Service Bus namespace. Create a topic to use for communications, and one subscription per socket.io server instance. These can be created either via the Windows Azure portal or programmatically using the Windows Azure SDK for Node.

Then, configure socket.io to use the Service Bus Store:

var sio = require('socket.io');
var SbStore = require('socket.io-servicebus');

var io = sio.listen(server);
io.configure(function () {
  io.set('store', new SbStore({
    topic: topicName,
    subscription: subscriptionName,
    connectionString: connectionString
  }));
});

The connection string can either be retrieved from the portal, or using our powershell / x-plat CLI tools. From here, communications to and from the server will get routed over Service Bus.

Current Issues

The current version (0.0.1) only routes messages; client connection state is stored in memory in the server instance. Clients need to consistently connect to the same server instance to avoid losing their session state.

Need Help?

Be sure to check out the Windows Azure Developer Forums on Stack Overflow if you have trouble with the provided code.

Contribute Code or Provide Feedback

If you would like to become an active contributor to this project please follow the instructions provided in Windows Azure Projects Contribution Guidelines.

If you encounter any bugs with the library please file an issue in the Issues section of the project.

Learn More

For documentation on how to host Node.js applications on Windows Azure, please see the Windows Azure Node.js Developer Center.

For documentation on the Azure cross platform CLI tool for Mac and Linux, please see our readme [here] (http://github.com/windowsazure/azure-sdk-tools-xplat)

Check out our new IRC channel on freenode, node-azure.