diff --git a/doc/overview.org b/doc/overview.org index a2bbb27..efbf32b 100644 --- a/doc/overview.org +++ b/doc/overview.org @@ -1,87 +1,96 @@ +#+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. -* The [[https://github.com/immutant/lein-immutant/tree/2x-dev][lein-immutant]] plugin + Optionally, the application can be deployed to a stock [[http://wildfly.org][WildFly]] + application server. - Only required if deploying your app to WildFly. + - web + - messaging + - cache + - transactions + - scheduling -** Tasks +* Why WildFly? - - lein immutant war + - deployment story + - clustering + - management interface + - datasources + - monitoring -* Using outside of WildFly +* Using inside Wildfly - Set a =:main= in =project.clj=, and start with =lein run=. + - Use the [[https://github.com/immutant/lein-immutant/tree/2x-dev][lein-immutant]] plugin to create a war -* Immutant API's + ~lein immutant war~ - Functions whose side effects invoke JBoss services +* Using outside of WildFly + + - Set a ~:main~ in ~project.clj~, and start with -** immutant.web + ~lein run~ - - 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 + - just create an uberjar and start with - examples: [[../src/demo/web.clj][demo/web.clj]] and [[../src/demo/websocket.clj][demo/websocket.clj]] + ~java -jar foo-standalone.jar~ -** immutant.scheduling +* Immutant API's + + 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 + - automatic session replication in a cluster + - websockets + - server-sent events + - auto-reloading in dev mode + - app segmentation via virtual host and/or context path - | :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]] diff --git a/project.clj b/project.clj index 660ffb5..24ae0f6 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"] @@ -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"