Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #40206 > unrolled thread

Twisted or Tornado?

Started byJake Angulo <jake.angulo@gmail.com>
First post2013-02-28 16:28 -0800
Last post2013-03-05 19:30 -0800
Articles 9 — 6 participants

Back to article view | Back to comp.lang.python


Contents

  Twisted or Tornado? Jake Angulo <jake.angulo@gmail.com> - 2013-02-28 16:28 -0800
    Re: Twisted or Tornado? Michael Torrie <torriem@gmail.com> - 2013-02-28 17:39 -0700
    Re: Twisted or Tornado? Sven <svenito@gmail.com> - 2013-03-01 09:25 +0000
    RE: Twisted or Tornado? Andriy Kornatskyy <andriy.kornatskyy@live.com> - 2013-03-01 12:55 +0300
    Re: Twisted or Tornado? Jake Angulo <jake.angulo@gmail.com> - 2013-03-04 10:35 +1100
    Re: Twisted or Tornado? Michael Torrie <torriem@gmail.com> - 2013-03-03 19:40 -0700
    RE: Twisted or Tornado? Andriy Kornatskyy <andriy.kornatskyy@live.com> - 2013-03-05 11:07 +0300
    Re: Twisted or Tornado? Werner Thie <werner@thieprojects.ch> - 2013-03-05 09:53 +0100
    Re: Twisted or Tornado? system.healer@gmail.com - 2013-03-05 19:30 -0800

#40206 — Twisted or Tornado?

FromJake Angulo <jake.angulo@gmail.com>
Date2013-02-28 16:28 -0800
SubjectTwisted or Tornado?
Message-ID<f2fafd69-0604-4026-8253-8cacdabdbe64@googlegroups.com>
I have to say it first: I am not trolling :P

Im working on a server project (with IOS client) and would like to create a custom, lean and mean server - real Quick!

My requirements for this framework in descending order:
1) Easy to use API
2) Widely available documentation / Examples / Community contributions
3) Feature-wise - kinda most that you commonly need is there

Your opinions will be valuable, if possible cite examples or URL references, Pls!  

I prefer opinion from those who have programmed real projects in it - not just read some blog or Slashdot :P

[toc] | [next] | [standalone]


#40207

FromMichael Torrie <torriem@gmail.com>
Date2013-02-28 17:39 -0700
Message-ID<mailman.2695.1362098382.2939.python-list@python.org>
In reply to#40206
On 02/28/2013 05:28 PM, Jake Angulo wrote:
> My requirements for this framework in descending order: 1) Easy to
> use API 2) Widely available documentation / Examples / Community
> contributions 3) Feature-wise - kinda most that you commonly need is
> there

By this I take it you mean you want to export a standard web services
API, right (RPC over HTTP)?  Or are you insisting on writing your own
protocol?

If it's the first, I recommend something like web2py.
http://web2py.com/books/default/chapter/29/10.  Or Django.  Sounds heavy
but it's really not that bad especially if you don't need a real web UI,
but are just exposing an RPC api.

If it's the second, then, well, yes Twisted will work great, provided
you can understand how it works. It's actually not that complicated, but
python's dynamic nature can sometimes hide how things work from you at
first and what exactly is getting passed around from function to
function.  Took me about a month to really grok Twisted.  Now that my
project is done (quite successful actually... a full-blow LDAP proxy
server), I have forgotten much about how Twisted works.

In another vein, there's node.js as well.  Apparently it's being used a
lot to implement quick and dirty services like what you need.

> I prefer opinion from those who have programmed real projects in it -
> not just read some blog or Slashdot :P

Ha.

[toc] | [prev] | [next] | [standalone]


#40240

FromSven <svenito@gmail.com>
Date2013-03-01 09:25 +0000
Message-ID<mailman.2712.1362129951.2939.python-list@python.org>
In reply to#40206

[Multipart message — attachments visible in raw view] — view raw

Although these articles are a _little_ old they are probably useful to help
you decide which solution is most suitable for you in terms of performance

http://nichol.as/benchmark-of-python-web-servers
http://nichol.as/asynchronous-servers-in-python

I would also be interested if any one on this list has any idea if the
results above would be any different these days or whether the benchmarks
are still fairly representative.


On 1 March 2013 00:28, Jake Angulo <jake.angulo@gmail.com> wrote:

