Welcome! Log In Create A New Profile

Advanced

Re: Nginx-Clojure Module Release 0.1.0--Let Nginx embrace Clojure & Java

January 15, 2014 03:45AM
roberto Wrote:
-------------------------------------------------------
>
> Sorry, but are you saying that your suggested usage for concurrency is
> multiprocessing ?
>
> Multiprocessing is completely alien in the jvm (the vm is not even
> fork-friendly) and that would mean the nginx worker completly give
> control
> to the jvm and this is something bad as the jvm is a blocking vm.
>
> The jvm world is thread-centric (and trust me, i needed to deal with
> dozens of different threading implementations for uWSGI and the jvm is
> the
> best one) so i am quite doubtful saying "multiprocess by default"
> would be
> a successfull approach (well the amount of memory per-app will be
> huge)
>
>
> --
> Roberto De Ioris
> http://unbit.it
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

One Nginx worker , typically single thread, can handle thousands of request by non-blocking events. So we need less Nginx workers than the threads in a typical java server.

Java thread is not lightweight and uses more memory than general thread.

I don't think JVM is blocking vm. In my eye JVM just a executor of java class. By JNI we can any no-blocking things just as a general Nginx modula written by c.

With the default mode in Nginx-Clojure 0.1.0 there 's one jvm instance embed per Nginx worker. The will be some no-blocking api provided by the next version of Nginx-Clojure.

With Nginx-Clojure 0.1.0 you can also use one JVM instance with a thread pool if you like, just set nginx worker processes = 1 and set jvm_workers = the number of java threads you will use.
SubjectAuthorPosted

Nginx-Clojure Module Release 0.1.0--Let Nginx embrace Clojure & Java

xfeepJanuary 14, 2014 11:42AM

Re: Nginx-Clojure Module Release 0.1.0--Let Nginx embrace Clojure & Java

xfeepJanuary 14, 2014 10:53PM

Re: Nginx-Clojure Module Release 0.1.0--Let Nginx embrace Clojure & Java

robertoJanuary 14, 2014 11:44PM

Re: Nginx-Clojure Module Release 0.1.0--Let Nginx embrace Clojure & Java

xfeepJanuary 15, 2014 12:31AM

Re: Nginx-Clojure Module Release 0.1.0--Let Nginx embrace Clojure & Java

robertoJanuary 15, 2014 12:48AM

Re: Nginx-Clojure Module Release 0.1.0--Let Nginx embrace Clojure & Java

xfeepJanuary 15, 2014 03:45AM

Re: Nginx-Clojure Module Release 0.1.0--Let Nginx embrace Clojure & Java

robertoJanuary 15, 2014 03:58AM

Re: Nginx-Clojure Module Release 0.1.0--Let Nginx embrace Clojure & Java

xfeepJanuary 15, 2014 04:29AM

Re: Nginx-Clojure Module Release 0.1.0--Let Nginx embrace Clojure & Java

robertoJanuary 15, 2014 04:36AM

Re: Nginx-Clojure Module Release 0.1.0--Let Nginx embrace Clojure & Java

xfeepJanuary 15, 2014 05:23AM

Re: Nginx-Clojure Module Release 0.1.0--Let Nginx embrace Clojure & Java

xfeepApril 26, 2014 12:15AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 63
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready