i hope that everyone can learn something from this talk\nand I hope to learn something from you\n
\n
\n
i want to get a little of the track\n
my whole talk is build around this opinion\n
well, it’s not a opinion, it’s a fact. or, a myth.\nruby is slow. ruby is slow COMPARED to.\nbut working with Rails is much effective than with any other framework\n
\n
they are not supposed to scale\nthey are only supposed to carry out the tasks that we learn them to do\n
programming language matters (IN GENERAL) if you run a hello world benchmark\n
or you run a website at a massive scale\nI mean thousands of server, where spinning down 10000 servers makes a hude difference in your budget\n
and basically you almost always come to a conclusion that’s not your application that’s slow.\nand if it is it really simple to fix.\nit’s your architecture that’s failing\n
\n
and I hope to learn something from you too - feel free to interrupt at any time\n
because every app is different\n
this talk may help you solve some very obvious things with your application\nthis talk will not solve your architectural issues\n
\n
\n
ASK: what do you want to monitor in your app?\nthere’s one thing that you want to monitor\n
you want to monitor everything\nboth your application for bottlenecks and other issue\nand your server to simplify debugging - ie. your code won’t be fast if you disks are slow or you’re running out of memory\n
some tools I can recommend\nthese tools are easy and FREE to start with\n
monitors application performance\nbreaks down every aspect of your application - controller, database, templates, other\nit can monitor servers too!\n
again - free to start and has a very nice graph set if you don’t want to roll out your own solution\nthough it gets expensive really fast so you might want to roll something on your own\n
you what’s a great source of information?\nRails log files!\nyou might want to analyze them and create custom reports\n
all these tools are free\n
nagios, union station, munin, scout, plenty of others\n
there’s one thing that you want to monitor\n
you want to monitor everything\nboth your application for bottlenecks and other issue\nand your server to simplify debugging - ie. your code won’t be fast if you disks are slow or you’re running out of memory\n
produces xdebug compatible output\n
gets deeper into Ruby internals, based on Google perftools\n
a droping for you rails application\n
\n
\n
by default rails executes lots of queries\n
that’s how orms work\nthat’s what keeps us, developers, happy & productive\nthat’s what keeps our DBA loosing precious sleep\n
you can use this shortcut when creating new tables\n
always use includes when running queries\n
always use includes when running queries\n
always use includes when running queries\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
replace distance of time in words with javascript counterpart\n
\n
\n
\n
\n
do you know where?\n
\n
\n
\n
saves a lot on date parsing. and date / datetime parsing is incredibly slow in ruby\n
\n
\n
\n
this can become a huge number\n
\n
\n
because of thread safety and other considerations\n
\n
there’s one thing that you want to monitor\n
you want to monitor everything\nboth your application for bottlenecks and other issue\nand your server to simplify debugging - ie. your code won’t be fast if you disks are slow or you’re running out of memory\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
so you can do plenty of stuff with Rails\nRails is amazing application development stack\nyou want to learn all its features - it definitely worth\n