Immutant 2 (The Deuce) Beta1 Released

We're as happy as two punk accordion clapping nuns to announce The Deuce's transition from "alpha" to "beta": Immutant 2.0.0-beta1. At this point, we feel pretty good about the stability of the API, the performance, and the compatibility with both WildFly 8 and the forthcoming WildFly 9.

We expect a final release shortly after WF 9 is official. We would appreciate all interested parties to try out this release and submit whatever issues you find. And again, big thanks to all our early adopters who provided invaluable feedback on the alpha and incremental releases.

What is Immutant?

Immutant is an integrated suite of Clojure libraries backed by Undertow for web, HornetQ for messaging, Infinispan for caching, Quartz for scheduling, and Narayana for transactions. Applications built with Immutant can optionally be deployed to a WildFly cluster for enhanced features. Its fundamental goal is to reduce the inherent incidental complexity in real world applications.

What's changed in this release?

Bug fixes and docs, of course, plus:

  • Infinispan provides a robust notifications API, invoking callback functions in response to various types of events occurring within a cache's lifecycle. Unfortunately, this API is exposed exclusively through Java annotations, which can be awkward in more dynamic JVM languages like Clojure. So we introduced immutant.caching/add-listener! as a means to engage the notifications API using keywords instead of annotations.
  • By default, Immutant's embedded Undertow web server dispatches requests across a pool of worker threads, but this can adversely impact performance for compute-bound handlers. So we introduced a :dispatch? option for immutant.web/run that, when false, avoids the context switch by invoking the handler on the IO thread accepting the request.
  • Configuration of the cookie identifying session data is now supported by the immutant.web.middleware/wrap-session function.
  • Boolean options to all functions should be consistently suffixed with ? now.

For a full list of changes, see the issue list below.

How to try it

If you're already familiar with Immutant 1.x, you should take a look at our migration guide. It's our attempt at keeping track of what we changed in the Clojure namespaces.

The guides are another good source of information, along with the rest of the apidoc.

For a working example, check out our Feature Demo application!

Get It

There is no longer any "installation" step as there was in 1.x. Simply add the relevant dependency to your project as shown on Clojars.

What's next?

We expect to have a fairly short beta cycle, with a final release once we ensure that everything works well with the upcoming WildFly 9 release.

Get In Touch

If you have any questions, issues, or other feedback about Immutant, you can always find us on #immutant on freenode or our mailing lists.

Issues resolved in 2.0.0-beta1

  • [IMMUTANT-399] - Add listeners interface for InfiniSpan caches
  • [IMMUTANT-468] - Records can't be sent over pipeline when embedded, but work in-container
  • [IMMUTANT-503] - Figure out what we're missing from our poms that clojars promotion expects
  • [IMMUTANT-504] - :context passed to msg/topic is ignored
  • [IMMUTANT-505] - immutant.wildfly causes wildlfly deploy to fail
  • [IMMUTANT-506] - Set the character encoding correctly for response content
  • [IMMUTANT-507] - Add option to run compute-bound handlers on IO thread
  • [IMMUTANT-508] - immutant.web.middleware/wrap-session misbehaves outside of server context
  • [IMMUTANT-510] - Consider adding more options to immutant.web.middleware/wrap-session
  • [IMMUTANT-511] - Catch errors from browse-url in run-dmc
  • [IMMUTANT-512] - Make the usage of ?-suffixed keywords for boolean options consistent
  • [IMMUTANT-513] - add section about context modes to messaging guide

Immutant 2 (The Deuce) Alpha2 Released

We're as happy as a cat getting vacuumed to announce our second alpha release of The Deuce, Immutant 2.0.0-alpha2.

Big, special thanks to all our early adopters who provided invaluable feedback on alpha1 and our incremental releases.

What is Immutant?

Immutant is an integrated suite of Clojure libraries backed by Undertow for web, HornetQ for messaging, Infinispan for caching, Quartz for scheduling, and Narayana for transactions. Applications built with Immutant can optionally be deployed to a WildFly cluster for enhanced features. Its fundamental goal is to reduce the inherent incidental complexity in real world applications.

