Snapshots of a PHP enterprise developer ’s life ( How I needed CCTV… )
July 11, 2007 at 4:42 pm | In Application Architecture, Code, Design, Design and Implementation, Software, codebloke, framework, http debugger, ide, komodo, lamp, mysql, php, php5, user experience, zend | 1 CommentThis article is actually meant to be praise for Komodo 4.1 IDE (a reasonably priced PHP IDE with HTTP debugging features), but when I started to write the post I realised that the whole story must be told from different angle. Not that the Komodo is not worth praising, it is and that’s for sure. However, since the story evolved I’ve taken decision to post a link to community version (Komodo Edit) and make a point regarding much more complicated matter. And so it happens a bit more important if you pay your bills implementing business logic with the PHP5 and LAMP like I do.
Story in brief is about knowing and not guessing, but let me start with some memories of the past.
History
While working for a UK email marketing company some time ago (I am still thinking if I should mention them in this article…) I was developing a couple of new features. Long ago this company decided to use very complicated application stack. It’s enough to say that Postgres, PHP4 and XSLT were running under one roof (sometimes) delivering… transitional HTML.
So, every time a helpdesk ticket was initiated by the fault report I heard the same mantra being sung to clients “we cannot replicate the error”.
From the very beginning I felt it wasn’t right to do bullshit talking to the clients that pay your bills. I knew how to make web-based system fully monitored. Problem was that with this company (for the first time in my life) I plunged a bit with my own projects, system was undocumented and the other senior developer acted simply like a jerk. As you see it’s wasn’t the perfect positions to address my bright vision of a fully self-aware web-based application server. Especially that this “dotcom” company, located in the countryside had a huge problem with equipping developers with a new dev server, we also suffered electricity shortages from time to time and the internet uplink was down pretty often… However I liked the rural setup (see video below).
So, I started to develop that solution on my own and ended up with a very efficient piece of code that I called CCTV, which allows:
- Remote side profiling
- Login / logoff based on database-stored sessions
- Real-time application input and output logging
- Detecting users opening application with multiple browser windows
System creates “remote side” profiles based on ip/proxy/network block/country/browser and you can compare these profiles with all logged HTTP requests, i.e. searching for fraudsters (without laborious strings digging).
I don’t need to explain that unlike file-based PHP sessions this system can be distributed across database cluster without even breaking the sessions. Also, you can use multiple web and database servers. In terms of uptime, mixed with stuff like i.e. round robin (internet) or hiding web server behind a load balancer (in LAN) it makes your application virtually invincible (with “virtually” stressed). Another benefit here is that you can centralize session’s management and logoff one or all users even though the session (or cookie) has not expired yet.
Real time output logging makes sense only in the development phase (UX – User Experience, cross-browser functionality checks, etc.). One of the features I like is that when you forced user’s logoff having output logging turned on, you can rebuild his “last seen” application state when he logs back.
I don’t need to explain significance of that… it simply undermines the dogma of HTTP being a stateless protocol. Not anymore…
So, I started to think of all this looking at Komodo which has HTTP debugger built-in and having that tool I probably would never start my CCTV project…
Today
I am now senior developer at World First in London a foreign exchange company with yearly turnover of approx. 3 billion GBP (roughly $6,000,000,000.00).
Part of my job is development of the dealing application in the Intranet that runs on LAMP and CCTV is a part of it. Just looked at the stats… so, running PHP5 and MySQL 5.20 we serve over 180,000 HTTP requests daily (which means apporx. 80,000 database transactions a day) and I can restore every second of the system’s life, as easy as if I had a rewind button.
Future?
When you deliver a platform (and PHP5 surely is a platform), you must deliver a coherent application framework. Not for internet, blogging, CMS, etc., but for the enterprise. Otherwise you force the developers like me to do your job.
Now, assuming that MySQL 5.2 is now really a database… then maybe it’s a good time to stop playing funny guys and together with MySQL AB you deliver a unified application platform with all features mentioned above with the C-implemented sessions functionality?
I wonder if guys at Zend realize already that even support of IBM’s DB2, or projects like OPAL (trick with Oracle’s support for PHP), these are simply jokes when the only thing decent with PHP is so far the language syntax – inherited anyway.
Don’t get me wrong. I am a big PHP fan and I wait for a situation update… but seems to me like they decide to make money on events and that type of crap, rather than software.
Martin
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.