Caucho Newsletter – April 2016

Resin application server - Java EE 6 Web Profile Certified

Greetings! We have lots of updates for you. Here's a snapshot:
  • Baratine – bringing you the 4-day work week!
  • JSON messaging service capable of 5 million messages/second in 15 lines of code
  • TechEmpower benchmarks
  • Resin 4.0 upgrade success story
  • Resin 4.0 improvements
  • Resin tips
  • Technical paper: Scalability! But at what COST?
Baratine News


The 4-day work week is closer than you think   8-)

Caucho is making the 4-day work week a reality. OK, while we can’t guarantee your boss will let you take Fridays off, we can say that major breakthroughs in Baratine are just around the corner and should free up a lot of your time!

Consider your typical LAMP stack (Linux, Apache, MySQL & PHP). Not too long ago these technology stacks were extremely common building blocks in application development. Buidling out a proof of concept was familiar to developers and numerous examples and explanations can be found online. But how do they handle availability, scalability, performance and concurrency? These factors are generally figured out later as improvements to the system. All this work means added complexity and overhead costs.

Baratine is a game changer. It ensures concurrent access to data with no thread management code needed! Baratine persists data to disk without requiring a data schema. Scalability, partitioning, dependency management, performance are all at the forefront of Baratine development. This means you're exposed to an environment that avoids the pitfalls of previous technologies and you'll be done building in no time.

Caucho's experience as one of the first implementers of Servlet and Cloud technology allows us to build such a powerful solution. Resin's success in particular has also allowed us to GPL Baratine as we look to push the next breed of high performing web applications into the world.

What does this mean for you as a developer? 

Happy hour just got happier :-) In short, Baratine is giving you a cheaper (free) and higher performing technology stack that fits more use cases while using less resources than a traditional LAMP stack. We're excited to see where this technology takes your application.

JSON WebSocket Messaging in Baratine

Quick! You need to implement a thread-safe streaming pub/sub (over Websocket) capable of millions of messages per second, isolated as its own service and integrate it with your current application. Oh and it needs to be done yesterday! How fast can you implement this?
If you use Baratine, the answer is 5 minutes and ~13 lines of Java code!
This is the promise of Baratine, whether you are building single JSON processing pub/sub services or fully fledged auctions (, Baratine has been engineered from the thread and data level up to ensure your application automatically fits reactive manifesto (
Take a look at the Java code below. In three files we are able to create a session service that adheres to our requirements:
(Note: we chose to send the current Date at time of request as our message)
public class fooService {
               public void Receive(Result<String> r) {
 Date date = newDate();
public class client implements ServiceWebSocket<String, String>{
                fooService fs;
                public void open(WebSocket<String> ws) {
                           fs.Receive((x,e) -> {
                public static void main(String[] args){
<script type="text/javascript">
var connection = new WebSocket("ws://localhost:8080/msg");
connection.onmessage = function(e) {
Looking at this code, you might be wondering if Baratine a messaging platform. The answer is no, but it can be used as such. It’s 5mb in package size and since we thought all meaningful applications will need some sort of communication to link services, stream updates, etc., we’ve exposed an API for exactly this purpose.
While there are companies out there that will charge you by the message for similar functionality, Baratine is GPL & free to use. We took this example a step further in our documentation and linked it to a RabbitMQ broker (giving you the ability to do big data processing on your existing messages). Take a look at our tutorials and get started with Baratine today! 

TechEmpower Benchmarks

TechEmpower has been running benchmarks for quite some time now, attempting to measure and compare the performance of web frameworks. The term “framework” is used loosely to include platforms and micro-frameworks. Recently, we were able to have Baratine accepted into its next round of benchmark testing ( While benchmarks don’t give an absolute in terms of which framework will be the best for your specific application, it does let you know where a framework measures up for common use cases. If a framework is in the bottom 10% for common use cases, why would you even consider it? If a framework is in the top 10%, it’s worthwhile to be aware of it in case it fits a use case for your business.
In any case, look for Baratine to put up some quite impressive numbers in the field. Interestingly enough, TechEmpower uses our Resin Application Server for the servlet model for the following reason:

Resin is a Java application server. The GPL version that we used for our tests is a relatively lightweight Servlet container. We tested on Tomcat as well but ultimately dropped Tomcat from our tests because Resin was slightly faster across all Servlet-based frameworks.
Note: If they used Resin Pro, the numbers would be even higher :-)  


Resin News

Resin 4.0 Upgrade succuess story

We always recommend upgrading to the latest version of Resin 4.0. Here’s an example of why:
“I also wanted to give you some feedback about the triad. In a nutshell, it's been working great and we are glad we moved to a cluster architecture and upgraded to Resin 4.0.47. We normally use about 10% of each server's processing power so that gives us a lot of leeway and scalability for the future. So many thanks to the team for the advice and support!”
-Y.G. / (Company details removed for privacy)
 If you are running a version of Resin 4.0, the upgrade process simply means running three install commands and copying over your current configuration. For clients running earlier versions of Resin (3.1 or lower) we recommend first installing the latest version of 4.x and deploying your .war file to it. As always, we are available to discuss and provide guidance so that you can take advantage of the upgraded performance features. Contact us at or (858) 456-0300 when you’re ready to go!

Resin 4.0 improvements

The latest version of Resin is 4.0.48 and includes bug fixes related to database and session corruption. It can be downloaded at We continue to improve Resinwith bug fixes and feature requests ensuring it remains the best multithreaded Java Application Server in the world.
If you’ve noticed any odd behavior in your deployment, please do not hesitate to contact us directly or file a report on our bug site at:
Note: you'll need to register an account to log bugs

Resin tips

Looking to use Resin’s hot swap technique from within your IDE (no restarts on a redeploy of code)? If you deploy as a directory or deploy from your workspace, then this is possible!
Check for details.
Deployment options are in “Configure Server” section. Instead of selecting “use remote deployment”, you’ll want to choose either Deploy as a directory or Deploy from workspace.

This tip can cut down on restarts, similar to JRebel. 

Helpful Information 


Technical Paper – Scalability! But at what COST?

COST (Configuration that Outperforms a Single Thread) is a new metric for measuring big data platforms. The paper is quite revealing in both examining your programming model and cost to scale that system. It points out that scaling a system doesn’t guarantee the work will be done faster.
This paper dives into the reality of scalable multicore clusters and compares their performance to a single in-memory thread. Surprisingly, many configurations have a large COST, often hundreds of cores and still underperform one thread for all of their reported configurations.
You can find a copy of the paper here for your reading:
It begs the question, are single threaded models the models of the future? Take a look at and decide for yourself!


Copyright (c) 1998-2016 Caucho Technology, Inc. All rights reserved.
Caucho®, resin®, quercus® and baratine
TM are registered trademarks of Caucho Technology, Inc.

 Presentations   & Links

  Resin 4


Baratine Overview

Follow Us!

Facebook: Caucho Technology
Resin Twitter page
Caucho Blog


Contact Us
(858) 456-0300