X

Pavel Bucek's Weblog

  • January 18, 2013

Tyrus 1.0-b09 released

I've started working on new project - Reference Implementation of JSR 356: Java API for WebSocket - Tyrus and we just released new version.

What is Tyrus?

Tyrus
providers implementation for JSR 356 plus some other (currently minor)
improvements. Project itself is still in development phase, so you
probably don't want to use it in production environment - especially
when specification itself is not yet final - but if you want to be on
track with this project, this is the release you want to use. We have
worked hard to get implementation to support most of JSR-356 features
and hopefully all core functionality.

Our implementation passes most of Autobahn testsuite
(there are some Servlet 3.1 related issues but also in our
implementation, I don't want to blame only Servlet folks ;) ). We should
sort that out in next release cycle.

How can I try it?

Best way would be with fresh Glassfish, which should contain Tyrus 1.0-b09 (it is not available yet, but should be later today; link).
Then you can build Echo sample from Tyrus samples directory and start
exploring WebSockets and create simple game or other application which
can take advantage of bi-directional communication provided by WebSocket
protocol.

How to run Echo sample:

if you really want just quick peek, you can download Tyrus echo sample war file,
deploy it and hit deployed application from your browser. But its just
"hello world" type app, you most likely want to modify source and play
with it. So you'll end up with checking out sources anyway :)

svn co https://svn.java.net/svn/tyrus~source-code-repository/tags/tyrus-project-1.0-b09/samples/echo
cd echo
mvn clean install

Build war file is present in target directory.
Please note you might need to disable tests if you are changing
functionality (add -Dmaven.test.skip when building sample).

If you want more information, check out Public Review draft (spec api version 1.0-b11), and Tyrus home page.

As usual, if you find some issues/bugs, feel free to file them on our JIRA or send us a note to users@tyrus.java.net
mailing list. Any questions about implementation are also welcomed, so
if you are stuck at some point when implementing Tyrus based
application, don't hesitated and let us know - we should be able to help
you.

useful links:

latest Glassfish: http://dlc.sun.com.edgesuite.net/glassfish/4.0/nightly/latest-glassfish.zip
Tyrus homepage: http://tyrus.java.net/
JSR-356 homepage: http://jcp.org/en/jsr/detail?id=356

Join the discussion

Comments ( 4 )
  • guest Thursday, January 24, 2013

    Hey, it sounds great! Does tyrus require java 7 to run? I guess that some nio.2 non-blocking async stuff might be used in there. Are you planning to make the service provider interface be part of JDK ? Or it all just gonna be a part of the GlasFish stack ?


  • Pavel Thursday, January 24, 2013

    Hi, JDK 1.7 is now required only for tyrus-container-servlet module (new servlet API has hard dependency on autocloseable), Tyrus itself can run on JDK 1.6 as standalone container using grizzly (see all tests from Tyrus workspace; we might support more containers when we have time). We have simple container API for it (it is not part of websocket spec, its just our "proprietary" thing).


  • guest Monday, June 3, 2013

    Hi. I was wondering if Tyrus could be used to add WebSocket support to apps deployed on JBOSS app server. JBoss uses a servlet container that is based on Tomcat. Do you have any thoughts on that?


  • Pavel Friday, June 7, 2013

    Hi guest,

    I'm pretty sure that Tomcat does provide some proprietary websocket support, so you might want to start reading their documentation (Tomcat 7.x).

    Tyrus based application most likely wont run, it seems like Tomcat provides only Servlet 3.0 implementation and Tyrus (currently) depends on Servlet 3.1 Upgrade mechanism. This might be improved in the future..


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.