Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
TreeFrog: high-speed full-stack C++ framework for web applications (treefrogframework.org)
50 points by ingve on Nov 3, 2014 | hide | past | favorite | 29 comments


The sad thing is: This framework isn't really fast. Just by virtue of being C++ nothing gets faster. Have a look at the web framework benchmarks:

http://www.techempower.com/benchmarks/#section=data-r9


Very informative link, I don't really use PHP anymore but I was surprised to see Laravel is faster than Symfony though it uses many Symfony components.


I had no idea rails/django are sooooo slow


Rails IS slow, but part of the reason it shows so poorly on that tests is a weird glitch in how unicorn and wrk interact. In my testing for the Ruby Web Benchmark Report (http://www.madebymarket.com/blog/dev/ruby-web-benchmark-repo...) I ran into pretty bizarre low performance on unicorn and wrk.

TechEmpower uses Unicorn because it's the fastest MRI based rack server solution.

In JRuby, you have a few more high performance options, and Torquebox 4 is nearly as fast as Go in Hello World.

That being said, the only benchmark that matters is how your app performs on your tech stack. Anyone can write a slow DB query that ruins performance.


...which should tell you that speed really isn't as big a deal in web dev as some would have you believe. :)


It doesn't tell you that at all, since plenty of companies lose users/etc due to latency and other issues.


There are a ton of ways to optimize web apps without needing the application server to be the fastest. Caching, reverse proxy, CDN, scale-out, etc.


[citation needed]

I imagine that that issue is highly overrated for most companies.


You really want me to start citing research papers which show that if you improve latency, even if users don't "notice" it, you gain users?

"web latency research user conversion rate" on google will turn up a ton.

Heck, back in 2004, ten years ago, you only got two seconds: http://cba.unl.edu/research/articles/548/download.pdf

Now 1 second http://www.australianscience.com.au/research/google/34439.pd...

Even that causes losses: http://www.tagman.com/mdp-blog/2012/03/just-one-second-delay...

Google sees significant effects at 200ms: http://googleresearch.blogspot.com/2009/06/speed-matters.htm...

blah blah blah.

Feel free to find things that say the opposite, i've never seen a study that says "users will choose the slower service, if it's 'better', they just don't give a crap".

And sure there is a diminishing return, but if your latency times are 1s or greater for a web based service, you are almost 100% guaranteed to be losing users/conversions/etc.


From a psychological standpoint, a server that consistently responds quickly & doesn't break is easier to trust.


Actually, performance is quite important for scalability. A lot of sites written in Ruby / PHP have big scalability pains if they get popular. Twitter had to be re-written from Ruby to Java. Facebook had to completely rewrite PHP's compiler to make it close to a compiled / statically typed language.

Joel Spolsky mentioned how StackOverflow only needed 3 servers to run it for a really long time, because it was coded in a compiled language. [1]

[1] http://youtu.be/pPJf8KrvJXU?t=22m33s


He says that at the 22m mark. And he says that currently he can fit his servers into 1 rack, while being a top 100 site.


It's nice to see how fast Go is already. It'll probably be a couple years ago, but it should improve once they start working on the optimizing compiler.

People have already demonstrated how Go can be used on the server: http://blog.iron.io/2013/03/how-we-went-from-30-servers-to-2...


No, it doesn't imply anything at all about whether speed is a big deal or not.

At best one can conclude that concerns about performance aren't as important as other considerations which make Rails/Django more attractive. My opinion is that these other considerations are more along the lines of cost of labor and ease of learning than anything else.


That may be true, but the main point that's being ignored by such statements should always be mentioned: Django and the like in scripting languages offer an easy to use and fast to implement way of getting an idea off the ground. Once you really go beyond millions of requests, it should be also possible to hire Java developers then to rewrite the app for scaling beyond the tipping point of scripting language apps.


Go is pretty new and pretty dang high on that list. Which is nice to me. It also makes me want to give it a shot in a project. Are there any nice templating frameworks for Go - that would be pretty much the only thing to prevent me from using it. I need templates like I do in Django.


http://golang.org/pkg/html/template/ - data driven, context aware (smart escaping) templates in the standard library and gobs of 3rd party libraries.



I am fan of golang, but I am very surprised that it is only 50% of Java and only 33% of c++.


They haven't invested heavily into the optimizing the compiler. They're waiting until the entire compiler is rewritten from C to Go before they do the the work. Java's jvm has been heavily optimized and it's quite impressive.


treefrog-thread 223,033

I see a few other languages higher than that.


wish they'd either included a language section in the graph view, or had the table view sortable by column other than alphabetical name.


There is a "Lng" (language) column at the right of the table. It's the second color-coded attribute column, after the framework classification column.

You can also filter out languages you don't care about by using the filters panel (click the "Show filters panel" button).


i want to sort by performance, and see what language is used in each framework at the same time. the performance view has no language, and the table view has no sortable columns.


I don't really see the benefit of using Qt in this case, and the framework states that because it's in C++ it's faster which is just plain wrong.


Qt comes with a built-in event loop which can be really nice for certain types of asynchronous servers.


They're likely building on the low-level OS and networking primitives in Qt.


I don't see why they use Qt doing things like this...

https://github.com/treefrogframework/treefrog-framework/blob...


I don't see any mention of c++ being compiled to javascript. Without that, this seems to be server-only, not full stack.

On the other hand, there is Google Web Toolkit which lets you write both client and server code in Java, which is very close to C++ in performance, and compiles the client code to very efficient javascript. (CSS is also compiled into being very efficient.) http://www.gwtproject.org/overview.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: