Vibe has been renamed to Cettia and is no longer maintained! Use Cettia. ×
flowersinthesand wrote Vibe 3.0.0-Alpha12 released on February 5, 2015.

Vibe Java Server A is a simple B, scalable C Java server designed to run any framework or platform on Java Virtual Machine D.

Vibe 3.0.0-Alpha9 server.
All interface you need to know is Server and ServerSocket. Indeed.
Shared nothing architecture is adopted to help scale application horizontally with ease.
Because it is built on Vibe Java Platform, you can run your application on any platform where it supports seamlessly i.e. Atmosphere, Grizzly, Java WebSocket API, Netty, Play, Servlet and Vert.x.

Quick Start

Vibe Java Server is distributed through Maven Central. A single artifact, org.atmosphere:vibe-server:3.0.0-Alpha12, is enough for general purpose and thanks to Vibe Java Platform, your application can run on any framework or platform it supports.


Once you've set up the build, you will be able to write the following echo and chat server that can run on Servlet containers Atmosphere 2 supports i.e. Tomcat, Jetty and so on.

import javax.servlet.*;
import javax.servlet.annotation.WebListener;

import org.atmosphere.cpr.ApplicationConfig;
import org.atmosphere.vibe.DefaultServer;
import org.atmosphere.vibe.Server;
import org.atmosphere.vibe.ServerSocket;
import org.atmosphere.vibe.platform.action.Action;
import org.atmosphere.vibe.platform.bridge.atmosphere2.VibeAtmosphereServlet;
import org.atmosphere.vibe.transport.http.HttpTransportServer;

public class Bootstrap implements ServletContextListener {
    public void contextInitialized(ServletContextEvent event) {
        // Server consumes transport and produces socket
        final Server server = new DefaultServer();
        // This part can be reused in other platform transparently
        server.socketAction(new Action<ServerSocket>() {
            public void on(final ServerSocket socket) {
                System.out.println("The connection is established successfully and communication is possible");
                // Built-in events
                socket.errorAction(new Action<Throwable>() {
                    public void on(Throwable error) {
                        System.out.println("An error happens on the socket");
                socket.closeAction(new VoidAction() {
                    public void on() {
                        System.out.println("The connection has been closed");
                // Use-defined events
                socket.on("echo", new Action<Object>() {
                    public void on(Object data) {
                        socket.send("echo", data);
                socket.on("chat", new Action<Object>() {
                    public void on(Object data) {
                        server.all().send("chat", data);

        // TransportServer consumes platform resources and produces transport
        HttpTransportServer httpTransportServer = new HttpTransportServer().transportAction(server);
        WebSocketTransportServer wsTransportServer = new WebSocketTransportServer().transportAction(server);

        // This part is about how to integrate the above transport servers with the platform, Atmosphere
        ServletContext context = event.getServletContext();
        Servlet servlet = new VibeAtmosphereServlet().httpAction(httpTransportServer).wsAction(wsTransportServer);
        ServletRegistration.Dynamic reg = context.addServlet(VibeAtmosphereServlet.class.getName(), servlet);
        reg.setInitParameter(ApplicationConfig.DISABLE_ATMOSPHEREINTERCEPTOR, Boolean.TRUE.toString());

    public void contextDestroyed(ServletContextEvent sce) {}

Further Reading

  • To play something right now, start with archetype example on your favorite platform.
  • To take a brief look at API, check out the testee.
  • To get details of API, see API document.
  • To have a thorough knowledge of the implementation, read out the reference.