Giter Site home page Giter Site logo

riskinova / nginx-clojure Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nginx-clojure/nginx-clojure

0.0 1.0 0.0 2.52 MB

Nginx module for embedding Clojure or Java or Groovy programs, typically those Ring based handlers.

Home Page: http://nginx-clojure.github.io

License: Other

C 13.75% Java 79.39% Clojure 5.44% JavaScript 0.06% Shell 0.36% Groovy 0.01% HTML 0.99%

nginx-clojure's Introduction

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.4.5, 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. Nginx Access Handler by Clojure / Java / Groovy
  4. Nginx Header Filter by Clojure / Java / Groovy
  5. NEW: Nginx Body Filter by Clojure / Java / Groovy
  6. Pub/Sub Among Nginx Worker Processes
  7. Shared Map based on shared memory & Shared Map based Ring session store
  8. Support Sente, see this PR
  9. Support Per-message Compression Extensions (PMCEs) for WebSocket
  10. APIs for Embedding Nginx-Clojure into a Standard Clojure/Java/Groovy App
  11. Server Side Websocket
  12. A build-in Jersey container to support java standard RESTful web services (JAX-RS 2.0)
  13. Tomcat 8 embedding support (so servlet 3.1/jsp/sendfile/JSR-356 websocket work within nginx!)
  14. 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
  15. 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.
  16. Handle multiple sockets parallel in sub coroutines, e.g. we can invoke two remote services at the same time.
  17. Asynchronous callback API of socket/Channel for some advanced usage
  18. Long Polling & Server Sent Events
  19. Run initialization clojure code when nginx worker starting
  20. Support user defined http request method
  21. Compatible with the Nginx lastest stable version 1.12.0. (Nginx 1.8.x, Nginx 1.6.x, 1.4.x is also ok, older version is not tested and maybe works.)
  22. One of benifits of Nginx is worker processes are automatically restarted by a master process if they crash
  23. Utilizes lazy headers and direct memory operation between Nginx and JVM to fast handle dynamic contents from Clojure or Java code.
  24. Utilizes Nginx zero copy file sending mechanism to fast handle static contents controlled by Clojure or Java code.
  25. Supports Linux x64, Linux x86 32bit, Win32, Win64 and Mac OS X. Freebsd version can also be got from Freebsd ports.

By the way it is very fast, the benchmarks can be found HERE(with wrk2). Jar Repository

Nginx-Clojure has already been published to https://clojars.org/ whose maven repository is

<repository>
  <id>clojars.org</id>
  <url>http://clojars.org/repo</url>
</repository>

After adding clojars repository, you can reference nginx-clojure 0.4.5 , e.g.

Leiningen (clojure, no need to add clojars repository which is a default repository for Leiningen)

[nginx-clojure "0.4.5"]

Gradle (groovy/java)

compile "nginx-clojure:nginx-clojure:0.4.5"

Maven

<dependency>
  <groupId>nginx-clojure</groupId>
  <artifactId>nginx-clojure</artifactId>
  <version>0.4.5</version>
</dependency>

More Documents

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

License

Copyright © 2013-2017 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

nginx-clojure's People

Contributors

xfeep avatar kajtzu avatar linuxjedi avatar tmatilai avatar jstokes avatar kanwei avatar gklijs avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.