• Categories
  • Search

Is WebSocket Session really thread safe?

Todays article would be about one simple use-case of JSR-356: Java API for WebSocket. This was brought to my attention by Mark Thomas, who started relatively long thread on the jsr356-experts mailing list. The described problem can be simplified to following code: 1 2 session.getAsyncRemote().sendText(message); session.getBasicRemote().sendText(message); You might be wondering what is the problem here.. first message is sent asynchronously and the second one synchronously. Session...

Monday, February 9, 2015 | Read More

Reducing WebSocket client jar size with ProGuard

We already know there is a demand for standalone web socket client runnable even on different platforms than just Java EE or Java SE – Tyrus publishes client runtime all-in-one bundles for Java 6 (works on Android!) and Java 7+ (takes advantage of NIO API introduced in Java 7). In following article, we will try to create optimised version of these bundles to see whether they do contain some redundant classes. (spoiler: they do). Tool of the choice for todays exercise would be P...

Wednesday, January 14, 2015 | Read More

New Tyrus sample - Shared Collection

Sometime in JavaOne 2014 timeframe colleague came to me and showed me Meteor.js library, which seems to be really nice javascript framework, client and server side (kudos to the authors!). I started looking at the docs and examples and discovered leaderboard sample. In short, it is about having javascript collection backed up by some (persistent) storage on the server side, which is also shared (or replicated, if you wish) to all other clients. Meteor.js does this in...

Monday, December 1, 2014 | Read More

Tyrus 1.9

Long time no see! After a while (longer than anticipated, sorry about that), we cut off Tyrus 1.9 release. Not much changed in the code since last release, but we were able to squeeze in some stability updates and performance improvements. I’ll highlight some of the features or fixes in next paragraphs: What’s new? Petr worked on new feature tracked as TYRUS-289 – Debug mode. Now you can enable more verbose logging on server, which would start logging data like handshake...

Friday, November 21, 2014 | Read More

Slides from my presentations from JavaOne 2014

I was given the opportunity to attend and speak at JavaOne this year. I’m pretty sure that the slide decks will be made available by conference content system, but If you have not attended or maybe want them little bit faster, you can see it on slideshare. I had two talks, the furst was about the future of Java API for WebSocket (JSR 356): What’s next for Java API for WebSocket (JSR 356) from Pavel Bucek and the other one was about using WebSockets in enterprise applications: W...

Friday, October 3, 2014 | Read More

Tyrus 1.8

Another version of Tyrus, the reference implementation of JSR 356 – Java API for WebSocket is out! Complete list of fixes and features is below, but let me describe some of the new features in more detail. All information presented here is also available in Tyrus documentation. What’s new? First to mention is that JSR 356 Maintenance review Ballot is over and the change proposed for 1.1 release was accepted. More details about changes in the API can be found in this article....

Monday, August 18, 2014 | Read More
 

Visit the Oracle Blog

 

Contact Us

Oracle

Integrated Cloud Applications & Platform Services