Live data from Hacker News

Rewriting Reddit (2005)

aaronsw.com

41–50 of 118 posts

Re: Rewriting Reddit (2005)

#41
post #9

Note that reddit has rewritten at least once since the web.py rewrite. cf. https://news.ycombinator.com/item?id=51078 I recall reading a more scathing post from spez at one point about frustrations with web.py, but I don't seem to see it now. It may have been removed. In any case, Flask seems to be the inheritor of the "write webapps in Python" description.

> In any case, Flask seems to be the inheritor of the "write webapps in Python" description. Flask definitely fills that role for me. It's very simple to get up and going with it, and deploys easily.

Me too. This post is making me so happy to see that others like Flask as I do. :)

Re: Rewriting Reddit (2005)

#42
We currently use web.py + gevent to run our API where I work. It's really easy to work with since it's so tiny and simple, and since we only need JSON in and out for now, it's perfectly sufficient.

Before web.py, we were on a scary Tornado implementation. The API was rewritten to web.py in a week with a minimal delta. We won't be on web.py forever, and gevent sometimes kicks up minor fusses, but I think web.py has given us a nice malleable form that helped us get out of a terrible place, and we can easily hop off once we decide where we want to be.

RIP aaronsw.

Re: Rewriting Reddit (2005)

#43

Earlier quoted context omitted.

No, the reddit project itself is still based on Pylons. However redditgifts (the reddit marketplace) is based in on Django so reddit does have Django.

Do you guys know what they felt about Flask?

At the time that we switched to pylons and decided to punt django, flask didn't exist. I believe it was some time on '07 or '08. I'd check, but I also think it predates our switching to git from subversion...

Personally I like flask a lot and it's come a long way. Also, when spez and I moved on to hipmunk we started using tornado.

Re: Rewriting Reddit (2005)

#44

Used Tornado, django and flask quite a bit, web.py only once. As others have mentioned, it didn't work that well, and the community around it is smaller than other frameworks. Again today, Django seems a bit cumbersome, Tornado works well but has a very low bus factor. Pretty sure flask is currently the front runner in "python microframeworks".

Flask has my preference 2. I was wondering what was reddit's folks opinion for flask.

Flask (2010) wasn't around when reddit was (re)written (2005).

Re: Rewriting Reddit (2005)

#46
post #18
post #11

web.py never really worked well, so we ended up rewriting it again. The interesting thing was that Django still wasn't up to the task when we did that, mostly because it's templating engine was too slow. So we chose Pylons instead. It should be noted that Django has since fixed that issue.

Do you recall what didn't work? So far web.py looks like a really nice rest-ful api backed framework. I rather like it. http://webpy.org/

A lot of the decisions made in designing web.py were also carried over to tornado's web framework (which not coincidentally is also a web.py).

At the time (and I have to admit my memory is a little foggy as it was 7 years ago), I believe we mostly switched away from it for maintainability reasons. It wasn't under active development, and we were in the middle of a complete MVC rewrite to impose some order on some otherwise organically grown code.

Re: Rewriting Reddit (2005)

#47
post #21
post #5

web.py is still my go to for lightweight webapps. I won't start a big discourse on the pros and cons vs. other technologies, but I will say it is incredibly easy to setup and use. The current github page is here: https://github.com/webpy/webpy If you are looking to get up and running quickly, I would recommend forking this skeleton: https://github.com/jzellman/webpy-skeleton Finally, the built in database framework i…

Yeah same here. It has the cleanest mapping from REST resources to Python class + method. It just made sense to me: The router block at the top plus: class MyResource: def GET(self,...): ... def POST(self,...): ... def PUT(self,...): ... def DELETE(self,...): ... Looks really nice. Haven't tried serving or rendering templates from it, so never tested that code.

Check out Flask's MethodView

Re: Rewriting Reddit (2005)

#48
> "It means readable HTML with the proper HTTP headers."

said all the other frameworks's authors a few months before him that are now churning out deprecated headers just like that one will in a couple months, while gallantly trying to protect the user from handling headers.

Re: Rewriting Reddit (2005)

#49
post #38

For all people still thinking that Django is not "lean" or flexible enough for their next project, let me just leave this here: https://speakerdeck.com/mstepniowski/django-best-python-micr... A single-file web application in Django: https://github.com/mstepniowski/microdjango/blob/master/poll...

Yeah it should be noted that all of the referenced decisions we made around web frameworks in this thread predate django's 1.0 release. I think I was comparing pylons to django 0.96 iirc, and in 2005 when aaron wrote web.py, I don't think django was on anybody's radar (or at least it wasn't on ours).

Django has definitely come a long way!

Re: Rewriting Reddit (2005)

#50
post #19

Earlier quoted context omitted.

That version of web.py has little relation to the one that Aaron wrote. The current version looks pretty good but I have no idea what it's scalability and modularity story is.

As a slight aside, what do you usually do to stress test a new framework to see if it's scalable?

Ask the community. :)

That's a little glib, but basically I ask other people with experience. You can throw as much fake traffic as you want at a framework but there is nothing like a real world test.

Post reply on HN