Re: New way to run your Django projects

2012-03-19 Thread Alexander
On Mar 19, 11:00 am, Roberto De Ioris  wrote:
> Your project is really funny, but you will need to fight with two factors:
>
> few users/developers understand non-blocking/async programming (albeit a lot 
> of them use, and blindly suggest, such technologies)
>
> webservers support for multipexing fastcgi requests is practically 
> non-existent or buggy, on which webserver you have tested your project ?

Roberto,

Thank you for cheering me up : ) Like I said gevent-fastcgi is not
suitable for every project and I don't expect people switching to it
en masse but those who needs what it provides should benefit from
using it. I know that mainstream Web-servers do not support FastCGI
multiplexing or support for it is buggy. That is sad since it doesn't
cost much to implement and it could be a big deal in fight against
C10K problem. I saw something like "there are not many FastCGI servers
that support multiplexing so why bother to implement that in our Web
server" while I was looking for Web-servers that do multiplexing.
Hopefully, Web-server developers will have little less excuses to not
implement it.

I haven't tested FastCGI multiplexing feature because I couldn't find
Web-server that supports it out-of-the-box. However, I found reference
to alternative Nginx FastCGI module that supposedly designed to
support multiplexing (https://github.com/rsms/afcgi). Also Cherokee
Web-server had another version of FastCGI module with connection
multiplexing (http://code.google.com/p/cherokee/issues/detail?id=714).
Rumors have it Zeus Web-server has FastCGI multiplexing feature but
it's not available for free.

Alex

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: New way to run your Django projects

2012-03-19 Thread Kurtis Mullins
Sorry, I didn't mean to sound like I was putting down your application. I
think it's a great thing to develop more applications. I can't wait to see
the progress you make :)

I was just trying to clarify that these days, stock Nginx does provide WSGI
in its default configuration. Of course, I didn't think about specific
distributions offering alternative or older configurations of Nginx.
Running 'sudo apt-get install nginx' is a bit easier than './configure;
make; sudo make install' -- especially with the distribution's
initialization scripts -- but I'm a bit old school when it comes to that.

One thing I can say about FastCGI (the reason I don't develop with it) is
that it's licensed under the OpenMarket License which is, to my knowledge,
not compatible with GPL. However, that's the libraries and not the raw
protocol itself.

Good luck and happy hacking!

On Mon, Mar 19, 2012 at 10:46 AM, Alexander wrote:

> Kurtis,
>
> There is nothing wrong with using uwsgi protocol instead of FastCGI
> but you still have to run uWSGI server and it doesn't fit "simply
> using nginx" description. And I wouldn't call it "out of the box"
> either if I'd have to rebuild Nginx instead of using one shipped with
> my Linux distro (Debian Squeeze has Nginx with uwsgi module in
> backports and uWSGI is only available in unstable branch).
>
> I didn't say gevent-fastcgi is best way to run WSGI application.
>
> Alex
>
> On Mar 19, 10:08 am, Kurtis Mullins  wrote:
> > > I'm not sure what you meant by "simply using nginx" since as far as I
> > > know it doesn't have standard WSGI module.
> >
> > I use Nginx w/ WSGI (Django running under uWSGI, communicating w/ WSGI
> > Protocol) out of the box. No special modules or anything were installed
> --
> > just a quick download and compile of the source package.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: New way to run your Django projects

2012-03-19 Thread Bolang

On 03/19/2012 08:28 PM, Alexander wrote:

Hi Bolang,

I'm not sure what you meant by "simply using nginx" since as far as I
know it doesn't have standard WSGI module. I hope you're not talking
about running WSGI application as CGI script, do you?


Hi Alexander,
Thanks for your long response, really apreciate it.
Actually, i'm just django & python beginner, although already have a few 
simple sites in production.


And actually i'm not really understand wsgi, uwsgi, etc.
I use nginx because AFAIK it great on serving static files and as a proxy.
I use gunicorn when i need multiple process.

When will i need your gevent-fastcgi? Or which types of applications 
that really need your gevent-fastcgi. From your answer, one of them is 
long-polling webapp and webapp with thousand of simultaneous connections.

As a newbie, i think i will not build that kind of advanced apps now.

Thanks



As to comparing Gunicorn to gevent-fastcgi Gunocorn is HTTP server and
gevent-fastcg is FastCGI one. FastCGI can run over UNIX domain
sockets, it can multiplex requests using single connection. That could
be deal-breaker when application is using long-polling requests and
there are thousands of clients that can be accessing it
simultaneously. Beside HTTP is not well suited for communication
between frontend and backend (just recall famous need to fix
hostname:port in backend server responses because backend server has
no way to get access to original HTTP-request and it might not even
know that there is something that makes request on behalf of client
browser). There is no such problems in FastCGI protocol because it was
specifically designed for frontend/backend communication.

Gevent-fastcgi is not well suited for any type of applications. The
application should not block since everything is run in the same
thread (there are greenlets that are used in place of thread to avoid
GIL). Not all databases and other external resources can be used in
non-blocking mode. Luckily PostgreSQL, MySQL, Memcache are those that
have adapters/hooks for making them work well in non-blocking manner.

Alex

Bolang wrote:

Hi Alexander,
What is the advantage of using gevent-fastcgi instead of simply using
nginx and maybe with gunicorn?




--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: New way to run your Django projects

2012-03-19 Thread Carlos Daniel Ruvalcaba Valenzuela
I think it is an interesting project, many may say its pointless given
the "wealth" of wsgi servers, but I think there is always space to
explore more, who says this project can't be faster than many of
today's servers?, or who says there wont be anything useful out of
this project even if is not really popular as gunicorn or uwsgi? I
imagine uwsgi started this way against the "mainstream" apache
mod_wsgi, but now uwsgi has more features, its fast and it has been
adopted as a sort of defacto wsgi module by nginx, who says a new
project can't be done?

Keep it up, I will personally give it a try!

Regards,
Carlos Daniel Ruvalcaba Valenzuela

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: New way to run your Django projects

2012-03-19 Thread Roberto De Ioris

Il giorno 19/mar/2012, alle ore 15:46, Alexander ha scritto:

> Kurtis,
> 
> There is nothing wrong with using uwsgi protocol instead of FastCGI
> but you still have to run uWSGI server and it doesn't fit "simply
> using nginx" description. And I wouldn't call it "out of the box"
> either if I'd have to rebuild Nginx instead of using one shipped with
> my Linux distro (Debian Squeeze has Nginx with uwsgi module in
> backports and uWSGI is only available in unstable branch).
> 
> I didn't say gevent-fastcgi is best way to run WSGI application.
> 

Yes, but when you release a software, be prepared to answer the most useless, 
provocative
and rageous questions :) Expecially if your project is pretty 'unique'.

You are lucky (for now), the questions you got are all 'gentle' :)

Your project is really funny, but you will need to fight with two factors:

few users/developers understand non-blocking/async programming (albeit a lot of 
them use, and blindly suggest, such technologies)

webservers support for multipexing fastcgi requests is practically non-existent 
or buggy, on which webserver you have tested your project ?

In addition to this, Django is not the kind of framework/platform you can - 
easily - adapt to non-blocking/async paradigm :(

--
Roberto De Ioris
http://unbit.it
JID: robe...@jabber.unbit.it

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: New way to run your Django projects

2012-03-19 Thread Alexander
Kurtis,

There is nothing wrong with using uwsgi protocol instead of FastCGI
but you still have to run uWSGI server and it doesn't fit "simply
using nginx" description. And I wouldn't call it "out of the box"
either if I'd have to rebuild Nginx instead of using one shipped with
my Linux distro (Debian Squeeze has Nginx with uwsgi module in
backports and uWSGI is only available in unstable branch).

I didn't say gevent-fastcgi is best way to run WSGI application.

Alex

On Mar 19, 10:08 am, Kurtis Mullins  wrote:
> > I'm not sure what you meant by "simply using nginx" since as far as I
> > know it doesn't have standard WSGI module.
>
> I use Nginx w/ WSGI (Django running under uWSGI, communicating w/ WSGI
> Protocol) out of the box. No special modules or anything were installed --
> just a quick download and compile of the source package.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: New way to run your Django projects

2012-03-19 Thread Kurtis Mullins
>
> I'm not sure what you meant by "simply using nginx" since as far as I
> know it doesn't have standard WSGI module.


I use Nginx w/ WSGI (Django running under uWSGI, communicating w/ WSGI
Protocol) out of the box. No special modules or anything were installed --
just a quick download and compile of the source package.

On Mon, Mar 19, 2012 at 9:28 AM, Alexander wrote:

> Hi Bolang,
>
> I'm not sure what you meant by "simply using nginx" since as far as I
> know it doesn't have standard WSGI module. I hope you're not talking
> about running WSGI application as CGI script, do you?
>
> As to comparing Gunicorn to gevent-fastcgi Gunocorn is HTTP server and
> gevent-fastcg is FastCGI one. FastCGI can run over UNIX domain
> sockets, it can multiplex requests using single connection. That could
> be deal-breaker when application is using long-polling requests and
> there are thousands of clients that can be accessing it
> simultaneously. Beside HTTP is not well suited for communication
> between frontend and backend (just recall famous need to fix
> hostname:port in backend server responses because backend server has
> no way to get access to original HTTP-request and it might not even
> know that there is something that makes request on behalf of client
> browser). There is no such problems in FastCGI protocol because it was
> specifically designed for frontend/backend communication.
>
> Gevent-fastcgi is not well suited for any type of applications. The
> application should not block since everything is run in the same
> thread (there are greenlets that are used in place of thread to avoid
> GIL). Not all databases and other external resources can be used in
> non-blocking mode. Luckily PostgreSQL, MySQL, Memcache are those that
> have adapters/hooks for making them work well in non-blocking manner.
>
> Alex
>
> Bolang wrote:
> > Hi Alexander,
> > What is the advantage of using gevent-fastcgi instead of simply using
> > nginx and maybe with gunicorn?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: New way to run your Django projects

2012-03-19 Thread Alexander
Hi Bolang,

I'm not sure what you meant by "simply using nginx" since as far as I
know it doesn't have standard WSGI module. I hope you're not talking
about running WSGI application as CGI script, do you?

As to comparing Gunicorn to gevent-fastcgi Gunocorn is HTTP server and
gevent-fastcg is FastCGI one. FastCGI can run over UNIX domain
sockets, it can multiplex requests using single connection. That could
be deal-breaker when application is using long-polling requests and
there are thousands of clients that can be accessing it
simultaneously. Beside HTTP is not well suited for communication
between frontend and backend (just recall famous need to fix
hostname:port in backend server responses because backend server has
no way to get access to original HTTP-request and it might not even
know that there is something that makes request on behalf of client
browser). There is no such problems in FastCGI protocol because it was
specifically designed for frontend/backend communication.

Gevent-fastcgi is not well suited for any type of applications. The
application should not block since everything is run in the same
thread (there are greenlets that are used in place of thread to avoid
GIL). Not all databases and other external resources can be used in
non-blocking mode. Luckily PostgreSQL, MySQL, Memcache are those that
have adapters/hooks for making them work well in non-blocking manner.

Alex

Bolang wrote:
> Hi Alexander,
> What is the advantage of using gevent-fastcgi instead of simply using
> nginx and maybe with gunicorn?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: New way to run your Django projects

2012-03-18 Thread Justin Holmes
I feel the need to inject, once again, that the Twisted WSGI container
rocks.

On Sun, Mar 18, 2012 at 12:40 PM, Bolang  wrote:

> Hi Alexander,
> What is the advantage of using gevent-fastcgi instead of simply using
> nginx and maybe with gunicorn?
>
>
>
> On 03/18/2012 12:59 PM, Alexander wrote:
>
>> Hello everybody,
>>
>> I'm working on gevent coroutine based  library FastCGI server
>> implementation and I's ready for testing. It most likely contains lots
>> of bugs and it would be great if you help to catch some of them.
>>
>> Just install gevent-fastcgi package:
>>
>> $ easy_install gevent-fastcgi
>>
>> Then include gevent_fastcgi.adapters.django into INSTALLED_APPS list
>> of your settings.py. Then run:
>>
>> $ python manage.py run_gevent_fastcgi host:port
>>
>> Run "python manage.py run_gevent_fastcgi --help" to find out more
>> about run_gevent_fastcgi command.
>>
>> Alex
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en
> .
>
>


-- 
Justin Holmes

Head Instructor, SlashRoot Collective
SlashRoot: Coffee House and Tech Dojo
60 Main Street
New Paltz, NY 12561
845.633.8330

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: New way to run your Django projects

2012-03-18 Thread Bolang

Hi Alexander,
What is the advantage of using gevent-fastcgi instead of simply using 
nginx and maybe with gunicorn?



On 03/18/2012 12:59 PM, Alexander wrote:

Hello everybody,

I'm working on gevent coroutine based  library FastCGI server
implementation and I's ready for testing. It most likely contains lots
of bugs and it would be great if you help to catch some of them.

Just install gevent-fastcgi package:

$ easy_install gevent-fastcgi

Then include gevent_fastcgi.adapters.django into INSTALLED_APPS list
of your settings.py. Then run:

$ python manage.py run_gevent_fastcgi host:port

Run "python manage.py run_gevent_fastcgi --help" to find out more
about run_gevent_fastcgi command.

Alex



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



New way to run your Django projects

2012-03-18 Thread Alexander
Hello everybody,

I'm working on gevent coroutine based  library FastCGI server
implementation and I's ready for testing. It most likely contains lots
of bugs and it would be great if you help to catch some of them.

Just install gevent-fastcgi package:

$ easy_install gevent-fastcgi

Then include gevent_fastcgi.adapters.django into INSTALLED_APPS list
of your settings.py. Then run:

$ python manage.py run_gevent_fastcgi host:port

Run "python manage.py run_gevent_fastcgi --help" to find out more
about run_gevent_fastcgi command.

Alex

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.