Tuesday, February 20, 2007
Came across a short piece I wrote about IronPython while looking for something else - it was in response to some questions from Kathleen Richards in September of last year for Redmond Developer News (which I think was for this Article, though none of the content made it in - cest la vie).

At any rate, I figure I might as well post it here, it may be of use to someone... somewhere... who could say?  Looking over it briefly I'm not even sure I agree with some of the points I made any more :P


IronPython Article


How are you using IronPython?

At Syzmk (http://www.syzmk.com/) we are using IronPython as a rich embedded scripting language within our core product, we expose a large part of the .Net server engine (written in C#) to the IronPython runtime, and offer key extension points which can be hooked into with python code – we chose python because the language is rich, dynamic and doesn’t suffer from the verbosity that most of the compiled languages do.   At the moment we are moving beyond using IronPython as just an embedded scripting language and are evaluating how best to implement a number of domain specific languages in it for our server, firstly around the business rules and behavior of our application’s core logic, and secondly for performance and diagnostic evaluation and control of the underlying server platform.

Why did you choose this implementation over C python or Jython or other dynamic languages?

IronPython was attractive because of its first class support for .Net types and especially its excellent support for delegates (and because there wasn’t any marshalling) – we were attracted to the python syntax and language structure, more than support for the standard python libraries, so the compatibility sacrifices that were apparent with many C Python libraries, especially during the beta, were of little consequence to us, especially as IronPython has full access to the base class libraries (BCL).

What types of applications are you building?

The core application we have used IronPython for is a server technology, the “Rich Media Processor” (working title) – it’s in production, but has only been going to market for the last 6 months.   Effectively you can place it into an organization as a front end processor for rich and largely unstructured messages (think Audio, Video, Email, SMS and MMS messages from phones, images dumped from digital cameras, security camera feeds etc) with the end result being a structured and conforming set of messages and rich content (appropriately formatted images, videos, audio etc) suitable for passing onto line of business systems, or a product like biz talk.

When dealing with transforming this kind of content, python (and IronPython) is a great language to augment the message transformation process – strong string support, access to all the functionality of our underlying application and it’s easy to develop and deploy – IronPython never seems to be working against us, I could never claim the same for any scripting language I’ve implemented into a product before.

Does the .NET environment offer any advantages?

Yes, I think it offers serious advantages for Python (access to the BCL!), developers and customers.

First off the business case for building .Net applications is immediate within our home country of New Zealand, customers are generally expecting to host Microsoft tools and solutions, and our IT industry is geared towards this expectation, there is an implied trust which is worth taking advantage of.

Business cases aside however I think the .Net platform is very engaging for us, our company has a love for technology, and in the last few years the .Net platform has been satisfying that need very well - it offers stability, security and productivity increases that we can’t find elsewhere (and certainly not in an unmanaged language), also the language-agnostic approach and ability to build dynamic languages (like IronPython) in the CLR make the choice all that simpler.

Disadvantages?

We haven’t really discovered any disadvantages with .Net or our approach, IronPython does everything we need and then some, as does the .Net platform – however I think it might be some time yet before dynamic languages on the CLR (or any language other then VB.Net or C#) will be acceptable recommendations from the consulting masses – perhaps more a reflection on the lack of education and published case studies I think.

For instance we already have languages competing with C# on the .Net platform, such as Boo (http://en.wikipedia.org/wiki/Boo_programming_language), which offer some advantages over the current version of C# and are very suitable for building domain specific languages (DSL’s) – but I believe in many bespoke development houses it would be very hard to get buy-in for using these languages in upcoming projects, even if they will save time and money or just be a better fit for their problems.

Do you think dynamic, object oriented (scripting) languages (Ruby, Python) will start to play a larger role in enterprise development?  

I think the short answer is yes, the languages are often just a catalyst for methodologies and practices (such as functional programming, or the ruby on rails web development approach) – the elegance, simplicity and speed at which dynamic language guru’s can deliver results is enviable for a lot of us who have cut our teeth on C++ & Java and known the other end of the spectrum.

If I am in a corporate environment should I be looking into these languages?

I think at this point it should not be on the top of your list – if you’re a Microsoft shop, or in an environment dedicated to employing solutions on top of Microsoft technologies then .Net 3.0 should be your key focus - however I think it’s certainly worth having a few dynamic language books at your disposal (perhaps on the bedside table), they make for compelling reading, and will get your initial buy-in, so you feel comfortable considering a dynamic language on the .Net platform as a good idea.

That said, if you’re not a Microsoft shop, and particularly if you are committed to open-source technologies I would look seriously, probably first at Ruby, it’s very engaging story – though of course you can run IronPython on Mono with a little bit of tweaking  … and IronRuby is getting better every day.

What are some of the key issues from an application development standpoint?

I can only talk from the perspective of deploying IronPython as a scripting engine, hosted within another application, though some of these points will probably apply elsewhere, I think it all comes down to one thing -  being prepared.

First off, you must change your point of view and adapt some of your practices, as they will confound you with the introduction of a scripting language that has access to your own .Net classes.  As you develop classes, try them on for size and make sure the selected scripting language doesn’t have trouble accessing them – for instance heavily overloaded .Net methods in IronPython can be a recipe for frustration later on, same goes with using multiple out or ref parameters – that’s not to say IronPython can’t access them, just that it’s awkward and unpleasant (something your scripting language should not be).

Second to this is security – dynamic languages effectively introduce a surface area to your application that didn’t exist before – our server allows configuration (including iron python scripts) to be applied via a web service – you want to make absolutely sure there is sufficient trust between endpoints, and don’t repeat mistakes of the past with other scripting languages (think injection attacks).

posted @ Tuesday, February 20, 2007 8:56:47 AM (New Zealand Daylight Time, UTC+13:00)    Comments [0] | Trackback |
 Wednesday, September 27, 2006

Over the past couple of days I've been working on using DirectShow and DES (DirectShow Editing Services) for re-encoding mobile video content suitable for posting on the web... With the goal of including video editing into our unified "media engine" which the Syzmk line of products makes use of... as an off-shoot of that work I decided to refactor the rather ugly code we had for working with DES over the weekend into something a little less ugly, that hid most of the details away, say hello to:



(sorry, couldn't resist the lame web 2.0 logo ;o)

A simple little library for doing most of the useful things in DES, the project is hosted here up on Codeplex.  It's currently in an alpha state, at version 0.9.0.0 - and should get feature drops every week or so until I think it can go into beta.

To give an idea of what I'm up to, it's basically just wrapping up the various DES components and removing alot of the unpleasantness (ie. you get to deal with human-friendly units of time like seconds) .. and seperating the concerns of the timeline, and rendering that timeline into something useful like audio or video container (currently that's just WAV, AVI & Windows Media formats).  It's fully functional, but the interfaces at this point it isn't very stable as I'm likely to refactor the various interfaces mercilessly till I get it working how I want, so if you build something with the library now, it's likely to break in the future (but probably not in major way, it is after all mirroring the functionality available in DES).   The added bonus of developing a set of rich wrappers for a lot of this stuff is that I can mock away the requirement on DES altogether, which is always a bonus considering how long the units tests currently take to run for the Syzmk RMP product.

When I get a chance, I'll put up some code examples to demonstrate how you might use it... At any rate it'll be going through some dog fooding in the next month or so while I integrate it with the Syzmk product, so you'll probably here a little more about in the future.
posted @ Wednesday, September 27, 2006 12:40:51 AM (New Zealand Daylight Time, UTC+13:00)    Comments [0] | Trackback |

After a long hiatus from Blogging, I've returned... hopefully with a vengence, but more likely with a small "vurrrrp" sound... like hot air bubbling up through porridge.

Lets start off with a recap... Spectacles, testacles, wallet and all that jazz.

My name is Alex Henderson, 26 years young, living in Auckland, New Zealand.  I've been working on code since I was knee high, cut my teeth in GW Basic while in primary school, and C++ a few years after that... Now days I tend to spend my hours working in C# code, and my spare time in either .Net and ruby or python when I feel like a change.

For the last year and a half I've been working for a start up company called Seismic Technologies which works in a rather ill-defined space, which I'll probably talk about in posts to come.

The main product I've been working on for Syzmk is the "Rich Media Processor" - it's a message clearing house, geared towards taking messages with rich content, transforming them, and then distributing them... The messages might be files on a network share, emails, SMS or MMS messages from a phone etc.  It's all about rich content, so a large part of the product deals with transforming the content before furnishing it to line of business systems - we have been working with companies like XSOL who use our product to use messages from mobile devices to extend their business processes outside of the host organisation.

Before I was working for the Seismic, I was travelling around Asia for 4 months... which was a lot of fun, I hope to visit europe next... Then maybe Japan, Egypt and South America.
posted @ Tuesday, September 26, 2006 11:21:36 PM (New Zealand Daylight Time, UTC+13:00)    Comments [0] | Trackback |
 Wednesday, April 05, 2006

With the first release of our COM interop SDK for the Syzmk Rich Media Processor (yes, we have clients who want to integrate with the Rich Media Processor from legacy apps) suite coming out last week, I felt it necessary to put some documentation together... internally we've been using FlexWiki sporadically to document what's happening development-wise, iteration feature sets etc. So It made sense to release our documentation on the platform, and offer our clients that ability to augment the documentation where appropriate.

Mixed Reactions

Wiki's get mixed reactions from a lot of developers - some love them, others loathe them. I think it's generally related to two problems:

  • Lack of refactoring
  • Ignoring beautification

A wiki is a living document, its structure should develop in-line with your understanding on the topics - this includes revisiting old topics, pulling content and moving it into new topics etc. If it attempts to document a product then it must be aligned with releases, otherwise you will forever be chasing your tale... If you can't get commitment to this time allocation from management, just don't even bother.

Stale documentation is often worse then no documentation.

Second to that, if the wiki is clunky, poorly formatted, disorganised and generally lacking in beauty... Then it's not a compelling resource for consumers - getting a wiki clean, well organised and aligned with the rest of your web branding seems to go a long way towards encouraging use.

Goodbye FlexWiki

We've been using FlexWiki partly through a loyalty to the .Net platform (http://www.flexwiki.com/) and because internally it's what we feel most comfortable with when it comes to have to modify or extend products but the project has stalled for now and just doesn't reach our needs for a commercially capable collaboration tool... (for instance it doesn't support attachments) ... so I decided to go find a new wiki... of which there are many... to many you might say!

WikiMatrix to the rescue

At which point I discovered wikimatrix: http://www.wikimatrix.org/ - What a great little site! Especially there new Wiki Choice Wizard.. In about 5 minutes I managed to narrow down what I was looking for, and eventually selected TWiki (http://www.twiki.org/) as our prime candidate (Confluence also looked very good, but the entry cost didn't seem justifiable at this point).

Hello TWiki


TWiki does have some pitfalls for a Microsoft-focused house, mainly that hosting it on windows is possible but going to cause tears before bed time... luckily they have a debian vmware installation... so we have avoided all the grief involved with windows, and gained a tasty performance bonus over running it on windows (Because the project would have required the cygwin tools & apache for windows... not necessarily a high-performance combination)

The second best thing since sliced bread

VMWare server being free has to be probably the best thing since sliced bread (Though I guess unbundling supersedes that for most IT people in NZ of late) - as we're seeing a host of Linux based products being released as pre-configured VM's - suitable as drop in "software appliances" - with a lot less support problems then the normal process of installing Linux onto a virtual machine and setting up the software itself... and Often the memory foot print of the Linux distro + product is half that of an empty windows 2003 standard install, before you've deployed any applications onto it.

So within 15 minutes I had downloaded the 220mb virtual image, booted it up and started editing wiki documents... It's not all quite that easy though, you still need to get your hands dirty doing a little shell based configuration if you want to securely host it on the web - but it's all pretty painless especially if youve dabbled with Linux in the past.

As for TWiki itself - so far it seems very very good, my only dislike is some of the wiki-text conventions it uses, such as the elaborate header mark-up... though FlexWiki was no better - why they couldn't use the Confluence style mark-up of "h1. " through "h6." I'll never know still the wysiwyg editor takes away most of the mark-up pain for new users.

I've managed to avoid doing any Kriss Kross "wickety whack" references for the whole post too - be grateful ;o)

posted @ Tuesday, April 04, 2006 11:53:21 PM (New Zealand Standard Time, UTC+12:00)    Comments [0] | Trackback |
Search
FeedCount

Tags...
Who am I?
Alex Henderson
Alex Henderson
Auckland, New Zealand
Managing Director at Dev|Defined Limited

"Self Confessed Coding Junky for 15 years"
View Alex Henderson's profile on LinkedIn
 
Mobile: +64-21-402-969
Email: bittercoder 'at' gmail 'dot' com
MSN: bittercoder_nz@hotmail
Skype: alex.devdefined
Navigation