> I have to say it first: I am not trolling :P
>
> Im working on a server project (with IOS client) and would like to create
> a custom, lean and mean server - real Quick!
>
> My requirements for this framework in descending order:
> 1) Easy to use API
> 2) Widely available documentation / Examples / Community contributions
> 3) Feature-wise - kinda most that you commonly need is there
>
> Your opinions will be valuable, if possible cite examples or URL
> references, Pls!
>
> I prefer opinion from those who have programmed real projects in it - not
> just read some blog or Slashdot :P
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
./Sven

[toc] | [prev] | [next] | [standalone]


#40243

FromAndriy Kornatskyy <andriy.kornatskyy@live.com>
Date2013-03-01 12:55 +0300
Message-ID<mailman.2715.1362131803.2939.python-list@python.org>
In reply to#40206
The following benchmarks are related to:

a) python web frameworks
http://mindref.blogspot.com/2012/09/python-fastest-web-framework.html
http://mindref.blogspot.com/2012/10/python-web-routing-benchmark.html
http://mindref.blogspot.com/2012/10/python-web-reverse-urls-benchmark.html
http://mindref.blogspot.com/2012/10/python-web-caching-benchmark.html

b) template engines
http://mindref.blogspot.com/2012/10/python-templates-benchmark.html
http://mindref.blogspot.com/2012/07/python-fastest-template.html

With source code:
https://bitbucket.org/akorn/helloworld

Thanks.

Andriy Kornatskyy


________________________________
> Date: Fri, 1 Mar 2013 09:25:43 +0000 
> Subject: Re: Twisted or Tornado? 
> From: svenito@gmail.com 
> To: jake.angulo@gmail.com 
> CC: python-list@python.org 
> 
> Although these articles are a _little_ old they are probably useful to 
> help you decide which solution is most suitable for you in terms of 
> performance 
> 
> http://nichol.as/benchmark-of-python-web-servers 
> http://nichol.as/asynchronous-servers-in-python 
> 
> I would also be interested if any one on this list has any idea if the 
> results above would be any different these days or whether the 
> benchmarks are still fairly representative. 
> 
> 
> On 1 March 2013 00:28, Jake Angulo 
> <jake.angulo@gmail.com<mailto:jake.angulo@gmail.com>> wrote: 
> I have to say it first: I am not trolling :P 
> 
> Im working on a server project (with IOS client) and would like to 
> create a custom, lean and mean server - real Quick! 
> 
> My requirements for this framework in descending order: 
> 1) Easy to use API 
> 2) Widely available documentation / Examples / Community contributions 
> 3) Feature-wise - kinda most that you commonly need is there 
> 
> Your opinions will be valuable, if possible cite examples or URL 
> references, Pls! 
> 
> I prefer opinion from those who have programmed real projects in it - 
> not just read some blog or Slashdot :P 
> -- 
> http://mail.python.org/mailman/listinfo/python-list 
> 
> 
> 
> -- 
> ./Sven 
> 
> -- http://mail.python.org/mailman/listinfo/python-list 
 		 	   		  

[toc] | [prev] | [next] | [standalone]


#40429

FromJake Angulo <jake.angulo@gmail.com>
Date2013-03-04 10:35 +1100
Message-ID<mailman.2827.1362353769.2939.python-list@python.org>
In reply to#40206

[Multipart message — attachments visible in raw view] — view raw

All,

Thanks for your reply - I thought I would share the outcome of my choice:

I have chosen to use twisted.   The API is very decent to learn, though the
clincher is theres huge community / docs, and many projects used on
production.

I was able to make a working project prototype in hours!
Thanks to the large twisted library.

Our project is an ipad multiplayer game, and we didnt want to use existing
servers because we want to do things exactly as we wish.

Rgds,

Jake

On Fri, Mar 1, 2013 at 8:55 PM, Andriy Kornatskyy <
andriy.kornatskyy@live.com> wrote:

