GithubHelp home page GithubHelp logo

arkadiuszsz / sockjs-netty Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cgbystrom/sockjs-netty

0.0 1.0 0.0 124 KB

Library for building SockJS compatible servers using JBoss Netty and Java.

sockjs-netty's Introduction

sockjs-netty

An implementation of SockJS for Java using JBoss Netty. It is currently not finished and not production ready. However, all transports offered by SockJS have been implemented and the issues remaining are minor.

Currently passes all tests from the 0.3.3 protocol specification except for test_haproxy. Only users behind HAProxy should be impacted by that though.

What is SockJS?

SockJS is a browser JavaScript library that provides a WebSocket-like object. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server.

Under the hood SockJS tries to use native WebSockets first. If that fails it can use a variety of browser-specific transport protocols and presents them through WebSocket-like abstractions.

SockJS is intended to work for all modern browsers and in environments which don't support WebSocket protcol, for example behind restrictive corporate proxies.

Read more at http://sockjs.org

Installing

sockjs-netty is packaged as a library for JBoss Netty and not as a standalone server. Rather than installing a prepackaged JAR, you are required to include it as you would with any other Java library.

Intention is to make it available through Maven Central once it is stable enough. But right now you will have to build it from source with Maven:

mvn package

That will output a JAR inside the target/ folder.

Running the test server

Right now everything is packaged as a library rather than a ready-to-run server. But there is a test server included that serves as an example and is also used for verifying the tests provided by the SockJS project.

Until a prebuilt Java binary, a JAR, is shipped you'll need to compile and run the project with Maven. (Maven is a Java build tool used by the project).

Running the server:

  1. Install Maven (Download it, 3.x should be fine, even 2.x. Or use your favorite package manager)
  2. Clone the project
  3. Run mvn exec:java -Dexec.mainClass="com.cgbystrom.sockjs.TestServer" -Dexec.classpathScope=test -e from your cloned project directory.

What's missing?

Currently, not all tests provided by the SockJS protocol pass. As mentioned, it is still work in progress and the goal is naturally to be 100% compatible with the protocol. The tests currently not passing are the ones testing Web Socket edge cases.

sockjs-netty's People

Contributors

cgbystrom avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.