Nginx-Clojure is a Nginx module for embedding Clojure or Java programs, typically those Ring based handlers.
Release 0.2.2 contains two updates
1. Fix bug of with Compojure 1.1.5 + Apache Solrj 4.3.0 + httpclient 4.3.2 NPE happens first time then everything is OK (issue #22)
2. Verifying option for auto generated waving configurations needed by coroutine based socket (issue #23)
There are some core features of Nginx-Clojure:
- Compatible with Ring and obviously supports those Ring based frameworks, such as Compojure etc.
- Use Java/Clojure code to write a simple nginx rewrite handler to set var before proxy pass
- Non-blocking coroutine based socket which is Compatible with Java Socket API and works well with largely existing java library such as apache http client, mysql jdbc drivers. With this feature one java main thread can handle thousands of connections.
- Handle multiple sockets parallel in sub coroutines, e.g. we can invoke two remote services at the same time feature
- Asynchronous callback API of socket for some advanced usage
- Run initialization clojure code when nginx worker starting
- Compatible with the Nginx lastest stable version 1.6.0. (Nginx 1.4.x is also ok, older version is not tested and maybe works.)
- One of benifits of Nginx is worker processes are automatically restarted by a master process if they crash
- Utilizes lazy headers and direct memory operation between Nginx and JVM to fast handle dynamic contents from Clojure or Java code.
- Utilizes Nginx zero copy file sending mechanism to fast handle static contents controlled by Clojure or Java code.
- Supports Linux x64, Linux x86 32bit, Win32 and Mac OS X. Win64 users can also run it with a 32bit JRE/JDK.