>
> The following benchmarks are related to:
>
> a) python web frameworks
> http://mindref.blogspot.com/2012/09/python-fastest-web-framework.html
> http://mindref.blogspot.com/2012/10/python-web-routing-benchmark.html
> http://mindref.blogspot.com/2012/10/python-web-reverse-urls-benchmark.html
> http://mindref.blogspot.com/2012/10/python-web-caching-benchmark.html
>
> b) template engines
> http://mindref.blogspot.com/2012/10/python-templates-benchmark.html
> http://mindref.blogspot.com/2012/07/python-fastest-template.html
>
> With source code:
> https://bitbucket.org/akorn/helloworld
>
> Thanks.
>
> Andriy Kornatskyy
>
>
> ________________________________
> > Date: Fri, 1 Mar 2013 09:25:43 +0000
> > Subject: Re: Twisted or Tornado?
> > From: svenito@gmail.com
> > To: jake.angulo@gmail.com
> > CC: python-list@python.org
> >
> > Although these articles are a _little_ old they are probably useful to
> > help you decide which solution is most suitable for you in terms of
> > performance
> >
> > http://nichol.as/benchmark-of-python-web-servers
> > http://nichol.as/asynchronous-servers-in-python
> >
> > I would also be interested if any one on this list has any idea if the
> > results above would be any different these days or whether the
> > benchmarks are still fairly representative.
> >
> >
> > On 1 March 2013 00:28, Jake Angulo
> > <jake.angulo@gmail.com<mailto:jake.angulo@gmail.com>> wrote:
> > I have to say it first: I am not trolling :P
> >
> > Im working on a server project (with IOS client) and would like to
> > create a custom, lean and mean server - real Quick!
> >
> > My requirements for this framework in descending order:
> > 1) Easy to use API
> > 2) Widely available documentation / Examples / Community contributions
> > 3) Feature-wise - kinda most that you commonly need is there
> >
> > Your opinions will be valuable, if possible cite examples or URL
> > references, Pls!
> >
> > I prefer opinion from those who have programmed real projects in it -
> > not just read some blog or Slashdot :P
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> >
> >
> >
> > --
> > ./Sven
> >
> > -- http://mail.python.org/mailman/listinfo/python-list
>

[toc] | [prev] | [next] | [standalone]


#40432

FromMichael Torrie <torriem@gmail.com>
Date2013-03-03 19:40 -0700
Message-ID<mailman.2830.1362364864.2939.python-list@python.org>
In reply to#40206
On 03/03/2013 04:35 PM, Jake Angulo wrote:
> All,
> 
> Thanks for your reply - I thought I would share the outcome of my choice:
> 
> I have chosen to use twisted.   The API is very decent to learn, though the
> clincher is theres huge community / docs, and many projects used on
> production.
> 
> I was able to make a working project prototype in hours!
> Thanks to the large twisted library.

Sweet!  Thanks for letting us know the outcome.  I think that's one of
the most rewarding things about working with Python (and it's many
libraries, frameworks, and projects).  It's so fast to get a prototype
up and running.

[toc] | [prev] | [next] | [standalone]


#40506

FromAndriy Kornatskyy <andriy.kornatskyy@live.com>
Date2013-03-05 11:07 +0300
Message-ID<mailman.2869.1362470932.2939.python-list@python.org>
In reply to#40206
Jake,

Don't you lock yourself in twisted application server only? I doubt you will be able easily migrate to WSGI compatible application server as your needs grow.

Andriy