A few highlights of The Deuce compared to the previous 1.x series:

  • It uses the Undertow web server -- it's much faster, with WebSocket support
  • The source is licensed under the Apache Software License rather than LPGL
  • It's completely functional "embedded" in your app, i.e. no app server required
  • It may be deployed to latest WildFly for extra clustering features

What's changed in this release?

  • Though not strictly part of the release, we've significantly rearranged our documentation. The "tutorials" are now called "guides", and we publish them right along with the apidoc. This gives us a "one-stop doc shop" with better, cross-referenced content.
  • We've introduced an org.immutant/transactions library to provide support for XA distributed transactions, a feature we had in Immutant 1.x, but only recently made available in The Deuce, both within WildFly and out of the container as well. The API is similar, with a few minor namespace changes, and all Immutant caches and messaging destinations are XA capable.
  • We're now exposing flexible SSL configuration options through our immutant.web.undertow namespace, allowing you to set up an HTTPS listener with some valid combination of SSLContext, KeyStore, TrustStore, KeyManagers, or TrustManagers.
  • We've made a large, breaking change to our messaging API. Namely, we've removed the connection and session abstractions, and replaced them with a single one: context. This is somewhat motivated by our implementation using the new JMS 2.0 api's.
  • Datomic can now be used with an Immutant application when inside of WildFly without having to modify the WildFly configuration or add any exclusions. Unfortunately, you still cannot use Datomic with an application that uses org.immutant/messaging outside of WildFly, due to conflicts between the HornetQ version we depend on and the version Datomic depends on. See IMMUTANT-497 for more details.
  • HornetQ is now configured via standard configuration files instead of via static Java code, allowing you to alter that configuration if need be. See the messaging guide for details.

We've also released a new version of the lein-immutant plugin (2.0.0-alpha2). You'll need to upgrade to that release if you will use alpha2 of Immutant with WildFly.

For a full list of changes, see the issue list below.

How to try it

If you're already familiar with Immutant 1.x, you should take a look at our migration guide. It's our attempt at keeping track of what we changed in the Clojure namespaces.

The guides are another good source of information, along with the rest of the apidoc.

For a working example, check out our Feature Demo application!

Get It

There is no longer any "installation" step as there was in 1.x. Simply add the relevant dependency to your project as shown on Clojars.

What's next?

We expect to release a beta fairly soon, once we ensure that everything works well with the upcoming WildFly 9 release.

Get In Touch

If you have any questions, issues, or other feedback about Immutant, you can always find us on #immutant on freenode or our mailing lists.

Issues resolved in 2.0.0-alpha2

  • [IMMUTANT-466] - App using datomic can't find javax.net.ssl.SSLException class in WildFly
  • [IMMUTANT-467] - Datomic HornetQ Conflicts with WildFly
  • [IMMUTANT-473] - web/run only works at deployment inside wildfly
  • [IMMUTANT-474] - See if we need to bring over any of the shutdown code from 1.x to use inside the container
  • [IMMUTANT-475] - Write tutorial on overriding logging settings in-container
  • [IMMUTANT-477] - Figure out how to get the web-context inside WildFly
  • [IMMUTANT-478] - Consider wrapping scheduled jobs in bound-fn
  • [IMMUTANT-479] - Get XA working in (and possibly out of) container
  • [IMMUTANT-480] - Immutant running out of a container does not handle laptop suspend gracefully
  • [IMMUTANT-481] - Expose way to set the global log level
  • [IMMUTANT-482] - Destinations with leading slashes fail to deploy in WildFly
  • [IMMUTANT-483] - Allow nil :body in ring response
  • [IMMUTANT-484] - app-uri has a trailing slash
  • [IMMUTANT-485] - The wunderboss-core jar file has a logback.xml file packaged inside of it which competes with a locally configured logback.xml
  • [IMMUTANT-487] - Enable explicit control of an embedded web server
  • [IMMUTANT-488] - Provide better SSL support than just through the Undertow.Builder
  • [IMMUTANT-489] - Re-running servlets yields IllegalStateException
  • [IMMUTANT-490] - Don't register fressian codec by default
  • [IMMUTANT-491] - at-exit handlers can fail if they refer to any wboss components
  • [IMMUTANT-492] - Expose HornetQ broker configuration options
  • [IMMUTANT-493] - Revert back to :host instead of :interface for nrepl options
  • [IMMUTANT-494] - Expose controlling the context mode to listen
  • [IMMUTANT-496] - Expose way to override HornetQ data directories
  • [IMMUTANT-498] - Replace connection and session with a single context abstraction
  • [IMMUTANT-499] - Consider renaming :client-id on context to :subscription-name
  • [IMMUTANT-500] - Throw if listen, queue, or topic is given a non-remote context
  • [IMMUTANT-501] - Running the standalone JAR with default "/" context path requires extra slash for inner routes
  • [IMMUTANT-502] - Rename caching/compare-and-swap! to swap-in!

