Archive for February, 2007

Python Web Framework pissing match

OK, I’ve seen a bit of a rise in pissing matches between Python web framework users in the last few weeks.

I like TurboGears, I’ve used it a lot, and I’ve done a lot of interesting things with it. But I don’t think it’s the framework to end all frameworks. And it certainly doesn’t get to be a better framework when users put down other frameworks or their leaders.

Even if it worked, I don’t want TuboGears to grow at the expense of others.

I happen to genuinely like many of the Django guys. I had lots of fun at the bar with Jacob last year at PyCon, and I respect what they are trying to do with Django — even if it’s not the way I would do it.

The world of Python and web frameworks is better because we have diversity, competition, and innovation.

But if that turns into backbiting, name-calling, and degenerates into some kind of perverse techno-tribalism, we’ll loose what is most important: the ability to see good solutions when they come up, and to cooperate and share with one another when that makes sense.

So, I say we say no to techno-tribalism, and try being nice to one another: Even when we disagree about important issues — no, better, especially when we disagree about important issues.

JSON Performance

Sometimes when you do web service type things you have to pass around large data sets, and sometimes performance matters.

We have to interface with a bunch of different kinds of web services, so we use JSON+Rest, SOAP, XML-RPC, or whatever we need to to get the job done.

For a lot of internal communication I am a fan of a simple REST+JSON style solution. But, what do the performance numbers look like when faced with huge datasets? I recently started looking into making some asynchronous calls return faster to eliminate the delay between when a user submits a large change, and when they get feedback about it.

Fortunately, I found a place where Jim Washington does the numbers. Generally like simplejson for encoding, because it’s easy to extend, and at 9.5x slower than cjson, it fast enough for most cases.

But decoding with cjson is a different story, there’s nearly a 40x performance difference between cjson and simplejson. And you can tell it to fall back to simple-json whenever it throws a DecodeError, so the case for cjson with a simplejson fallback is pretty easy to make.

If we can drop the processing time on some of transactions, the response will be much closer to the request, and the user won’t feel the “asynchronicity” of things as much.

Review of Rapid Web Applications with TurboGears

So, I was reading somebody’s blog, and went down a chain of links to find this review of my book.

It’s weird to wander across stuff about yourself on the internet. It’s like walking into a room full of people you don’t know, only to discover they are talking about you.

It’s not necessarily a bad feeling, but definitely a bit disorienting.

Anyway, the review is pretty positive, but it also highlights a couple of ways in which we could improve the book, and it provides a clear picture of what kind of readers will most benefit from reading it.

Because it gives a realistic picture of the pros and cons of the book, it looks like the best (as in most valuable to a potential reader) review I’ve seen on the web so far.

soaplib and TGwebservices

I posted about SOAP and XML-RPC stuff in TurboGears a couple months ago. Since then I’ve recieved a few dozen e-mails asking when the new SOAP libraries that I mentioned would be coming out. Well, the wait is over.

This afternoon Optio Software released, soaplib. And last friday Arbor Networks released TGWebServices.

What a difference a week makes. Last week we had ZSI, which worked for some cases, but was hard to use for others. Where I work we use a lot of web services.

While I like XML-RPC, or REST+JSON the simple fact of the matter is that there is lots of stuff in the world that is only exposed as SOAP, so if you want to play with that stuff you better learn how to talk SOAP.

It’s a bit like putting up with bitter cold winds on the local pond in order to learn how to play hockey. You don’t love the cold, but you do love the cool things that it lets you do. That’s how I feel about soaplib. It makes working with SOAP based web services less unpleasant — enough that it reminds me how cool the stuff we are actually doing is.

I’m looking forward to getting some more experience with TGWebServices. And I know that the two library authors are already talking about how to work together in the future — and from what I can see both libraries have stuff that would be useful to each other.

Pycon hits 500

According to the pycon website:

At Fri Feb 9 23:00:02 2007, there were 500 PyCon registrants.

I’m really looking forward to PyCon this year. It sounds like it will be a big year.

There are lots of interesting and helpful tracks, but I’m most excited about the stuff that will happen in the periferies, and the “open” spaces. There’s a lot of smart people who do interesting stuff everywhere. So it’s almost impossible to avoid having incredibly useful conversations.

  • I’d like to revisit last year’s Web Framework Developers dinner.
  • I’d like to talk to other people working with web services in Python.
  • And on a smaller level, I’d like to sit down with guys from the Pylons team and talk about how TurboGears and Pylons can work together more.

Speaking of last year’s web framework developers dinner, I think some good work has gone into shared components, and I’ll be very happy if that direction continues. The diversity in the Python web framework arena can be a strength for Python, but only if we work together where that makes sense, and created differences thoughtfully and intentionally.