main website home
  • About this blog

    This blog features updates, opinions, and technical notes from Caucho engineers about Caucho products, the enterprise Java industry, and PHP. Caucho Technology is the creator of the Resin Application Server and the Quercus PHP in Java engine. A leader in Java performance since 1998, Caucho is a Sun JavaEE licensee with over 9000 customers worldwide.
  • Tags

    ajaxworld bam candi cdi cloud cluster comet configuration deploy devoxx eclipse ejb embedded flash flex google app engine hessian hmtp ioc java ee 6 javaone javazone jms messaging newsletter nyjug osgi php pomegranate quercus resin resin 4.0 REST servlet sfjug silicon valley code camp spring testing training tssjs watchdog webbeans web profile websockets wordpress
  • Meta

    • Register
    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org

Stopping Resin: -stop, -shutdown or -kill?

August 29th, 2011 by Paul Cowan

Regardless of the operation system you’re running, Resin includes 3 distinct commands for the purpose of stopping the application server. In this tip of the month I’ll explain each command in details, discuss how they differ, and provide some advice on under what circumstance it is appropriate to use each.

Read the rest of this entry »

Tags: -kill, -shutdown, -stop, watchdog
Posted in Uncategorized | 1 Comment »

Resin Pro Health System now and in the future

August 26th, 2011 by caucho

Resin Pro Health System now and in the future

Resin Pro made significant improvements in its already capable Health System. Improvements include reporting, and post mortem triggering. Resin Pro provides a level of reliability, and system transparency that is unparalleled in the Java EE space. You can see what is going on in every server node in the cloud (or just a single server for smaller shops). If a problem occurs with your code, or with library code that you use, Resin can give you a snapshot of the server state. Imagine just in time profile data and information needed to diagnose a problem. Agile devops!

Read the rest of this entry »

Posted in Uncategorized | No Comments »

WebSockets in Resin

August 22nd, 2011 by ferg

WebSockets is an IETF specification designed to enable more truly interactive browser applications. It creates a message-based system over TCP, after upgrading from a HTTP request. The messages to and from the browser allow for server-sent events and asynchronous notifications. Think of it as a clean implementation of Comet.

The first applications will likely be simple chat improvements, and will become more sophisticated. Google has already demonstrated a Quake implementation.

Resin’s WebSockets API is designed around streams and messages. Each WebSocket message is a traditional Java stream. The message ends when the stream ends.

Your applications receives messages from a listener, because messages are asynchronous and because Resin wants to save threads when no activity is occurring. When your listener finishes Resin will send the next message:

public interface WebSocketListener { public void onReadBinary(WebSocketContext context, InputStream is) throws IOException; public void onReadText(WebSocketContext context, Reader is) throws IOException; }

You’ll want to read the messages quickly and hand them off, because the next message will wait until you’re done with the current message.

Sending messages is also stream-based. Your application starts a new message with a startBinaryMessage() or startTextMessage() call, writes to the OutputStream or PrintWriter, and closes it when the message completes.

public interface WebSocketContext {
  public OutputStream startBinaryMessage()
    throws IOException;
  public PrintWriter startTextMessage()
    throws IOException;
}

Again, you’ll want to write the message quickly because the next message will wait until the current one finishes.

Posted in Uncategorized | No Comments »

An Overview of Resin Native Optimizations

July 25th, 2011 by Paul Cowan

Given that Resin’s Unix installer is a ‘make’ script, and the Windows version includes .dll files, users are often inquisitive about how and why Resin makes use of native code. In this tip of the month I’ll discuss Resin’s native optimizations, what native optimizations are provided in Resin Pro vs Open-Source, and when the native libraries are occasionally required.

Read the rest of this entry »

Posted in Uncategorized | No Comments »

Resin Java EE Web Profile and Beyond!!

June 27th, 2011 by caucho

You have no doubt heard of Java EE Web Profile. In the words of Rod Johnson, founder of the spring framework project, “Java EE 6 Gets it Right”.