Using Transit with Immutant 2

Out of the box, Immutant 2 has support for several data serialization strategies for use with messaging and caching, namely: EDN, Fressian, JSON, and none (which falls back to Java serialization). But what if you want to use another strategy? Luckily, this isn't a closed set - Immutant allows us to add new strategies. We took advantage of that and have created a separate project that brings Transit support to Immutant - immutant-transit.

What is Transit?

From the Transit format page:

Transit is a format and set of libraries for conveying values between applications written in different programming languages.

It's similar in purpose to EDN, but leverages the speed of the optimized JSON readers that most platforms provide.

What does immutant-transit offer over using Transit directly?

immutant-transit provides an Immutant codec for Transit that allows for transparent encoding and decoding of Transit data when using Immutant's messaging and caching functionality. Without it, you would need to set up the encode/decode logic yourself.

Usage

Note: immutant-transit won't work with Immutant 2.0.0-alpha1 - you'll need to use an incremental build (#298 or newer).

First, we need to add org.immutant/immutant-transit to our application's dependencies:

  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.immutant/immutant "2.x.incremental.298"]
                 [org.immutant/immutant-transit "0.2.2"]]

If you don't have com.cognitect/transit-clj in your dependencies, immutant-transit will transitively bring in version 0.8.259. We've tested against 0.8.255 and 0.8.259, so if you're running another version and are seeing issues, let us know.

Now, we need to register the Transit codec with Immutant:

  (ns your.app
    (:require [immutant.codecs.transit :as it]))

  (it/register-transit-codec)

This will register a vanilla JSON Transit codec that encodes to a byte[] under the name :transit with the content-type application/transit+json (Immutant uses the content-type to identify the encoding for messages sent via HornetQ).

To use the codec, provide it as the :encoding option wherever an encoding is used:

  (immutant.messaging/publish some-queue {:a :message} :encoding :transit)

  (def transit-cache (immutant.caching/with-codec some-cache :transit))
  (immutant.caching/compare-and-swap! transit-cache a-key a-function)

If you need to change the underlying format that Transit uses, or need to provide custom read/write handlers, you can pass them as options to register-transit-codec:

  (it/register-transit-codec
    :type :json-verbose
    :read-handlers my-read-handlers
    :write-handlers my-write-handlers)

The content-type will automatically be generated based on the :type, and will be of the form application/transit+<:type>.

You can also override the name and content-type:

  (it/register-transit-codec
    :name :transit-with-my-handlers
    :content-type "application/transit+json+my-stuff"
    :read-handlers my-read-handlers
    :write-handlers my-write-handlers)

For more examples, see the example project.

Why is this a separate project from Immutant?

Transit's format and implementation are young, and are still in flux. We're currently developing this as a separate project so we can make releases independent of Immutant proper that track changes to Transit. Once Transit matures a bit, we'll likely roll this in to Immutant itself.

