From 477828833786b7c721f62e7c2f12fb94322dfe6a Mon Sep 17 00:00:00 2001 From: Christian Egli Date: Mon, 18 May 2015 22:26:15 +0200 Subject: [PATCH 1/4] Update to 2.0.1 --- project.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.clj b/project.clj index 660ffb5..2115489 100644 --- a/project.clj +++ b/project.clj @@ -4,7 +4,7 @@ :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"] - [org.immutant/immutant "2.0.0"] + [org.immutant/immutant "2.0.1"] [compojure "1.3.1"] [ring/ring-devel "1.3.1"] [org.clojure/core.memoize "0.5.6"] From ef7409fbea8bf2d7e22568a3742df57c63a37b82 Mon Sep 17 00:00:00 2001 From: Christian Egli Date: Mon, 18 May 2015 22:29:30 +0200 Subject: [PATCH 2/4] Streamline presentation - add transactions - remove details --- doc/overview.org | 107 +++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 55 deletions(-) diff --git a/doc/overview.org b/doc/overview.org index a2bbb27..16e5b29 100644 --- a/doc/overview.org +++ b/doc/overview.org @@ -1,87 +1,84 @@ +#+STARTUP: inlineimages + +* Immutant [[file:images/immutant_logo.jpg]] * What is Immutant? - A collection of libraries that can be embedded within any Clojure - application. Optionally, the application can be deployed to a stock - [[http://wildfly.org][WildFly]] application server. + A curated collection of libraries that can be embedded within any + Clojure application. Optionally, the application can be deployed to + a stock [[http://wildfly.org][WildFly]] application server. -* The [[https://github.com/immutant/lein-immutant/tree/2x-dev][lein-immutant]] plugin + - web + - messaging + - cache + - transactions + - scheduling - Only required if deploying your app to WildFly. +* Using inside Wildfly -** Tasks + - Use the [[https://github.com/immutant/lein-immutant/tree/2x-dev][lein-immutant]] plugin to create a war - - lein immutant war + ~lein immutant war~ * Using outside of WildFly - Set a =:main= in =project.clj=, and start with =lein run=. - -* Immutant API's + - Set a ~:main~ in ~project.clj~, and start with - Functions whose side effects invoke JBoss services + ~lein run~ -** immutant.web + - just create an uberjar and start with - - app segmentation via virtual host and/or context path - - automatic session replication in a cluster - - auto-reloading in dev mode - - static resources served via [[http://ring-clojure.github.io/ring/ring.middleware.resource.html#var-wrap-resource][ring.middleware.resource/wrap-resource]] - - :ring config, e.g. :handler, :init, :destroy, - stacktraces?, :auto-reload?, :reload-paths - - simple websockets + ~java -jar foo-standalone.jar~ - examples: [[../src/demo/web.clj][demo/web.clj]] and [[../src/demo/websocket.clj][demo/websocket.clj]] +* Immutant API's -** immutant.scheduling + Functions whose side effects invoke JBoss services - - schedules specified by maps created with helper functions - - singleton by default (runs on only one node in cluster) - - not durable + - immutant.web + - immutant.messaging + - immutant.transactions + - immutant.scheduling + - immutant.caching - examples: [[../src/demo/scheduling.clj][demo/scheduling.clj]] +* immutant.web -*** Parameters + - app segmentation via virtual host and/or context path + - automatic session replication in a cluster + - websockets + - server-sent events + - auto-reloading in dev mode - | :at | java.util.Date, millis since epoch, or a military time string "HHmm" | - | :in | start in millis from now, period alias or period spec | - | :every | delay interval in millis, period alias or period spec | - | :repeat | # of repeats after initial firing; with :every | - | :until | java.util.Date, millis since epoch, or "HHmm"; with :every | - | :cron | a Quartz cron spec, described below | + examples: [[../src/demo/web.clj][demo/web.clj]] -*** cron specs +* immutant.messaging - dash for spans, comma for multiples, division for rates + - allows publishing and listening to queues/topics using HornetQ + - supports point-to-point, request-response messaging + - transactional - | seconds | 0-59 | | - | minutes | 0-59 | | - | hours | 0-23 | | - | dom | 1-31 | ? | - | month | 1-12 or JAN-DEC | | - | dow | 1-7 or SUN-SAT | ? | - | year | 1970-2099 | optional | + examples: [[../src/demo/messaging.clj][demo/messaging.clj]] and [[../src/demo/remote_messaging_client.clj][demo/remote_messaging_client.clj]] +* immutant.transactions + - global transactions across db, queues and cache + examples: [[../src/demo/transactions.clj][demo/transactions.clj]] -** immutant.messaging +* immutant.scheduling - - allows publishing and listening to queues/topics using HornetQ - - supports point-to-point, request-response messaging + - schedules specified cron-like or by maps + - singleton by default (runs on only one node in cluster) + - not durable - examples: [[../src/demo/messaging.clj][demo/messaging.clj]] and [[../src/demo/remote_messaging_client.clj][demo/remote_messaging_client.clj]] + examples: [[../src/demo/scheduling.clj][demo/scheduling.clj]] -** immutant.caching +* immutant.caching - - Infinispan transactional data grid - - flexible clustering: replicated, invalidated, distributed - - strong consistency by default, but trades C for A when P - - eviction, expiration, persistence, conditional writes - - implements core.cache/CacheProtocol - - can be used with core.memoize/PluggableMemoization - - can be shared with ruby apps in an app server - - functional alternative: [[https://projectodd.ci.cloudbees.com/job/immutant2-incremental/lastSuccessfulBuild/artifact/target/apidocs/immutant.caching.html#var-swap-in.21][immutant.caching/swap-in!]] + - Infinispan transactional data grid + - flexible clustering: replicated, invalidated, distributed + - strong consistency by default, but trades C for A when P + - eviction, expiration, persistence, conditional writes + - can be shared with ruby apps in an app server - examples: [[../src/demo/caching.clj][demo/caching.clj]] + examples: [[../src/demo/caching.clj][demo/caching.clj]] From 73f3bb446967ca07156b87d0bf59cf6f729b82f1 Mon Sep 17 00:00:00 2001 From: Christian Egli Date: Wed, 20 May 2015 14:00:06 +0200 Subject: [PATCH 3/4] Add a slide about wildfly benefits --- doc/overview.org | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/doc/overview.org b/doc/overview.org index 16e5b29..efbf32b 100644 --- a/doc/overview.org +++ b/doc/overview.org @@ -1,13 +1,16 @@ #+STARTUP: inlineimages * Immutant + [[file:images/immutant_logo.jpg]] * What is Immutant? A curated collection of libraries that can be embedded within any - Clojure application. Optionally, the application can be deployed to - a stock [[http://wildfly.org][WildFly]] application server. + Clojure application. + + Optionally, the application can be deployed to a stock [[http://wildfly.org][WildFly]] + application server. - web - messaging @@ -15,6 +18,14 @@ - transactions - scheduling +* Why WildFly? + + - deployment story + - clustering + - management interface + - datasources + - monitoring + * Using inside Wildfly - Use the [[https://github.com/immutant/lein-immutant/tree/2x-dev][lein-immutant]] plugin to create a war @@ -43,17 +54,18 @@ * immutant.web - - app segmentation via virtual host and/or context path - automatic session replication in a cluster - websockets - server-sent events - auto-reloading in dev mode + - app segmentation via virtual host and/or context path examples: [[../src/demo/web.clj][demo/web.clj]] * immutant.messaging - - allows publishing and listening to queues/topics using HornetQ + - allows publishing and listening to queues/topics + - using HornetQ - supports point-to-point, request-response messaging - transactional From 30adf6e2a0c1f690861628e4e804b2ebac2f8d81 Mon Sep 17 00:00:00 2001 From: Christian Egli Date: Wed, 20 May 2015 14:59:39 +0200 Subject: [PATCH 4/4] Make sure the web app is mounted under the root context --- project.clj | 1 + 1 file changed, 1 insertion(+) diff --git a/project.clj b/project.clj index 2115489..24ae0f6 100644 --- a/project.clj +++ b/project.clj @@ -17,6 +17,7 @@ "http://downloads.immutant.org/incremental/"]] :plugins [[lein-immutant "2.0.0"]] :main demo.core + :immutant {:war {:context-path "/"}} :uberjar-name "demo-standalone.jar" :profiles {:uberjar {:aot [demo.core]}} :min-lein-version "2.4.0"