Friday, November 18, 2011

HTML5 rocks!

Just a little insider joke for those who know what's what and what was what 10 years ago...


;-)

Thursday, November 10, 2011

Mobile flash is dead. The future is mobile!

So where the heck does that leave Flash as a platform?!
Lee urges the community to caution reasoning that
"Flash is not nearly as ubiquitous on mobile browsers as it is on the desktop"
Aral, long time parted from the mothership tweets "I told you so!".

So the future is mobile, the future is native and there's place only for HTML5 in the browser. Go figure...

In truth I haven't had a decent flash website project since 2009. I did have lots of AIR work and AJAX+HTML5 work. But then again. as a working developer you dont't really need to try to figure out the trends...
All you need to do is keep up with them ;-)

first rule of GIT

Yep, GIT rocks!
I just had to do some search and replace on a local version of a static website and I needed a way to quickly version my changes as the muti-file search and replace in TextWrangler cannot be reversed. GIT to the  rescue. I just made a local git repo of the website, a first commit, the search and replace and another commit.
Brilliant!
I was able to make a backup before the search/replace using git archive and after the commit I used my old git diff script to export the changed files to a different folder. So my first rule of GIT is:
GIT is first and foremost a tool for you and _your_ code!

To SQL or NoSQL to...

I'm pretty fond of MySQL and I really think that paired with MySQLWorkbench it provides an unbeatable solution for your regular web development needs.
But it's hard to ignore the NoSQL crowd with their stories of sheer heroic victories over latency in deploying and scaling complex online applications. Like only yesterday I was going over this presentation of Jesper Richter Reichhelm of Wooga in which he explained how they got to 1 mil. daily users without cache. With R/W to the database. It's true that they use Redis for the high octane stuff and MySQL for the rest but still it wouldn't work without NoSQL. Much virtual ink has flown since the rise of NoSQL and here is a particularly concise piece from Kristóf Kovács on the various solutions available with their pros and cons.
But now here's Yoshinori Matsunobu of DeNA, ex. MySQL consultant coming up and claiming 750.000 qps on a commodity server using ONLY MySQL. In his investigations of MySQL vs memcached his basic conclusion is that most of the time is consumed in SQL by concurrency controls. In order to circumvent this while still using InnoDB Akira Higuchi wrote the HandlerSocket Plugin:
"HandlerSocket is a MySQL daemon plugin so that applications can use MySQL like NoSQL. The biggest purpose of the HandlerSocket is that it talks with storage engines like InnoDB without SQL-related overheads. To access MySQL tables, of course HandlerSocket needs to open/close tables. But HandlerSocket does not open/close tables every time. It keeps tables opened for reuse. Opening/closing tables is very costly and causes serious mutex contentions so it's very helpful to improve performance. Of course HandlerSocket closes tables when traffics become small etc so that it won't block administrative commands (DDL) forever."
Neat!
It looks that it's almost 2x as fast as using memcached with less CPU usage. And you get to keep all the benefits of InnoDB.
Also fresh from Oracle there is the new preview release of the memcached daemon plugin which implements memcached as a MySQL plugin daemon. This has the memcached and mysql in the same process thus having very low latency and does direct access to InnoDB bypassing the SQL parser. It looks very promising!

Still I'm not saying that you should forget about NoSQL. On the contrary!
I strongly believe that as a developer you should keep all these solutions at hand. It's good to have so many options and so much shared knowledge available and it only makes it more easy to be able to provide your clients with the optimal solutions to their problems.
\m/
Rock on!