librelist archives

« back to archive

Flask for social news site

Flask for social news site

From:
Aaron Moodie
Date:
2010-09-15 @ 08:52
Hi Everyone,

I'm new to the group, and have recently started playing around with Flask
(which I'm loving).

I wanted to ask your opinion on whether you consider Flask to be a good
framework for an initial build of a social news website. I've seen newsmeme
and Blue slug, which are good examples of what can be done, but my concern
is that if in twelve months time the site needs considerable scaling, I may
have built myself into a corner with Flask. I've also read the 'Becoming
Big' article, which does give me confidence to use Flask, I just wanted to
ask anyone had some experience with scaling.

thanks,
Aaron

Re: [flask] Flask for social news site

From:
Dan Jacob
Date:
2010-09-15 @ 09:25
By scaling do you mean the size/complexity of the project, or
performance under high traffic ?

On 15 September 2010 09:52, Aaron Moodie <aaronmoodie@gmail.com> wrote:
> Hi Everyone,
> I'm new to the group, and have recently started playing around with Flask
> (which I'm loving).
> I wanted to ask your opinion on whether you consider Flask to be a good
> framework for an initial build of a social news website. I've seen newsmeme
> and Blue slug, which are good examples of what can be done, but my concern
> is that if in twelve months time the site needs considerable scaling, I may
> have built myself into a corner with Flask. I've also read the 'Becoming
> Big' article, which does give me confidence to use Flask, I just wanted to
> ask anyone had some experience with scaling.
> thanks,
> Aaron
>
>

Re: [flask] Flask for social news site

From:
Aaron Moodie
Date:
2010-09-15 @ 09:55
Both. Initially it's going to be basic articles with a few categories and
comments. But if the traffic/popularity of the site increases, as will the
investment and features/sections. I want to design the system myself so that
I can factor in features and future issues that a out of the box system
couldn't handle, but at the same time use something that isn't overkill for
a simple site, and wont fall over or cause issues should the site grow.


On Wed, Sep 15, 2010 at 7:25 PM, Dan Jacob <danjac354@gmail.com> wrote:

> By scaling do you mean the size/complexity of the project, or
> performance under high traffic ?
>
> On 15 September 2010 09:52, Aaron Moodie <aaronmoodie@gmail.com> wrote:
> > Hi Everyone,
> > I'm new to the group, and have recently started playing around with Flask
> > (which I'm loving).
> > I wanted to ask your opinion on whether you consider Flask to be a good
> > framework for an initial build of a social news website. I've seen
> newsmeme
> > and Blue slug, which are good examples of what can be done, but my
> concern
> > is that if in twelve months time the site needs considerable scaling, I
> may
> > have built myself into a corner with Flask. I've also read the 'Becoming
> > Big' article, which does give me confidence to use Flask, I just wanted
> to
> > ask anyone had some experience with scaling.
> > thanks,
> > Aaron
> >
> >
>

Re: [flask] Flask for social news site

From:
Ron DuPlain
Date:
2010-09-15 @ 16:15
On Wed, Sep 15, 2010 at 5:55 AM, Aaron Moodie <aaronmoodie@gmail.com> wrote:
> I want to design the system myself so that
> I can factor in features and future issues that a out of the box system
> couldn't handle, but at the same time use something that isn't overkill for
> a simple site, and wont fall over or cause issues should the site grow.

I'm using Flask in a web app which we plan to scale.  It's still
early.  I know this: as soon as any one of us here hits hard
scalability questions (in performance or in project size), there will
be a community of really smart people who will help figure it out.

We're confirming on this end that Flask is living up to the "micro"
label by letting us address the problems specific to the project at
hand while still being productive.  We throw away any pattern that
isn't working for us.  The best part is: the Flask source is so
readable, there's never a doubt of what's going on.

-Ron

Re: [flask] Flask for social news site

From:
Drew Vogel
Date:
2010-09-15 @ 16:31
I don't have any experience actually scaling Flask, but I've evaluated
nearly every python web framework available and Flask is definitely the most
flexible and easily modified. So while YMMV, when it comes time to scale you
will not be locked into a certain way of doing things which may have made it
easy to get up and running at the expense of efficiency, etc. That's the
main reason I've chosen Flask for my python web work.

Drew Vogel



On Wed, Sep 15, 2010 at 11:15 AM, Ron DuPlain <ron.duplain@gmail.com> wrote:

> On Wed, Sep 15, 2010 at 5:55 AM, Aaron Moodie <aaronmoodie@gmail.com>
> wrote:
> > I want to design the system myself so that
> > I can factor in features and future issues that a out of the box system
> > couldn't handle, but at the same time use something that isn't overkill
> for
> > a simple site, and wont fall over or cause issues should the site grow.
>
> I'm using Flask in a web app which we plan to scale.  It's still
> early.  I know this: as soon as any one of us here hits hard
> scalability questions (in performance or in project size), there will
> be a community of really smart people who will help figure it out.
>
> We're confirming on this end that Flask is living up to the "micro"
> label by letting us address the problems specific to the project at
> hand while still being productive.  We throw away any pattern that
> isn't working for us.  The best part is: the Flask source is so
> readable, there's never a doubt of what's going on.
>
> -Ron
>

Re: [flask] Flask for social news site

From:
Aaron Moodie
Date:
2010-09-16 @ 00:34
Thanks for your feedback guys. it's exactly what I wanted to here! ;)
Also, thanks for the DB advice Dan. I'm aware that this is where most issues
are likely to arise, but thanks for the tips.

Aaron

On Thu, Sep 16, 2010 at 2:31 AM, Drew Vogel <drewpvogel@gmail.com> wrote:

> I don't have any experience actually scaling Flask, but I've evaluated
> nearly every python web framework available and Flask is definitely the most
> flexible and easily modified. So while YMMV, when it comes time to scale you
> will not be locked into a certain way of doing things which may have made it
> easy to get up and running at the expense of efficiency, etc. That's the
> main reason I've chosen Flask for my python web work.
>
> Drew Vogel
>
>
>
>
> On Wed, Sep 15, 2010 at 11:15 AM, Ron DuPlain <ron.duplain@gmail.com>wrote:
>
>> On Wed, Sep 15, 2010 at 5:55 AM, Aaron Moodie <aaronmoodie@gmail.com>
>> wrote:
>> > I want to design the system myself so that
>> > I can factor in features and future issues that a out of the box system
>> > couldn't handle, but at the same time use something that isn't overkill
>> for
>> > a simple site, and wont fall over or cause issues should the site grow.
>>
>> I'm using Flask in a web app which we plan to scale.  It's still
>> early.  I know this: as soon as any one of us here hits hard
>> scalability questions (in performance or in project size), there will
>> be a community of really smart people who will help figure it out.
>>
>> We're confirming on this end that Flask is living up to the "micro"
>> label by letting us address the problems specific to the project at
>> hand while still being productive.  We throw away any pattern that
>> isn't working for us.  The best part is: the Flask source is so
>> readable, there's never a doubt of what's going on.
>>
>> -Ron
>>
>
>

Re: [flask] Flask for social news site

From:
Thadeus Burgess
Date:
2010-09-16 @ 01:27
I think that the scaling concerns have nothing to do with how the
framework handles loads and requests, but more of how does the
codebase scale. How maintainable is a flask project when it gets to
100k lines of python code? Any decent WSGI framework will be able to
handle the scaling in regards to requests and user base.
--
Thadeus





On Wed, Sep 15, 2010 at 7:34 PM, Aaron Moodie <aaronmoodie@gmail.com> wrote:
> Thanks for your feedback guys. it's exactly what I wanted to here! ;)
> Also, thanks for the DB advice Dan. I'm aware that this is where most issues
> are likely to arise, but thanks for the tips.
>
> Aaron
>
> On Thu, Sep 16, 2010 at 2:31 AM, Drew Vogel <drewpvogel@gmail.com> wrote:
>>
>> I don't have any experience actually scaling Flask, but I've evaluated
>> nearly every python web framework available and Flask is definitely the most
>> flexible and easily modified. So while YMMV, when it comes time to scale you
>> will not be locked into a certain way of doing things which may have made it
>> easy to get up and running at the expense of efficiency, etc. That's the
>> main reason I've chosen Flask for my python web work.
>>
>> Drew Vogel
>>
>>
>>
>> On Wed, Sep 15, 2010 at 11:15 AM, Ron DuPlain <ron.duplain@gmail.com>
>> wrote:
>>>
>>> On Wed, Sep 15, 2010 at 5:55 AM, Aaron Moodie <aaronmoodie@gmail.com>
>>> wrote:
>>> > I want to design the system myself so that
>>> > I can factor in features and future issues that a out of the box system
>>> > couldn't handle, but at the same time use something that isn't overkill
>>> > for
>>> > a simple site, and wont fall over or cause issues should the site grow.
>>>
>>> I'm using Flask in a web app which we plan to scale.  It's still
>>> early.  I know this: as soon as any one of us here hits hard
>>> scalability questions (in performance or in project size), there will
>>> be a community of really smart people who will help figure it out.
>>>
>>> We're confirming on this end that Flask is living up to the "micro"
>>> label by letting us address the problems specific to the project at
>>> hand while still being productive.  We throw away any pattern that
>>> isn't working for us.  The best part is: the Flask source is so
>>> readable, there's never a doubt of what's going on.
>>>
>>> -Ron
>>
>
>

Re: [flask] Flask for social news site

From:
Dan Jacob
Date:
2010-09-16 @ 07:01
On 16 September 2010 02:27, Thadeus Burgess <thadeusb@thadeusb.com> wrote:
> I think that the scaling concerns have nothing to do with how the
> framework handles loads and requests, but more of how does the
> codebase scale. How maintainable is a flask project when it gets to
> 100k lines of python code? Any decent WSGI framework will be able to
> handle the scaling in regards to requests and user base.
> --

That's a good point. I think the difference between (say) Flask and
Django on this point is that Django provides some structure for larger
projects in the form of apps, while Flask projects are like any other
large Python projects - if a module grows to big, split it into
packages. There are some patterns to help with this - app factories,
Module and so on, but otherwise you are on your own.

Having said that I've worked on Django projects where everything is in
one big app. At the end of the day it comes down to good design and
experience.


> Thadeus
>
>
>
>
>
> On Wed, Sep 15, 2010 at 7:34 PM, Aaron Moodie <aaronmoodie@gmail.com> wrote:
>> Thanks for your feedback guys. it's exactly what I wanted to here! ;)
>> Also, thanks for the DB advice Dan. I'm aware that this is where most issues
>> are likely to arise, but thanks for the tips.
>>
>> Aaron
>>
>> On Thu, Sep 16, 2010 at 2:31 AM, Drew Vogel <drewpvogel@gmail.com> wrote:
>>>
>>> I don't have any experience actually scaling Flask, but I've evaluated
>>> nearly every python web framework available and Flask is definitely the most
>>> flexible and easily modified. So while YMMV, when it comes time to scale you
>>> will not be locked into a certain way of doing things which may have made it
>>> easy to get up and running at the expense of efficiency, etc. That's the
>>> main reason I've chosen Flask for my python web work.
>>>
>>> Drew Vogel
>>>
>>>
>>>
>>> On Wed, Sep 15, 2010 at 11:15 AM, Ron DuPlain <ron.duplain@gmail.com>
>>> wrote:
>>>>
>>>> On Wed, Sep 15, 2010 at 5:55 AM, Aaron Moodie <aaronmoodie@gmail.com>
>>>> wrote:
>>>> > I want to design the system myself so that
>>>> > I can factor in features and future issues that a out of the box system
>>>> > couldn't handle, but at the same time use something that isn't overkill
>>>> > for
>>>> > a simple site, and wont fall over or cause issues should the site grow.
>>>>
>>>> I'm using Flask in a web app which we plan to scale.  It's still
>>>> early.  I know this: as soon as any one of us here hits hard
>>>> scalability questions (in performance or in project size), there will
>>>> be a community of really smart people who will help figure it out.
>>>>
>>>> We're confirming on this end that Flask is living up to the "micro"
>>>> label by letting us address the problems specific to the project at
>>>> hand while still being productive.  We throw away any pattern that
>>>> isn't working for us.  The best part is: the Flask source is so
>>>> readable, there's never a doubt of what's going on.
>>>>
>>>> -Ron
>>>
>>
>>
>

Re: [flask] Flask for social news site

From:
Dan Jacob
Date:
2010-09-15 @ 16:27
It should also be pointed out (as I'm sure you are aware) that your
likely pain points are to be in the database and other I/O. Make sure
your database is properly indexed, you are using efficient queries,
etc (or whatever equivalents in No-SQL land). Push long-running
processes to cronjobs or a message queue. In production you also need
to ensure that static content is not being handled by Flask but using
a dedicated server (nginx, s3, whatever). These tips are not specific
to Flask but worth mentioning in any case.

On 15 September 2010 17:15, Ron DuPlain <ron.duplain@gmail.com> wrote:
> On Wed, Sep 15, 2010 at 5:55 AM, Aaron Moodie <aaronmoodie@gmail.com> wrote:
>> I want to design the system myself so that
>> I can factor in features and future issues that a out of the box system
>> couldn't handle, but at the same time use something that isn't overkill for
>> a simple site, and wont fall over or cause issues should the site grow.
>
> I'm using Flask in a web app which we plan to scale.  It's still
> early.  I know this: as soon as any one of us here hits hard
> scalability questions (in performance or in project size), there will
> be a community of really smart people who will help figure it out.
>
> We're confirming on this end that Flask is living up to the "micro"
> label by letting us address the problems specific to the project at
> hand while still being productive.  We throw away any pattern that
> isn't working for us.  The best part is: the Flask source is so
> readable, there's never a doubt of what's going on.
>
> -Ron
>