4 ms·
This is the first I've heard of Falcon. Have you used it for a "real" project? It'd be interesting to know the tradeoffs when considering it against something l
by wowzer 11y ago
This is the first I've heard of Falcon. Have you used it for a "real" project? It'd be interesting to know the tradeoffs when considering it against something like Django Rest Framework. Looking at the benchmark figures on the Falcon site, it's sad that Python 3 underperforms Python 2. I wish Python 3 had the slightest performance win, it'd be an easier sell. Hate to shift the topic to Python 2/3 talks, but I've wanted to switch for a while now, and it's still not the simplest sell.
- aidos 11y agoNoooooo....let's not go there today! :-) I'd take those benchmarks with a massive pinch of salt. 338µs per request for Flask is the bad case. 0.5ms of the request is spent in the framework, that's not even noise. The fastest framework I've used is one I wrote for coldfusion and that's the only time I've expected all my requests to be sub 100ms. And even then, the network latency turns that into noise. Look at features before performance - both in the case of frameworks and version of Python to use (Python 3 is a lot nicer).
- andrewstuart 11y agoYes I have used Falcon extensively and I like it alot. Lies, damn lies and benchmarks - I'm not saying the benchmarks are made up but you know - the benchmark thing. Falcon for REST API development. Django/Pyramid for full featured web application development. And regarding speed, well how does its Python 3 performance compare to the Python 2 performance of other Python web servers? And any does speed matter that much? In many cases "fast enough is good enough" and the bottle necks are more likely to be other parts of your system and if speed matter that much then you should be horizontally scaling. And if I may raise the ugly topic - who cares about Python 2 under any circumstances? For me - and I know many people do not think this way - Python 2 is dead so who gives a rats arse anything about it. Python 3 is the future and I'm not looking back for any gripes or grumbles about it. Don't get me wrong, I think ruby-rails-slow is a bad thing, but Falcon fast should be good enough. And if speed really matters to you then you shouldn't be using Python for web application development.
- aidos 11y agoI looked into Falcon a while back - looked interesting but it wasn't immediately obvious what I would get over Flask (if nothing else, there's a tonne of Flask docs out there these days). In all my research over the years Pyramid is the framework that looks the most interesting. The docs are amazing (I more or less read them cover to cover, even though I haven't tried the framework) and the whole thing seems very well thought out. I'd love any insights from people who have worked with it.
- andrewstuart 11y ago>> it wasn't immediately obvious what I would get over Flask Falcon gives you less than Flask, not more. For me the big thing is that Falcon has none of the stuff needed for building web apps. Flask has all that stuff cause it was built when back end servers also built the HTML pages. There's alot of stuff associated with that functionality in Flask that is not there in Falcon. It makes it much cleaner.
- mmerickel 11y agoWell as one of the primary maintainers of Pyramid I'll just say that it's laughable to me all the comparisons to Django as it's much more similar to Flask. The main difference is that it comes with several more "pay only for what you eat" standardized interfaces that you can use to pull things together. It's declarative security concepts are fantastic and completely missing from most other frameworks as well which choose to punt this part to (usually) half-baked addon libraries built to serve one specific use-case.
- goo 11y agoI've worked on one project with Pyramid extensively, and I've been relatively pleased. It gives you a lot of flexibility, which can be good and bad. There is useful code that helps you unit test your app, and it is not a particularly opinionated framework. That being said, the number of options that pyramids allows can be a little overwhelming -- it gets a grade 'C-" when held up to the zen of python's line: "There should be one-- and preferably only one --obvious way to do it." When held up to "Although practicality beats purity.", as well as most of the rest of the pythonic ideals, Pyramids gets a solid A. Personally, I'm excited to explore flask more, since it seems to put the ball entirely in your court. I like the concept behind flask a lot -- for some projects I'm willing to sacrifice additional framework features in exchange for a more careful understanding of everything I am adding to my app.
- encoderer 11y agoI just added a comment up-thread with my experience in production with Falcon. Check it out.