Scalable, Concurrent Web Apps
COMSAT
Getting started
In Maven:
<dependency>
<groupId>co.paralleluniverse</groupId>
<artifactId>ARTIFACT</artifactId>
<version>0.4.0</version>
</dependency>
The corresponding Gradle dependency is 'co.paralleluniverse:ARTIFACT:0.4.0'
Where ARTIFACT
is:
comsat-servlet
– Servlet integration for defining fiber-per-request servlets.comsat-ring-jetty9
- A fiber-blocking Clojure Ring adapter based on Jetty 9.2comsat-httpkit
- HTTP Kit-based fiber-blocking HTTP client.comsat-jersey-server
– Jersey server integration for defining REST services.comsat-dropwizard
– Dropwizard integration including Jersey, ApacheHttpClient and JDBI.comsat-spring-webmvc
– Spring Framework Web MVC fiber-blocking controller methods integration.comsat-spring-boot
– Spring Boot auto-configuration support for Web MVC controllers.comsat-spring-security
– Spring Security configuration support for fibers.comsat-jax-rs-client
– JAX-RS client integration for calling HTTP services.comsat-httpclient
– ApacheHttpClient integration for calling HTTP services.comsat-retrofit
– Retrofit integration.comsat-jdbi
– JDBI integration for using the JDBI API in fibers.comsat-jdbc
– JDBC integration for using the JDBC API in fibers.comsat-jooq
– jOOQ integration for using the jOOQ API in fibers.comsat-mongodb-allanbank
– MongoDB integration for using the allanbank APIcomsat-okhttp
– OkHttp HTTP+SPDY client integration.comsat-actors-api
– the Web Actors APIcomsat-actors-servlet
– Enables HTTP and WebSocket (JSR-356) usage through Web Actors APIcomsat-tomcat-loader
– Enables using Comsat in Tomcat container without the need of javaAgentcomsat-spring-web
– Spring Framework Web integration allows using fiber-blocking controllers
Or, build and install from sources (after installing Gradle locally) in your local maven repository with:
gradle install
The full testsuite can be run with gradle build
.
Usage
A Gradle template project and a Maven archetype using various integration modules and featuring setup with both Dropwizard and standalone Tomcat are also available for jumpstart and study. Both have a without-comsat
branch which is useful to clearly see the (minimal, if any) porting effort required (branches comparison works very well for this purporse).
There's a Comsat-Ring Clojure Leiningen template as well which includes an auto-instrument
branch that doesn't need any explicit suspendable-marking code (suspendable!
, defsfn
, sfn
etc.) thanks to Pulsar's new auto-instrumentation feature.
You can also have a look at additional examples.
Finally there are several regularly updated third-party bootstrap projects: Comsat + Dropwizard + jOOQ, Comsat Web Actors Stock Quotes (ported from Akka), Spring MVC + Tomcat standalone servlet container.
Getting help
Questions and suggestions are welcome at this forum/mailing list.
License
COMSAT is free software published under the following license:
Copyright (c) 2013-2015, Parallel Universe Software Co. All rights reserved.
This program and the accompanying materials are dual-licensed under
either the terms of the Eclipse Public License v1.0 as published by
the Eclipse Foundation
or (per the licensee's choosing)
under the terms of the GNU Lesser General Public License version 3.0
as published by the Free Software Foundation.