Skip to content

Commit 34c0c99

Browse files
committed
fix title and links about shared map
1 parent fc8a11a commit 34c0c99

19 files changed

+166
-150
lines changed

Configuration.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Check [this section](configuration.html#24-chose--coroutine-based-socket-or-asyn
9191

9292
These tips are really useful. Most of them are from real users. Thanks [Rickr Nook](https://github.com/rickr-nook) who give us some useful tips.
9393

94-
1. The number of embed JVMs is the same with Nginx `worker_processes`, so if `worker_processes` > 1 we maybe need [nginx-clojure broadcast API][], shared memory (e.g [SharedHashMap/Chronicle-Map][]) or
94+
1. The number of embed JVMs is the same with Nginx `worker_processes`, so if `worker_processes` > 1 we maybe need [nginx-clojure broadcast API][], shared memory (e.g nginx-clojure built-in [Shared Map][], OpenHFT [Chronicle Map][]) or
9595
even external service(e.g. redis, database) to coordinate the state or use cookie based session store to manage session information, e.g. [ring.middleware.session.cookie/cookie-store](https://github.com/mmcgrana/ring/wiki/Sessions).
9696
1. When importing Swing We Must specifiy `jvm_options "-Djava.awt.headless=true"` , otherwise the nginx will hang.
9797
1. By adding the location of your clojure source files to the classpath,then just issue "nginx -s reload" and changes to the sources get picked up!
@@ -150,7 +150,7 @@ Please Keep these in your mind:
150150

151151
* By default if the initialization failed the nginx won't start successfully and the worker will exit after reporting an error message in error log file but the master keep running and take the port.
152152
* Because the maybe more than one nginx worker processes, so this code will run everytime per worker starting.
153-
* If you use [Shared Map][], [Chronicle-Map][] to share data
153+
* If you use nginx-clojure built-in [Shared Map][] or OpenHFT [Chronicle Map][] to share data
154154
among nginx worker processes, Java file lock can be used to let only one nginx worker process do the initialization.
155155
* If you [enabled coroutine support][], nginx maybe will start successfully even if your initialization failed after some socket operations. If you case it, you can
156156
use `nginx.clojure.core/without-coroutine` to wrap your handler, e.g.
@@ -693,7 +693,8 @@ For Clojure
693693
```
694694

695695
[nginx-clojure broadcast API]: https://github.com/nginx-clojure/nginx-clojure/issues/38
696-
[SharedHashMap/Chronicle-Map]: https://github.com/OpenHFT/Chronicle-Map
696+
[Shared Map]: https://nginx-clojure.github.io/sharedmap.html
697+
[Chronicle Map]: https://github.com/OpenHFT/Chronicle-Map
697698
[Asynchronous Socket/Channel]: more.html#36-asynchronous-channel
698699
[2.1 JVM Path , Class Path & Other JVM Options]: configuration.html#21-jvm-path--class-path--other-jvm-options
699700
[enabled coroutine support]: configuration.html#24-chose--coroutine-based-socket-or-asynchronous-socketchannel-or-thread-pool-for-slow-io-operations

Configuration.md.html

Lines changed: 24 additions & 24 deletions
Large diffs are not rendered by default.

CoreFeatures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Maven
7070

7171
License
7272
=================
73-
Copyright © 2013-2015 Zhang, Yuexiang (xfeep) and released under the BSD 3-Clause license.
73+
Copyright © 2013-2016 Zhang, Yuexiang (xfeep) and released under the BSD 3-Clause license.
7474

7575
This program uses:
7676
* Re-rooted ASM bytecode engineering library which is distributed under the BSD 3-Clause license

CoreFeatures.md.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<h1>
2-
<a id="user-content-core-features" class="anchor" href="#core-features" aria-hidden="true"><span class="octicon octicon-link"></span></a>Core Features</h1>
2+
<a id="user-content-core-features" class="anchor" href="#core-features" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Core Features</h1>
33

44
<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

@@ -39,7 +39,7 @@ <h1>
3939
<p>By the way it is very fast, the benchmarks can be found <a href="https://github.com/ptaoussanis/clojure-web-server-benchmarks/">HERE(with wrk2)</a>.</p>
4040

4141
<h1>
42-
<a id="user-content-jar-repository" class="anchor" href="#jar-repository" aria-hidden="true"><span class="octicon octicon-link"></span></a>Jar Repository</h1>
42+
<a id="user-content-jar-repository" class="anchor" href="#jar-repository" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Jar Repository</h1>
4343

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

@@ -51,18 +51,18 @@ <h1>
5151
<p>After adding clojars repository, you can reference nginx-clojure 0.4.3 , e.g.</p>
5252

5353
<h2>
54-
<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>
54+
<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 aria-hidden="true" class="octicon octicon-link"></span></a> Leiningen (clojure, no need to add clojars repository which is a default repository for Leiningen) </h2>
5555

5656
<div class="highlight highlight-source-clojure"><pre>[nginx-clojure <span class="pl-s"><span class="pl-pds">"</span>0.4.3<span class="pl-pds">"</span></span>]</pre></div>
5757

5858
<h2>
59-
<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>
59+
<a id="user-content-gradle-groovyjava" class="anchor" href="#gradle-groovyjava" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Gradle (groovy/java)</h2>
6060

6161
<pre><code>compile "nginx-clojure:nginx-clojure:0.4.3"
6262
</code></pre>
6363

6464
<h2>
65-
<a id="user-content-maven" class="anchor" href="#maven" aria-hidden="true"><span class="octicon octicon-link"></span></a>Maven</h2>
65+
<a id="user-content-maven" class="anchor" href="#maven" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Maven</h2>
6666

6767
<div class="highlight highlight-text-xml"><pre>&lt;<span class="pl-ent">dependency</span>&gt;
6868
&lt;<span class="pl-ent">groupId</span>&gt;nginx-clojure&lt;/<span class="pl-ent">groupId</span>&gt;
@@ -71,9 +71,9 @@ <h2>
7171
&lt;/<span class="pl-ent">dependency</span>&gt;</pre></div>
7272

7373
<h1>
74-
<a id="user-content-license" class="anchor" href="#license" aria-hidden="true"><span class="octicon octicon-link"></span></a>License</h1>
74+
<a id="user-content-license" class="anchor" href="#license" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>License</h1>
7575

76-
<p>Copyright © 2013-2015 Zhang, Yuexiang (xfeep) and released under the BSD 3-Clause license.</p>
76+
<p>Copyright © 2013-2016 Zhang, Yuexiang (xfeep) and released under the BSD 3-Clause license.</p>
7777

7878
<p>This program uses:</p>
7979

More.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,9 @@ in nginx.conf
622622
623623
If `worker_processes` > 1 there will be more than one jvm instances viz. more tomcat instances so to get synchronized session information we can not use the default tomcat session manger.
624624
Instead we may consider to use either of
625-
626-
1. Cookie based Session Store viz. storing all session attribute information into cookies.
627-
1. Shared HashMap among processes in the same machine ,e.g. [Chronicle Map](https://github.com/OpenHFT/Chronicle-Map)
625+
626+
1. Cookied based Session Store viz. storing all session attribute information into cookies.
627+
1. Shared HashMap among processes in the same machine ,e.g. nginx-clojure built-in [Shared Map][], OpenHFT [Chronicle Map][]
628628
1. External Session Store, e.g. Redis / MySQL / Memcached Session Store
629629
630630
@@ -673,12 +673,6 @@ location /examples {
673673
`gzip` can also appear at http, server blocks. More details can be found [HERE](http://nginx.org/en/docs/http/ngx_http_gzip_module.html)
674674

675675

676-
[nginx-clojure broadcast API]: https://github.com/nginx-clojure/nginx-clojure/issues/38
677-
[SharedHashMap/Chronicle-Map]: https://github.com/OpenHFT/Chronicle-Map
678-
[hijack API]: https://github.com/nginx-clojure/nginx-clojure/issues/41
679-
[Asynchronous Channel API]: https://github.com/nginx-clojure/nginx-clojure/issues/37
680-
[2.2 Initialization Handler for nginx worker]: configuration.html#user-content-22-initialization-handler-for-nginx-worker
681-
682676
3.11 More about Nginx Worker Process
683677
-----------------
684678
The number of Nginx worker processes can be configured by nginx directive [worker_processes](http://nginx.org/en/docs/ngx_core_module.html#worker_processes).
@@ -692,10 +686,17 @@ Because a JVM instance will be embeded into per Nginx worker process so if there
692686
So if we want to get synchronized session information we can not use the default tomcat session manger. Instead we may consider to use either of
693687

694688
1. Cookie based Session Store viz. storing all session attribute information into cookies.
695-
1. Shared HashMap among processes in the same machine ,e.g. [Chronicle Map](https://github.com/OpenHFT/Chronicle-Map)
689+
1. Shared HashMap among processes in the same machine ,e.g. nginx-clojure built-in [Shared Map][], OpenHFT [Chronicle Map][]
696690
1. External Session Store, e.g. Redis / MySQL / Memcached Session Store
697691

698692
When there are more than one Nginx worker prcocesses sub/pub services also need to be taken care of. Subscribers may connect to JVM instances which maybe are different
699693
with the JVM instance which the publisher send message to. So we need to use [broadcast API](more.html#35-subpub--broadcast-event) from nginx-clojure
700694
and broadcast message to all Nginx worker prcocesses.
701695

696+
[nginx-clojure broadcast API]: https://github.com/nginx-clojure/nginx-clojure/issues/38
697+
[Shared Map]: https://nginx-clojure.github.io/sharedmap.html
698+
[Chronicle Map]: https://github.com/OpenHFT/Chronicle-Map
699+
[hijack API]: https://github.com/nginx-clojure/nginx-clojure/issues/41
700+
[Asynchronous Channel API]: https://github.com/nginx-clojure/nginx-clojure/issues/37
701+
[2.2 Initialization Handler for nginx worker]: configuration.html#user-content-22-initialization-handler-for-nginx-worker
702+

0 commit comments

Comments
 (0)