Liking cljdoc? Tell your friends :D

Nginx-Clojure

Alt text Nginx-Clojure is a Nginx module for embedding Clojure or Java or Groovy programs, typically those Ring based handlers.

Core Features

The latest release is v0.2.6, more detail changes about it can be found from Release History.

  1. Compatible with Ring and obviously supports those Ring based frameworks, such as Compojure etc.
  2. Http Services by using Clojure / Java / Groovy to write simple handlers for http services.
  3. Dynamic proxying by using Clojure / Java / Groovy to write a simple nginx rewrite handler to set var or return errors before proxy pass or content ring handler
  4. 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.
  5. Handle multiple sockets parallel in sub coroutines, e.g. we can invoke two remote services at the same time.
  6. Asynchronous callback API of socket/Channel(NEW) for some advanced usage
  7. NEW: Long Polling & Server Sent Events
  8. NEW: More easier to archive Sub/Pub services with broadcast events API
  9. Run initialization clojure code when nginx worker starting
  10. Support user defined http request method
  11. 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.)
  12. One of benifits of Nginx is worker processes are automatically restarted by a master process if they crash
  13. Utilizes lazy headers and direct memory operation between Nginx and JVM to fast handle dynamic contents from Clojure or Java code.
  14. Utilizes Nginx zero copy file sending mechanism to fast handle static contents controlled by Clojure or Java code.
  15. Supports Linux x64, Linux x86 32bit, Win32, Win64(NEW) and Mac OS X.

More Documents

More Documents can be found from its web site nginx-clojure.github.io

License

Copyright © 2013-2014 Zhang, Yuexiang (xfeep) and released under the BSD 3-Clause license.

This program uses:

  • Re-rooted ASM bytecode engineering library which is distributed under the BSD 3-Clause license
  • Modified Continuations Library Written by Matthias Mann is distributed under the BSD 3-Clause license

Can you improve this documentation? These fine people already did:
xfeep & Jeff Stokes
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close