Java EE Web Profile is the standard for servers that are more focused on web development using the pieces of the traditional Java EE stack that matter the most. You could say it is all of the stuff with none of the fluff. It allows vendors to create a slim focused application server. In our opinion, it allows vendors to provide an application server that fits the most common case of Java EE development. It has allowed Caucho to focus on what Resin does best, Java EE web development without the distraction of features that our clients don’t use.

Read the rest of this entry »

Posted in Uncategorized | No Comments »

JavaLobby Resin 4 Tech Chat Trip Report

June 27th, 2011 by Reza Rahman

I just came back from a trip to the Raleigh, NC area to record a JavaLobby Tech Chat on Resin 4 (last year Emil did a Tech Chat that you might have seen). The Tech Chat went great. Mitch Pronschinske, the Editor-in-Chief of JavaLobby/DZone drove the Chat. Not to give away too much right now but we talked about:

  • Past/present/future of Resin
  • Defining characteristics of Resin - lightweight, standard and feature-complete
  • Resin 4 Java EE 6 Web Profile certification
  • Java EE Web Profile leadership
  • How it stacks up against Tomcat/JBoss/GlassFish/WebLogic/WebSphere
  • Small, dedicated, agile World class engineering team
  • CDISource - a vendor-neutral space for all things CDI
  • The CDISource Spring/CDI bridge
  • Possibilities for Java EE 7/Java EE 8 (open for participation from you!)
  • Early Resin WebSocket support
  • Resin support for private clouds

Keep your eye on JavaLobby - the Tech Chat should be out there soon!

I chose to drive to NC to avoid the hassle of flying and because NC is quite drivable from my home office in Philly. On the way back, I did CDI demos at both the Research Triangle JUG and the NoVA/Washington, D.C. JUG. Both talks were very well attended. The interest/participation levels were fantastic. The DZone folks gave me a few nice printed copies of the CDI RefCard. Every single copy was taken and people were asking for more! They also asked me for the slide deck and code examples. I’ll send them to the JUG leads to post on the JUG websites. You can also take a look at the slide deck and code examples if you want and send me any follow-up questions. I also wanted to talk at the Maryland and Richmond JUGs but things didn’t quite work out schedule-wise this time around. Both JUGs are working on scheduling me to speak in the Fall instead.

Tags: candi, cdi, cdisource, java ee 6, java ee 7, java ee 8, javalobby, nova washington dc jug, private cloud, resin, spring, triangle jug, web profile, websocket
Posted in Uncategorized | No Comments »

Resin fulfills the vision of Cloud computing in a Java EE environment

May 31st, 2011 by caucho

What makes a good cloud offering for a Java EE server? What do developers and architects expect from a Java EE vendor to be cloud ready?

I suspect they expect the following:

  • Cloud ready
  • Elastic ready
  • Ability to manage the nodes in the cloud
  • Ability to manage versions in the cloud

Cloud ready

The advantage we get from deploying applications to the cloud is the ability to scale up processing nodes (Java EE servers) rapidly if needed. And the ability to re-purpose processing nodes (spin down, re-purpose and spin back up) when needed as well. This can be in a public cloud setting like Amazon EC2 or in a private cloud (VMWare vCloud) or some combination thereof.

Elastic ready

To be elastic, is to be flexible. The ability to bring up a new node without any configuration.

Ability to manage nodes in the cloud

Once you have nodes deployed in the cloud, how do you manage them? How do you check the health of so many nodes? How do you keep your eye on them all?

Ability to manage versions in the cloud

A common problem with cloud computing and Java EE servers is application archive versioning, war files, and ear files. How do you version a new war file? More importantly, how do you deploy one war file to the entire cloud? Can you deploy a version in a graceful manner without bringing down the entire cloud of nodes?

Resin Java EE 6 application server

Caucho’s Resin server is an elastic cloud ready, Java EE 6 Web Profile server. It has the ability to bring up new instances in an elastic cloud environment. The triad is the brain of the pod. A pod is a collection of nodes that serves some common set of applications. New instances, called dynamic servers, join the pod, talk to the triad and get the current versions of the applications to run. Then they start running the applications.

Cloud aware, load aware, intelligent load balancer

