Skip to content

Commit 1ef7621

Browse files
committed
add docs for 0.4.3
1 parent 8feb04a commit 1ef7621

36 files changed

+4609
-661
lines changed

CoreFeatures.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
Core Features
22
=================
33

4-
The latest release is v0.4.2, more detail changes about it can be found from [Release History](downloads.html).
4+
The latest release is v0.4.3, more detail changes about it can be found from [Release History](//nginx-clojure.github.io/downloads.html).
55

66
1. Compatible with [Ring](https://github.com/ring-clojure/ring/blob/master/SPEC) and obviously supports those Ring based frameworks, such as Compojure etc.
77
1. Http Services by using Clojure / Java / Groovy to write simple handlers for http services.
88
1. Nginx Access Handler by Clojure / Java / Groovy
9-
1. Nginx Header Filter by Clojure / Java / Groovy
9+
1. Nginx Header Filter by Clojure / Java / Groovy
10+
1. **_NEW_**: Pub/Sub Among Nginx Worker Processes
11+
1. **_NEW_**: Shared Map based on shared memory & Shared Map based Ring session store
1012
1. **_NEW_**: Support Sente, see [this PR](https://github.com/ptaoussanis/sente/pull/160)
1113
1. **_NEW_**: Support Per-message Compression Extensions (PMCEs) for WebSocket
12-
1. **_NEW_**: APIs for Embedding Nginx-Clojure into a Standard Clojure/Java/Groovy App
13-
1. **_NEW_**: Server Side Websocket
14+
1. APIs for Embedding Nginx-Clojure into a Standard Clojure/Java/Groovy App
15+
1. Server Side Websocket
1416
1. A build-in Jersey container to support java standard RESTful web services (JAX-RS 2.0)
1517
1. Tomcat 8 embedding support (so servlet 3.1/jsp/sendfile/JSR-356 websocket work within nginx!)
1618
1. 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
@@ -19,7 +21,6 @@ With this feature one java main thread can handle thousands of connections.
1921
1. Handle multiple sockets parallel in sub coroutines, e.g. we can invoke two remote services at the same time.
2022
1. Asynchronous callback API of socket/Channel for some advanced usage
2123
1. Long Polling & Server Sent Events
22-
1. More easier to archive Sub/Pub services with broadcast events API
2324
1. Run initialization clojure code when nginx worker starting
2425
1. Support user defined http request method
2526
1. Compatible with the Nginx lastest stable version 1.8.0. (Nginx 1.6.x, 1.4.x is also ok, older version is not tested and maybe works.)

CoreFeatures.md.html

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
<h1>
22
<a id="user-content-core-features" class="anchor" href="#core-features" aria-hidden="true"><span class="octicon octicon-link"></span></a>Core Features</h1>
33

4-
<p>The latest release is v0.4.2, more detail changes about it can be found from <a href="downloads.html">Release History</a>.</p>
4+
<p>The latest release is v0.4.3, more detail changes about it can be found from <a href="//nginx-clojure.github.io/downloads.html">Release History</a>.</p>
55

66
<ol>
77
<li>Compatible with <a href="https://github.com/ring-clojure/ring/blob/master/SPEC">Ring</a> and obviously supports those Ring based frameworks, such as Compojure etc.</li>
88
<li>Http Services by using Clojure / Java / Groovy to write simple handlers for http services.</li>
99
<li>Nginx Access Handler by Clojure / Java / Groovy</li>
10-
<li>Nginx Header Filter by Clojure / Java / Groovy</li>
10+
<li>Nginx Header Filter by Clojure / Java / Groovy</li>
11+
<li>
12+
<strong><em>NEW</em></strong>: Pub/Sub Among Nginx Worker Processes</li>
13+
<li>
14+
<strong><em>NEW</em></strong>: Shared Map based on shared memory &amp; Shared Map based Ring session store</li>
1115
<li>
1216
<strong><em>NEW</em></strong>: Support Sente, see <a href="https://github.com/ptaoussanis/sente/pull/160">this PR</a>
1317
</li>
1418
<li>
1519
<strong><em>NEW</em></strong>: Support Per-message Compression Extensions (PMCEs) for WebSocket</li>
16-
<li>
17-
<strong><em>NEW</em></strong>: APIs for Embedding Nginx-Clojure into a Standard Clojure/Java/Groovy App</li>
18-
<li>
19-
<strong><em>NEW</em></strong>: Server Side Websocket</li>
20+
<li>APIs for Embedding Nginx-Clojure into a Standard Clojure/Java/Groovy App</li>
21+
<li>Server Side Websocket</li>
2022
<li>A build-in Jersey container to support java standard RESTful web services (JAX-RS 2.0)</li>
2123
<li>Tomcat 8 embedding support (so servlet 3.1/jsp/sendfile/JSR-356 websocket work within nginx!)</li>
2224
<li>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</li>
@@ -25,7 +27,6 @@ <h1>
2527
<li>Handle multiple sockets parallel in sub coroutines, e.g. we can invoke two remote services at the same time.</li>
2628
<li>Asynchronous callback API of socket/Channel for some advanced usage</li>
2729
<li>Long Polling &amp; Server Sent Events</li>
28-
<li>More easier to archive Sub/Pub services with broadcast events API</li>
2930
<li>Run initialization clojure code when nginx worker starting</li>
3031
<li>Support user defined http request method</li>
3132
<li>Compatible with the Nginx lastest stable version 1.8.0. (Nginx 1.6.x, 1.4.x is also ok, older version is not tested and maybe works.)</li>
@@ -42,7 +43,7 @@ <h1>
4243

4344
<p>Nginx-Clojure has already been published to <a href="https://clojars.org/">https://clojars.org/</a> whose maven repository is </p>
4445

45-
<div class="highlight highlight-xml"><pre>&lt;<span class="pl-ent">repository</span>&gt;
46+
<div class="highlight highlight-text-xml"><pre>&lt;<span class="pl-ent">repository</span>&gt;
4647
&lt;<span class="pl-ent">id</span>&gt;clojars.org&lt;/<span class="pl-ent">id</span>&gt;
4748
&lt;<span class="pl-ent">url</span>&gt;http://clojars.org/repo&lt;/<span class="pl-ent">url</span>&gt;
4849
&lt;/<span class="pl-ent">repository</span>&gt;</pre></div>
@@ -52,7 +53,7 @@ <h1>
5253
<h2>
5354
<a id="user-content--leiningen-clojure-no-need-to-add-clojars-repository-which-is-a-default-repository-for-leiningen-" class="anchor" href="#-leiningen-clojure-no-need-to-add-clojars-repository-which-is-a-default-repository-for-leiningen-" aria-hidden="true"><span class="octicon octicon-link"></span></a> Leiningen (clojure, no need to add clojars repository which is a default repository for Leiningen) </h2>
5455

55-
<div class="highlight highlight-clojure"><pre>[nginx-clojure <span class="pl-s"><span class="pl-pds">"</span>0.4.2<span class="pl-pds">"</span></span>]</pre></div>
56+
<div class="highlight highlight-source-clojure"><pre>[nginx-clojure <span class="pl-s"><span class="pl-pds">"</span>0.4.2<span class="pl-pds">"</span></span>]</pre></div>
5657

5758
<h2>
5859
<a id="user-content-gradle-groovyjava" class="anchor" href="#gradle-groovyjava" aria-hidden="true"><span class="octicon octicon-link"></span></a>Gradle (groovy/java)</h2>
@@ -63,7 +64,7 @@ <h2>
6364
<h2>
6465
<a id="user-content-maven" class="anchor" href="#maven" aria-hidden="true"><span class="octicon octicon-link"></span></a>Maven</h2>
6566

66-
<div class="highlight highlight-xml"><pre>&lt;<span class="pl-ent">dependency</span>&gt;
67+
<div class="highlight highlight-text-xml"><pre>&lt;<span class="pl-ent">dependency</span>&gt;
6768
&lt;<span class="pl-ent">groupId</span>&gt;nginx-clojure&lt;/<span class="pl-ent">groupId</span>&gt;
6869
&lt;<span class="pl-ent">artifactId</span>&gt;nginx-clojure&lt;/<span class="pl-ent">artifactId</span>&gt;
6970
&lt;<span class="pl-ent">version</span>&gt;0.4.2&lt;/<span class="pl-ent">version</span>&gt;

Directives.md

+29-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jvm_classpath '#{myAgent}:/opt/anotherLibs/*';
7171
* **Default**: —
7272
* **Context**: http
7373

74-
Defines class pathes. When '/*' is used after a directory path all jar files and sub-directories will be used as the jvm classpath. e.g. If /opt/mylibs has below structure.
74+
Defines class paths. When '/*' is used after a directory path all jar files and sub-directories will be used as the jvm classpath. e.g. If /opt/mylibs has below structure.
7575

7676
```
7777
/opt/mylibs/
@@ -96,20 +96,46 @@ It is equivalent to
9696
jvm_options '-Djava.class.path=/opt/mylibs/a.jar:/opt/mylibs/b.jar:/opt/mylibs/classes:/opt/mylibs/resources'
9797
```
9898

99+
We can also define serveral class paths by using separator `:` (UNIX like OS) or `;` (Windows), e.g.
100+
101+
```nginx
102+
jvm_classpath /opt/mylibs/*:/opt/my-another-libs/*:/opt/my-resources;
103+
## for windows user
104+
# jvm_classpath c:/mylibs/*;c:/my-another-libs/*;c:/my-resources;
105+
```
106+
107+
99108
## jvm_classpath_check
100109

101110
* **Syntax**: **jvm_classpath_check** on | off;
102111
* **Default**: on
103112
* **Context**: http
104113

114+
Enables/disables checking access permission of jvm classpath. Default is on.
115+
105116
## jvm_options
106117

107-
* **Syntax**: **jvm_options** *option-value*;
118+
* **Syntax**: **jvm_options** *jvm-option*;
108119
* **Default**: —
109120
* **Context**: http
110121
* **repeatable** true
111122

112-
Enables/disables checking access permission of jvm classpath. Default is on.
123+
Defines one jvm option. e.g.
124+
125+
```nginx
126+
## set initial Java heap size
127+
jvm_options -Xms250m;
128+
129+
## set maximum Java heap size
130+
jvm_options -Xmx1024m;
131+
132+
## set java thread stack size
133+
jvm_options -Xss128k;
134+
135+
## set java system property
136+
jvm_options -Djava.awt.headless=true;
137+
```
138+
113139

114140
## jvm_workers
115141

0 commit comments

Comments
 (0)