Python Programming, news on the Voidspace Python Projects and all things techie.

Amazon Simple DB with IronPython and Resolver One (plus Other News)

emoticon:contour Giles Thomas, the CEO & CTO (or 'dear leader' as he likes to be called) of Resolver Systems has put together some tutorials on using Amazon SimpleDB with IronPython and Resolver One:

Amazon SimpleDB is a cut-down database system, and as such it structures data quite differently to a normal relational database - in a manner that is actually quite similar to a spreadsheet. Each database is structured into "domains", which can be regarded as similar to worksheets. A query to the database can only access a single domain (unlike relational database queries, which can "join" multiple tables). However, the domain is quite freely structured. It is made up on a number of items (which you can see as being similar to rows in the worksheet), each item having a number of attributes (which you can see as being similar to columns). There is no requirement for each row to have the same set of attributes - in relational database terms, it is highly denormalised.

The examples use the Amazon SimpleDB C# Library.

The first Resolver One screencast has now gone up on Showmedo:

We've scheduled time in the next couple of iterations for a series of short screencasts showing how to use some of the best features of Resolver One. Hopefully these will all appear on Showmedo as well.

At Resolver Systems we are in 'code freeze' for the release of Resolver One 1.1. Some of the features I mentioned in my last blog entry aren't quite ready yet, but there are some good features in the list. There will be an announcement soon on the Resolver Systems News Blog.

The IronPython team have also announced that they are aiming to do an updated release of IronPython 1 (which is still the stable version); the new version will be 1.1.2. This should include some good bugfixes and performance enhancements [1], including finally fixing the Python socket problems that have plagued those trying to use urllib and urllib2 from IronPython. The new version of IronPython is scheduled for June, which will probably make IronPython 1.1.2 just in time to include in Resolver One 1.1.1. Surprised

I've just discussed chapter ten of IronPython in Action with my editor at Manning. Just a few minor changes (which is a relief). While I do those he is going to be working on getting some more chapters ready for the early access program. With a bit of luck I'll get the edits to chapter ten done quickly enough to include that as well, meaning that the following chapters will be added to IronPython Early Access Program shortly:

  • Chapter 9, IronPython and Windows Presentation Foundation
  • Chapter 10, System Administration with IronPython (on shell scripting and IronPython integration with Powershell and Windows Management Instrumentation)
  • Chapter 11, IronPython and ASP.NET (written by Christian Muirhead)

It's been a while since new chapters have been added, so this is good news!

Tomorrow I'm off to Developer Day Ireland. This is a .NET community event where I'll be talking about Dynamic Languages on .NET and several good friends from the UK (and Europe) .NET community will be there. I'm particularly looking forward to a talk on Functional Programming with C# 3 & 3.5 by Oliver Sturm. The conference is in Galway, and organised by the irrepressible Mick Lohan. On Sunday Mick is taking us on a trip to Craggy Ireland to enjoy the Irish scenery and hospitality.

In the meantime lots of other things are going on.

The LAST planned alpha releases of Python 2.6 and 3.0 are scheduled for next Wednesday, 07-May-2008. There are still several issues marked as Showstoppers

In November 2006 Guido announced what he had been working on - a code review tool for Google called Mondrian. He had hoped that they could Open Source it, but it is so widely used within Google now that it is too closely tied to Google's internal tools to disentangle it.

He has just announced on Python-Dev 'the next best thing':

a code review tool for use with Subversion, inspired by Mondrian and (soon to be) released as open source. Some of the code is even directly derived from Mondrian. Most of the code is new though, written using Django and running on Google App Engine.

He is inviting the Python developer community to try out the tool on the web for code reviews. To try it out, go to:

TechCrunch have also made an announcement (to be taken with the usual healthy dose of salt): that Twitter is migrating away from Rails to solve scaling problems - probably to Java or PHP.

Python has won the Linux Journal reader's 'Favorite Scripting Language 2008' award. Scripting language is not a term that Pythonistas are fond of, and there is an interesting discussion of this on the results page: Linux Journal: Readers' Choice Awards 2008.

The last piece of news is about PyPy. Yesterday an important milestone was reached, PyPy runs the pystone benchmark faster than CPython! And this is without the use of the JIT! Pystone is a crappy benchmark [2], but it is another step closer to PyPy being a useful implementation of Python. Armin should be blogging about this soon, I hope I'm not stealing his thunder but I did hold off for a whole day before this blog entry! Congratulations to all the PyPy team.

[1]Srivatsn, on the dynamic languages testing team, has just twittered that they have also implemented the _winreg module for IronPython and he has added it to the list of things to go into 1.1.2 (which is no guarantee it will make it, but means it stands a good chance).
[2]Of course all benchmarks are misleading, just as all generalisations are wrong.

Resolver One and IronPython in Action Progress

