Previous | Next --- Slide 14 of 58
Back to Lecture Thumbnails
grose

Interestingly, this more complicated structure leads to confusion among the words "frontend" and "backend". While in a simple scenario you might think of the "frontend" as the Javascript/HTML, and the "backend" as the PHP/Python generating the web pages, the PHP/Python could be considered the "frontend" if you consider the database servers to be the "backend". In other words, frontend/backends are recursive structures.

Berry

In case anyone is wondering why everyone doesn't just use blazing fast C for worker processes instead of Python, a Quora thread (can't find it anymore) suggests it's because databases are almost always the bottlenecks and since they usually run on other machines the number of clock cycles spent preparing and parsing a query doesn't impact its performance. Getting something from RAM works in a similar fashion.

grose

@Berry yep, especially since you can use things like HHVM's async to generate several simultaneous DB requests (http://docs.hhvm.com/manual/en/hack.async.php)

I'd imagine even if the databases were fast, the fact that you're running a network request will take many, many cycles is enough to cause, at least in part, a bottleneck