________________________________
> From: jake.angulo@gmail.com 
> Date: Mon, 4 Mar 2013 10:35:41 +1100 
> Subject: Re: Twisted or Tornado? 
> To: andriy.kornatskyy@live.com 
> CC: svenito@gmail.com; python-list@python.org 
> 
> 
> All, 
> 
> Thanks for your reply - I thought I would share the outcome of my choice: 
> 
> I have chosen to use twisted. The API is very decent to learn, though 
> the clincher is theres huge community / docs, and many projects used on 
> production. 
> 
> I was able to make a working project prototype in hours! 
> Thanks to the large twisted library. 
> 
> Our project is an ipad multiplayer game, and we didnt want to use 
> existing servers because we want to do things exactly as we wish. 
> 
> Rgds, 
> 
> Jake 
> 
> On Fri, Mar 1, 2013 at 8:55 PM, Andriy Kornatskyy 
> <andriy.kornatskyy@live.com<mailto:andriy.kornatskyy@live.com>> wrote: 
> 
> The following benchmarks are related to: 
> 
> a) python web frameworks 
> http://mindref.blogspot.com/2012/09/python-fastest-web-framework.html 
> http://mindref.blogspot.com/2012/10/python-web-routing-benchmark.html 
> http://mindref.blogspot.com/2012/10/python-web-reverse-urls-benchmark.html 
> http://mindref.blogspot.com/2012/10/python-web-caching-benchmark.html 
> 
> b) template engines 
> http://mindref.blogspot.com/2012/10/python-templates-benchmark.html 
> http://mindref.blogspot.com/2012/07/python-fastest-template.html 
> 
> With source code: 
> https://bitbucket.org/akorn/helloworld 
> 
> Thanks. 
> 
> Andriy Kornatskyy 
> 
> 
> ________________________________ 
> > Date: Fri, 1 Mar 2013 09:25:43 +0000 
> > Subject: Re: Twisted or Tornado? 
> > From: svenito@gmail.com<mailto:svenito@gmail.com> 
> > To: jake.angulo@gmail.com<mailto:jake.angulo@gmail.com> 
> > CC: python-list@python.org<mailto:python-list@python.org> 
> > 
> > Although these articles are a _little_ old they are probably useful to 
> > help you decide which solution is most suitable for you in terms of 
> > performance 
> > 
> > http://nichol.as/benchmark-of-python-web-servers 
> > http://nichol.as/asynchronous-servers-in-python 
> > 
> > I would also be interested if any one on this list has any idea if the 
> > results above would be any different these days or whether the 
> > benchmarks are still fairly representative. 
> > 
> > 
> > On 1 March 2013 00:28, Jake Angulo 
> > 
> <jake.angulo@gmail.com<mailto:jake.angulo@gmail.com><mailto:jake.angulo@gmail.com<mailto:jake.angulo@gmail.com>>> 
> wrote: 
> > I have to say it first: I am not trolling :P 
> > 
> > Im working on a server project (with IOS client) and would like to 
> > create a custom, lean and mean server - real Quick! 
> > 
> > My requirements for this framework in descending order: 
> > 1) Easy to use API 
> > 2) Widely available documentation / Examples / Community contributions 
> > 3) Feature-wise - kinda most that you commonly need is there 
> > 
> > Your opinions will be valuable, if possible cite examples or URL 
> > references, Pls! 
> > 
> > I prefer opinion from those who have programmed real projects in it - 
> > not just read some blog or Slashdot :P 
> > -- 
> > http://mail.python.org/mailman/listinfo/python-list 
> > 
> > 
> > 
> > -- 
> > ./Sven 
> > 
> > -- http://mail.python.org/mailman/listinfo/python-list 
> 
> 		 	   		  

[toc] | [prev] | [next] | [standalone]


#40508

FromWerner Thie <werner@thieprojects.ch>
Date2013-03-05 09:53 +0100
Message-ID<mailman.2871.1362473584.2939.python-list@python.org>
In reply to#40206
Hi

On 3/1/13 1:39 AM, Michael Torrie wrote:
> On 02/28/2013 05:28 PM, Jake Angulo wrote:
>> My requirements for this framework in descending order: 1) Easy to
>> use API 2) Widely available documentation / Examples / Community
>> contributions 3) Feature-wise - kinda most that you commonly need is
>> there

I'm happy with twisted programming browser based multi-player games for 
several years now. I wouldn't say that the learning curve was steep, 
rather the opposite, but the gain from a clean async programming model 
as it is implemented in twisted really makes the difference for me, not 
only in writing games, but even more in maintaining them long term.

It's also interesting to see, that this clean async model of twisted and 
its host of already provided protocols allowed me to implement solutions 
in notoriously problematic areas like overall stability, fault 
tolerance, load induced behavior, server analysis, 
multicore/multimachine capabilities and hot deployment with ease.

Cheers, Werner



[toc] | [prev] | [next] | [standalone]


#40596

Fromsystem.healer@gmail.com
Date2013-03-05 19:30 -0800
Message-ID<626cc4fe-670c-4c78-9934-c7aabc4eeaae@googlegroups.com>
In reply to#40206
Second on django.  This'll do.

https://bitbucket.org/jespern/django-piston/

Build whatever data models you want on the back-end and start spitting out JSON with a couple lines of code.

Used this to build an IAP server for iOS apps.  This one hasn't gone into production yet but I know of at least one high-profile platform developer that was using this same setup for years.


On Thursday, February 28, 2013 4:28:52 PM UTC-8, Jake Angulo wrote:
> I have to say it first: I am not trolling :P
> 
> 
> 
> Im working on a server project (with IOS client) and would like to create a custom, lean and mean server - real Quick!
> 
> 
> 
> My requirements for this framework in descending order:
> 
> 1) Easy to use API
> 
> 2) Widely available documentation / Examples / Community contributions
> 
> 3) Feature-wise - kinda most that you commonly need is there
> 
> 
> 
> Your opinions will be valuable, if possible cite examples or URL references, Pls!  
> 
> 
> 
> I prefer opinion from those who have programmed real projects in it - not just read some blog or Slashdot :P

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web