emoticon:mobile_world During conference season I fell behind schedule with writing IronPython in Action, so I've taken some time off work. I've just completed the first draft of "System Administration with IronPython" chapter, with only three more chapters to go. Christian is making good progress on the "Databases and Web Services" chapter, so the book actually might be finished soon...

The system administration chapter was good fun. It covers shell scripting with IronPython, WMI and Powershell. Writing about WMI and Powershell involved a lot of learning. From research to completion of first draft took basically a full week of solid work.

Despite the oddness, WMI turns out to be useful for lots of things. Here's one example (for the rest you'll have to buy the book of course...), listing all the processes that run on startup:

>>> import clr
>>> clr.AddReference('System.Management')
>>> from System.Management import ManagementClass
>>> StartupClass = ManagementClass('Win32_StartupCommand')
>>> processes = StartupClass.GetInstances()
>>> for p in processes:
...     print p['Location'], p['Caption'], p['Command']

Powershell is an odd language (dynamic scoping anyone?). I've covered embedding Powershell in IronPython and vice-versa. My favourite example in the Powershell section is calling into arbitrary Python code and returning results, with IP 2. This means that you can use Python libraries from Powershell. A combination of the IP 2 hosting API and Powershell oddities (calling generic methods from Powershell hurts) means the code isn't pretty, but the unprettiness is abstracted away of course. Smile

There are two implementations of Powershell in progress for Mono. Pash (Powershell + bash) is already under way which isn't officially part of the Mono Project. An 'official' Mono port called Monoshell doesn't exist yet, but has been accepted as a google summer of code project.

Whilst I've been writing, the Resolver guys have been hard at work. It's been a while since the 1.0.1 release and we're now working towards a 1.1 release (although there may or may not be a 1.0.2 in between). We're attacking Resolver One development on three fronts:

  • Improving and extending the integration of Resolver One and Bloomberg and Thomsons' live market data feeds, for the financial users of Resolver One
  • Adding features requested by Zeliade Systems for the Resolver One Quant Package
  • Adding more features to make Resolver One a better platform for building spreadsheet based applications

The last two of these include things like providing a better code editing experience in Resolver One, more 'standard' spreadsheet features, and also improving performance and memory use. We're currently working on some optimisations which improve general recalc performance by 15-30% (we're already on a 15% improvement and there is more to come), which is great. Smile

As well as the optimisations, new features currently being worked on include custom cell formatters (user defined functions for formatting objects in cells) and comments attached to cells.

Other random trivia:

  • Preparations for PyCon UK 2008 have started in earnest and the first post is up on the PyCon UK Blog.

  • Microsoft has a new project: Live Mesh which aims to sync data, applications and devices. As usual with new Microsoft technologies, IronPython featured in the demo (about halfway through the The Mesh Video Tour).

  • Charles Nutter has a very interesting article on the many different implementations of Ruby that are up, and spring up: Promise and Peril for Alternative Ruby Impls. Other than wrongly stating that IronRuby was the first project to be licensed under the Microsoft Open Source License, it is a good read.

    Interesting to see that some of Ruby community are still sceptical that Microsoft will ever 'allow' Rails to run on .NET. This is despite the fact that Microsoft (well, Jim and Dino anyway) demoed the equally capable web framework Django running on IronPython...

Like this post? Digg it or it.

Posted by Fuzzyman on 2008-04-28 14:53:52 | |

Categories: , , Tags: , , ,

Most Popular Blog Entries

emoticon:bluetooth Feedburner allows me to monitor my RSS feed and see how many people are clicking through from my blog entry summaries to read the full entry [1]. Feedburner reports that I have a current average of about 830 subscribers. I have no idea whether this reflects the extent of my readership, as I've always assumed that the majority of the people who read this blog through Planet Python [2].

I can track the number of people who click through from each item, which does show the number of people who are interested enough in the title / summary to read the full entry. Here's a list of the most popular entries (everything with more than 500 clicks). It isn't completely representative as I only switched my feed fully over to Feedburner in December 2007, and I sometimes have several entries on the same page - so people can click through to one and then read several. Still, I find it interesting. Wink

As this list in some way reflects the interests of the Python community [3], it's nice to see some IronPython and Resolver related entries amongst the popular ones. Smile

Also interesting that the most popular entry is the recent (controversial) one I wrote on testing...

[1]I realise that many people would prefer a full feed rather than a partial feed. That would mean hacking on my Desktop Blog Client Tool: Firedrop2. I really like this program and am not willing to switch away - at some point I will experiment with enabling full feeds, but not yet.
[2]Or the Unofficial Planet Python.
[3]Or the part of the Python community that reads Planet Python anyway, which almost certainly doesn't include the 'silent majority' of Python users and programmers.

Like this post? Digg it or it.

Posted by Fuzzyman on 2008-04-26 14:27:27 | |

Categories: , , Tags: ,

Hosted by Webfaction