De-commissioning old Content Management System

Notes from De-commissioning old Content Management System: The MungenetEngine. The engine has rendered 10 million image views and 2.5 million page views from handcoded MySQL and PHP.

  1. “coding” in PHP feels wrong, wrong, wrong. A little dirty. After 6 months, I feel I should be writing in C#, IronPython; at least something decent. Not PHP. It’s too lose. Like Visual Basic. Sadly, this will probably the last time I use PHP for a significant amount of time as I move to CLR/DLR style languages and platforms.
  2. The code to complete the transition was a mere 138 lines of PHP; referencing some opensource XML-RPC libraries (to insert blog entries over the wire), and 2110 lines in the base library that acts as the old engine.
  3. Turning off http://twitter.com/nickhodge for a few days helped productivity. Also working at home during the shenanigans of APEC 2007 helped productivity, too.  I also stopped being as responsive on email, voicemail etc to get some good “focus” time to get this happening.
  4. The code I am putting out to pasture was largely written in 2001-2. Small pieces were tweaked through 2002-7. It has survived PHP 4.0.x to 5.2.x pretty unscathed. http://nickhodge.com/mn8/section/23/ details the history and philosophy of the self-written and maintained CMS.
  5. WordPress is not the final step. It is just a good time to move a platform I transition to other places in the future, somewhere in the cloud.
  6. As Joel Pobar says, “having no policy on cache is a memory leak”. In my instance, the smartness of a cache for production use to reduce hits on MySQL resulted in a bug that took 45 minutes to track down. Not as a memory leak, just unexpected behavior.
  7. Strategy: get images from the database into a fixed file system under http://media.nickhodge.com/. As per the wise guidance of UncleMike, this futureproofs my data. A part of the strategy is to move the rss feeds to a local feed system as I am not trusting feedburner and feedjumbler for stats right now.
  8. Rendered pages: best thing to do is “wrap” what is content with markers, render the page via CURL, and persist what is wrapped into the WordPress CMS. The how came to me in an afternoon nana nap. Conscious brain was on hold, and the real smarts came to the fore. 
  9. Regular Expressions. Why-oh-why where they invented to make my brain explode? Thankfully, the intarwebs helps.
  10. A shim of the MungenetEngine will remain in place to “301” old URLs to new URLs. Full page rendering and image/binary rendering will be turned off. Therefore, the import mode will not be WordPress RSS style import. Using http://www.dentedreality.com.au/bloggerapi/ to post via XML-RPC
  11. Mangling dates, and doing hand-crafted fixes to my WordPress XML-RPC (note: this is patched for 2.3, evidently) took some hours.
  12. There are 761 blog entries prior to transition.  From an earlier blog transition on August 8th 2006, the count was 371. There have been 390 entries since. Post transition, there are now 940 posts.
  13. Raw transfer complete at 6:50pm 5th September 2007.
  14. To complete: neater classification of the new entries.

RSS implemented on mungenetengine

Thanks for the morning diversion, Chris. The RSS 0.92 Feed feed is now correct.

One of the pleasures of all this travel for Adobe is being able to visit my favourite place in the world – west coast of the North Island of New Zealand. At the beginning of the current roadshow, I took Jane Brady and Tim Cole to Piha and Kare Kare: Tim Cole, Jane Brady and Nick Hodge in New Zealand

Coldfusion, SOAP

90% completed a Visual Basic frontend to the mungenetengine. This should make it easier to update and edit some of the content on the site, with resorting to copy and paste. The original interface is a forms/web based thing.

Strange days. Had an email from a Dreamweaver/Coldfusion MX user saying that the Random Neil Finn Lyric Server was the first successful SOAPweb service he could connect to. Nothing like helping the competition!

mungenetengine

GoLive 6: Adobe’s Open Source Embrace. A good read if you are into databases, PHP, GoLive et al.

As as 1.30pm, the Random Neil Finn Lyric Server has served 1000 lyrics!

OK, so I felt guilty. Spent some time creating table versions of the templates for those few people who are stuck in the late 1990s with Netscape 4.x and similar. The css is also customised slightly, too. mungenetengine will dynamically determine the browser you are using, and serve up the same content, just slightly modified depending on your browser.

mungenetengine

At 8.30am today, mungenetengine had served 10000 unique page views to 1829 unique viewers.

Earlier today I had an idea of a web service that I could implement here. To the right is from this web service on mungenet – the Random Neil Finn Lyric Server. This is implemented as a SOAP service installed on my host, backended by a MySQL database. Including the interface to the database and the SOAP service, it took about 4 hours to complete.

Lynn Grillo on Creating HTML emails with GoLive

I’ve just tried to load mungenet in Netscape 4.7 and realised its very broken. I’ll have to look into how to fix this on the server side. The good news is that things are still cool with the newly released preview of Netscape 7. It looks like we’re back into web browser version number wars.

note to self: WSDL is easy, as long as you name things intelligently and match the code and parameter’s naming conventions

SOAP

I can insert SOAP content into the HTML stream. This is the mechanism I am going to use to do cross mungenetengine content replication.

Well, after using a SOAP client/server combination in the mungenetengine, I can call the external server asking for a content fragment and insert it into this site. Done. Duration 45 minutes. SOAP (ref: SOAP Spec); is a W3C protocol for client-server communications using XML as the payload format and HTTP as the transport.

The key point is that I can place content in one place (externally, for public view) and have the internal site seem like its ‘replicating’ the content. The way it works is to call a SOAP object requesting a particular mcid from a server; this is inserted this into the client’s HTML stream.

InDesign at ACP

For those interested in InDesign. The ‘engineer’ mentioned is, err, me.

How the mungenetengine works is a quickie description of what is going on behind the scenes.

There’s another rewrite in my head. In my features database, there are 21 to-dos. So many ideas, so little time. The more I think about mungenetengine, I realise that there is a better way. At the moment, the render engine is tied up in one object- not the best way to create a OO application.

When you ‘write’ your own application, and run it live, its easy to see how difficult it is to create large applications like Photoshop or InDesign. Let alone an operating system…

mungenetengine

Welcome to Mungenet 6.

This one is a little different to the previous versions – the page fragments are stored in a MySQL database and dynamically created using a 1000-line PHP opus called the mungenetengine. The structure of the site is also stored in the database, too. This permits the navigation to be dynamically generated. Links to external sites (or static files on this server) are stored, too. One change will results in easier management. Also stored in the database are any binary files: images, PDFs and ZIP files.

Why dynamically build this site? It makes it much easier to add elements on the fly, without having to change and upload many static files – which is especially the case with navigation elements. Normally, if you add another sibling page (a page in a directory that is related to the other pages) – you have to update all pages in that directory to reflect the new entry. I believe that navigation gives you, the user of this site, context. So keeping this syncronised is important.