A List of Useful Backend Architectures
gist.github.com
gist.github.com
This helps my theory that when you release open source code, you are improving the baseline technology for the entire world.
And when companies release the products THEY use and find helpful, everyone improves it and releases it back.
Memcache springs to mind.
OSS needs marketing, and the big ones recently have almost all sprung from world famous companies (twitter bootstrap, facebook and phabricator etc etc). It will become harder and harder to get noticed, but this is truly a open competitive market, and the best becomes top dog in most cases.
CEOs who spout support for the Free Market - beware, this is what it looks like. :-)
having said that, I am somewhat glad to see django there. for all the inconsistencies and speed issues that have already mentioned about python and django, it is great to see that the framework still gives pretty good performance on large systems.
I like that Trello has such a short list and still runs incredibly fast with a high number of users.
An architecture would be something like 'all major work done via job queues distributed across cheap machines, all pages statically built and pushed to CMS', or 'a dozen bare-metal machines with serious hardware running one-machine sharded app/cache/db slices and hot backups of each shard', fun stuff like that. relatively technology agnostic.
Check out the first chapter of "The Architecture of Open Source Applications (Volume Two)":
"Scalable Web Architecture and Distributed Systems" http://www.aosabook.org/en/distsys.html
My biggest gripe: it's easy to shoot yourself in the foot using Unicode. The system is cumbersome and the lack of typing makes it easy to slip a regular ASCII string somewhere, which will jump at your face when you expect it the least morphed into a stack trace.
The data structures' API is the worst and most inconsistent API I've ever seen. Why is 'dict' not 'Dict' ?
A comma ending a line actually makes a tuple, that's asking for trouble. I've witnessed more than one bug caused by this.
It is slow and resource hungry. Django is too[1]. GlobalInterpreterLock[2].
The package system is horrible, and pip won't save your day either. I love Clojure and Node.js just because of Leiningen/NPM. I couldn't use PyOpenGL in Windows from some unknown reason. I gave up!
Discourages functional programming, while encouraging ugly inline list comprehensions. The solution to the half-assed closures in Python2.7[3] was to introduce 'nonloncal'. Lists are mutable. Object Orientation feels clunky to me and using super is awkward.
"Batteries included" but core libraries won't take you too far. Unfortunately they're still bloating the language.
Concurrency is hard. Twisted solves it a bit but... meh...
What I like:
- Proper nested comprehensions (CoffeeScript completely blew this one...)
- I like the minimal syntax, it helps me visualize the program better.
- PyLint/PyFlakes highlights lines that don't conform to PEP8.
- Generators.
[1] http://www.techempower.com/benchmarks/#section=data-r5
[2] http://ynniv.com/blog/2007/08/closures-in-python.html (section Caveats)
I've been using Python for a couple years and it's mostly joyful. It is unfortunate that not even the various containers within "collections" use a uniform naming convention, I'll give you that. And some of the scoping stuff is weird (nonlocal which nobody really uses? and seemingly-but-not constant default function arguments). But Twisted is a pretty good evented programming system, and NumPy plus multiprocessing let you process a lot of data efficiently, GIL or no. I cannot agree that "the core libraries won't take you too far"--they've taken me farther than the comparable bits in any other language.
I could make my own list of reasons why I think Java sucks for web development, but someone who's proficient in Java web application development will disagree with those just the same. Every language has its faults, and Python is no exception. Personally I simply hate writing Java code, of all the languages I've used, it's by far the least enjoyable to write and maintain.
(the slowness of the interpreter allows you time to appreciate its beauty)
Spurious symbols at the end of a line is really a complaint? Have you ever forgotten a semi-colon in c/c++ code?