If you are interested in adding a codec of your own, take a look at the immutant-transit source and at the immutant.codecs namespace to see how it's done.

Get In Touch

If you have any questions, issues, or other feedback about mmutant-transit, you can always find us on #immutant on freenode or our mailing lists.

Immutant 2 (The Deuce) Alpha Released

We're as excited as this little girl to announce our first alpha release of The Deuce, Immutant 2.0.0-alpha1.

This represents a significant milestone for us, as we've completely removed the app server from Immutant. It's just jars now. We've put a lot of thought into the API and performed enough integration testing to feel confident putting an alpha out at this time.

Big, special thanks to all our early adopters who provided invaluable feedback on our incremental releases these past few months.

What is Immutant?

Immutant is an integrated suite of Clojure libraries backed by Undertow for web, HornetQ for messaging, Infinispan for caching, and Quartz for scheduling. Applications built with Immutant can optionally be deployed to a WildFly cluster for enhanced features. Its fundamental goal is to reduce the inherent incidental complexity in real world applications.

A few highlights of The Deuce compared to the previous 1.x series:

  • It uses the Undertow web server -- it's much faster, with WebSocket support
  • The source is licensed under the Apache Software License rather than LPGL
  • It's completely functional "embedded" in your app, i.e. no app server required
  • It may be deployed to latest WildFly for extra clustering features

How to try it

If you're already familiar with Immutant 1.x, you should take a look at our migration guide. It's our attempt at keeping track of what we changed in the Clojure namespaces.

The tutorials are another good source of information, along with the apidoc.

For a working example, check out our Feature Demo application!

Get It

There is no longer any "installation" step as there was in 1.x. Simply add the relevant dependency to your project as shown on Clojars.

What's next?

For the first release, we focused on the API and on usage outside of a container. For the next alpha, we plan on focusing on making in-container behavior more robust. Take a look at our current issues if you want to follow along.

Get In Touch

If you have any questions, issues, or other feedback about Immutant, you can always find us on #immutant on freenode or our mailing lists.

Immutant 1.1.4 Released

We're as happy as a kid at a basketball game to announce Immutant 1.1.4 - "OneFourMoreTheRoad".

This is strictly a bug fix release and, unless any new bugs are reported against it, possibly our last 1.x release. We are now focusing our efforts on The Deuce. We will make every reasonable effort to fix any bugs reported against 1.x, but we will only be adding features to 2.x. As always, view our road map here.

What is Immutant?

Immutant is an application server for Clojure. It's an integrated platform built on JBoss AS7 that aims to reduce the inherent incidental complexity in real world applications.

What's in this release?

The notable changes in this release are:

  • META-INF/ and WEB-INF/ directories on your resource path are now honored.
  • We've restored the needed bits to allow remote jmx connections.
  • Recent cider-nrepl snapshots require tools.nrepl to be on the classpath at the time the project.clj is resolved, so it's now available.
  • We no longer force tools.logging to use log4j. Note: If you were relying on that behavior, see IMMUTANT-464.

Get It

The simplest way to install or upgrade to 1.1.4 is via our Leiningen plugin:

$ lein immutant install 1.1.4

See our install page for more details. Once you have it installed, take a look at our tutorials.

What's next?

As we said above, we'll be focusing on Immutant 2, with a tentative alpha release in the next few weeks.

Get In Touch

If you have any questions, issues, or other feedback about Immutant, you can always find us on #immutant on freenode or our mailing lists.

Issues resolved in 1.1.4

  • [IMMUTANT-452] - Remote jmx not supported by default distribution
  • [IMMUTANT-453] - Immutant ignores logback config
  • [IMMUTANT-455] - META-INF and WEB-INF in a resource dir should be honored
  • [IMMUTANT-457] - Yet more com.sun packages need to be exposed in the sun.jdk module. This time, it's sound packages.
  • [IMMUTANT-459] - Recent cider-nrepl snapshots cause deployment to fail because it can't find tools.nrepl
  • [IMMUTANT-464] - Don't force tools.logging to use a particular provider