Nginx-Clojure Module Release 0.1.0--Let Nginx embrace Clojure & Java
Roberto De Ioris
roberto at unbit.it
Wed Jan 15 08:55:31 UTC 2014
> 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 at 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.
yes, for sure, the problem is that you need to integrate the whole jvm
part with the nginx event loop, you cannot use other ways (unless you
introduce back threads)
This is what i told you in the clojure list: invest on implementing the
nginx api as jni, otherwise all will remain a proof of concept.
Just as an example, how do you plan to integrate with mysql in a
non-blocking way ? you need a mysql adapter that will use the nginx api
and so on... (huge work honestly)
and yes, until you do not manage to integrate the nginx api in jni, the
jvm is a blocking part for nginx :)
I hate to bore you expecially because you are pushing a new technology and
the last thing you need is losing entusiasm or being blasted, but the
world is already full of people doing non-blocking programming in the
wrong way :)
--
Roberto De Ioris
http://unbit.it
More information about the nginx
mailing list