WebSync connects your users in real-time.
Deliver the power of real-time comet messaging
to your website and Internet-enabled applications. WebSync...
|
|
| Desktop/Laptop Browsers | Mobile Phone Browsers | Language Frameworks |
|---|---|---|
|
|
...and more!
|
What Is WebSync?
WebSync is a highly scalable HTTP Comet/Reverse Ajax server built for the Microsoft stack (ASP.NET/IIS). WebSync
allow you to push live data to a web browser or any other compatible client without requiring any plugins, security changes,
or dedicated servers. WebSync leverages the power and ubiquity of IIS to allow easy integration into existing applications
with a simple learning curve. WebSync is currently used for chat, streaming stock data, live auctions, real-time monitoring,
news updates, and many other applications.
What Makes WebSync Great?
First of all, WebSync is the only production capable Comet/Reverse Ajax server for those of us using the Microsoft framework (ASP.NET/IIS).
Also, unlike every other Comet/Reverse Ajax solution, WebSync does not require any additional servers, different ports, or fancy configuration.
WebSync works directly with IIS (or the development server shipped with Visual Studio), and can therefore be easily added to any ASP.NET project
with little more than 2 web.config entries. No need to host additional servers, mess with extended installations or configuration, or figure
out what security restrictions are in place - WebSync "just works".
In addition to being made for Microsoft's platform, and being very simple to use and integrate, WebSync performs incredibly
well. In our testing, we took a old Acer desktop with 3Gig of RAM and had over 30,000 simultaneous users
and over 30,000 messages being sent per second. Now those are some numbers you can work with!
What Is Comet?
Traditionally, HTTP requests communicate with web servers synchronously.
With Comet/Reverse Ajax, a connection is established and maintained with the server, allowing full duplex communication, meaning
the server can push events out to the client in real-time.
WebSync uses a standards-based publish/subscribe methodology to send data to connected clients; these clients can be .NET clients, Silverlight clients,
web browsers, or any other client that implements the standard protocol used with WebSync. The data sent through WebSync is JSON (JavaScript Object
Notation), a well known and highly cross-platform, cross-language standard.
How Does WebSync Pull All This Together?
Client Communication
With WebSync, you can use our included libraries to easily communicate with the WebSync server. We have pre-built libraries
for .NET and for JavaScript, and are constantly adding support for new languages. Let's look at a quick example of receiving
messages in your web browser:
var client = fm.websync.client; // initialize any global settings, and connect the client client.initialize(); client.connect(); // subscribe to the sample channel, and alert the "text" property of the data when it arrives client.subscribe({ channel: '/sample/channel', onReceive: function(args) { alert(args.data.text); } });
And publishing data is just as easy:
var client = fm.websync.client; // initialize any global settings, and connect the client; you don't have to do this more than once per page client.initialize(); client.connect(); // publish out a message to any clients on this channel client.publish({ channel: '/sample/channel', data: { text: 'Hello, world!' } });
It's really that easy!
Learn more about using our powerful JavaScript client, register now to get started with On-Demand, or download a free trial of WebSync Server!
Server Solution
We've seen how easy it is to send and receive messages, but what's just as important is doing something useful with those messages
as they pass through the server.
WebSync lets you pre-process or post-process all messages as they move through the system with it's powerful event system.
Just drop a class into your ASP.NET project and create and tag the appropriate methods:
// before every publish, run this method [HandlerEvent(HandlerEventType.BeforePublish] public static void Process(object sender, HandlerEventArgs e) { // any publish can contain more than one message foreach (Message message in e.Messages) { // only deal with one channel for now if (message.Channel == "/sample/channel") { // log for future reference; in this case, the "Data" property is a json object Log log = new Log(); log.Data = message.Data; log.Save(); } } }
Finally, what if you want to publish data from the server? Well, once you've got your class defined, that's just a 1-liner:
MyHandler.DirectPublish("/sample/channel", JSON.Serialize(new MyMessage(){ Text = "Hi from the sever!" }));