The pod load balancer is smart enough to allow the new dynamic server some time to warm up and install its applications from the triad before it starts sending it requests. The pod load balancer can truly balance the load based on the true load on each node, not just random round robin load balancing. The load balancer can also act as an http proxy cache to increase throughput by caching images, css files and other web resources.

Cloud failover that is cloud deployment version aware

Membership has its privileges, once up, the new dynamic server joins the pod services. It gets reliable, failover sessions. It gets reliable, failover caching. It gets reliable, failover messaging. Everything you would expect from a cloud computing platform like Caucho Resin server.

Now what if for some reason a node in the pod goes down. And then let’s say you deploy new versions of the applications. Then later, we bring that node back up. Does it start serving an old version of the application? No. Of course not. It talks to the triad and gets the current version of the applications.

Our deployment mechanism is truly cloud aware. It versions the deployments. You can even rollback an entire pod to a previous version. You can also gradually deploy a new version of the application. New sessions in the pod will use the new version of the application while existing sessions will use the older version of the application. Eventually all of the older session timeout and only sessions using the new application are active.

Manageable cloud

Also with Resin you can manage entire pods from load balancer to http proxy cache to triad to individual dynamic servers with a single admin tool. This admin tools allows you to profile, analyze GC, Heap, PermGen, OS memory, monitor threads, inspect memory usage at the class level, and other Java VM graphs and OS graphs from one console for every node in the pod. The support the admin tool provides rivals that of some dedicated profiling tools but does it for your entire pod. Now you can really see what is going on in the cloud.

Health Watches to auto-manage your cloud

You can also setup up health watches so you know when some critical situation has been released and then take some action to monitor, diagnose and control your cloud.

Resin is a Java EE, cloud computing ready server

Resin goes beyond just being a processing node in an elastic cloud. It is truly an intelligent elastic cloud coordinator bringing the promise of cloud computing into the hands of Java EE developers.

Posted in Uncategorized | No Comments »

An overview of Resin directories

May 26th, 2011 by Paul Cowan

Based on a few recent support queries, some clarification of Resin’s directory structure should be beneficial for everyone and new users in particular.  This is all spelled out in the documentation, just in different words.

Read the rest of this entry »

Tags: configure parmeters, deploy directory, init.d, log directory, resin-home, resin.home, resin.root, startup
Posted in Uncategorized | 1 Comment »

Resin 4.0.18 release

May 12th, 2011 by ferg

Resin 4.0.18 is now available at http://caucho.com/download. Release notes are at http://caucho.com/resin-4.0/changes/resin-4.0.18.xtp.

Resin 4.0.18 is primarily a quality and bug-fix release. For the next several months we’ll be focusing on quality and bug fixes with limited new features. So now is a good time to test it out and to report any bugs at http://bugs.caucho.com.

Posted in Uncategorized | No Comments »

Health Check System Enhancements

April 22nd, 2011 by Paul Cowan

Now that Resin is passing all the required TCKs and is ready for Java EE 6 Web Profile certification, we plan to shift focus to quality and stability for the next few months.  Updates to the HealthCheck system, which are already underway, are an important part of that effort.

Resin 4.0.16 and later includes “health.xml”, a new configuration file dedicated to health checks, action, and meters.  This is a big step forward from Resin’s <ping> or <resin:PingThread> that some users may be familiar with.  While external application monitoring is important to your overall system architecture, the real power of Resin’s health monitoring is the ability to easily trigger things like restarts and thread dumps that would otherwise require custom external hooks.
Read the rest of this entry »

Tags: cpu, dump heap, dump threads, flapping, health, memory, recover, restart, thread count
Posted in Uncategorized | No Comments »

« Older Entries
Newer Entries »

Caucho Technology is proudly powered by WordPress and Quercus®
Entries (RSS) and Comments (RSS).

  • HOME |
  • CONTACT US |
  • DOCUMENTATION |
  • BLOG |
  • WIKI 4 |
  • WIKI 3 |
  • Resin: Java Application Server
Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
caucho® , resin® and quercus® are registered trademarks of Caucho Technology, Inc.
resin® is a cloud optimized, java® application server that supports the java ee webprofile ®