Python Desktop Server Weblog 2003/7

a picture of myself

Münsterland.org

2003-07-17

Windows Binary Installer available

Louis Feges has done a binary installer for windows. It installes all needed parts, so you should be able to get the Python Desktop Server up and running much easier than before! Big thanks to Louis!

Additionally he is working on a users guide for the Python Desktop Server, so if you have input, send it to him, so he can put it in!

posted at 00:19:44    #
 
2003-07-11

Bandwidth-saving tip of the day [dive into mark]

The new Version 0.6.0 will include support for Content-encoding: gzip in the Python Desktop Server. The source is already in CVS, so if you want to help save bandwidth now, upgrade to the latest CVS version.

gzip support was actually on the todo for quite some time now, but I just pushed it off for quite some time now. How the Python Desktop Server implements it is that it stores the Content-encoding: header with every file in it's download cache and if you use the downstream.download() method, you will get transparently decoded stuff (so the file isn't only pulled down compressed to save bandwidth, it's stored in the cache compressed to save disk space, too. Whew! Winky).

posted at 14:12:48    #
 
2003-07-08

On simplicity [dive into mark]

Marc Pilgrim has done a sample implementation of NEcho REST API call and XML-RPC API call (based on both the NEcho prototype and my prototype mapping), so you can compare how API calls look with both approaches. This shows that supporting XML-RPC at least as a minor protocol (that is derived from the REST stuff) is doable.
posted at 09:58:56    #
 
2003-07-03

pyds-0.5.2-1mdk.i586 RPM

Somebody made current RPMs for Mandrake.
posted at 21:44:00    #
 

XML-RPC vs. REST

There is some discussion over wether to support XML-RPC interfaces for the new Necho API, or to just provide REST as protocol. In the following I try to discuss those two options.

REST is - if you strip it of all it's hype - just passing XML snippets over HTTP. You use the standard HTTP commands, GET, POST, PUT and DELETE. You pass stuff and get stuff. Usually you get XML. Often you put XML, or post forms. Just the same as your browser does, only that the stuff is more formal.

XML-RPC on the other hand is a serialization/deserialization of datastructeres in your programs combined with a REST way of pushing that around (you actually POST the serialized method call and GET the serialized method response). Toolkits integrate this into your programming environment so that you often don't care wether some call is local or remote, it just works (by using some proxy object that handles the serialization/deserialization and POST/GET stuff).

So this actually shows a big difference: REST is just a barebones way to push stuff around. There is no notion on what you push around, it's just XML or form data. Serialization/deserialization is handled by the application itself for every flavor of stuff to push around. Often you just parse the XML into a DOM tree and work with that. To build some result you construct another DOM tree and send that as XML. This works very good if what your applications primary work is pushing around and processing information snippets and documents. It's not very good if your main work is doing interprocess communication or interhost communication in a more programmatic way.

XML-RPC on the other hand maps very good to those programmatic ways, but is a pain if you use it to push around documents. The reason is, you either push the documents around as a serialized string, or you do conversions on the document to translate them into data structures and pass those around. The latter works quite nice if your structures are more or less fixed, but is hairy at best if your structures are bound to change frequently.

So what about blogging APIs? I think they will have to be quite fixed in their structure. Ok, there will be extensions, but the core data (that is stored in databases in many tools) needs to be fixed at least to some extent. So here we are on a border between both areas.

People who like to work with the information and enricht/extract information in a more general way - for example for knowledge engineering stuff - will prefer a more RESTian approach, as that will be much faster. They just need documents as a whole and will most surely use DOM parsers and stuff like XPath to access content.

But there are the oldfashioned application programmers. Those who build simple plain applications to just do one thing nicely: aggregate feeds, present them to users and allow blogging of the stuff. And there are blog software programmers with existing products that would like to enrich their application with a standard API. All those people will prefer a more programmatical approach, as that fits much better into their application. Using DOM trees and traversing full documents won't help them, as they actually will throw away much of the enriched stuff (except where the explicitly support it). This is fine, as they set total different goals for their software, their main focus is the blogging experience, not so much the knowledge engineering.

I think exactly this is a good reason to provide both in Necho. A RESTian API for full document working and XML-RPC API for more programmatic access. Both have their points for them.

I would like to see the REST API be the leading API, the primary API. Why? Because I am quite sure that sooner or later blogging applications will become much more than they are today. So the goal should be to pin down a good way to work with documents and information in a more abstract way, and REST is in my opinion much nicer.

But the XML-RPC API will allow people to implement stuff now and with their current tools. It won't be too much work for them, as they can build on existing stuff in their application. This will give Necho a much broader base in the blogging world, even if some of those people only use part of it's power. That's the reason why XML-RPC should be the minor protocol, somehow deduced from the full REST protocol.

How to do this? I think what is needed is a simple mapping that shows how to translate between a Necho entry and an internal data structure that can be passed by XML-RPC. And some minimal API to post, edit and delete entries in the database using XML-RPC. This will be enough to allow people to make use of Necho now.

The full power of Necho will only be unleashed when you use a more document centric approach of passing stuff around, but that doesn't say that we shouldn't give some gentle pushing to the spec!

posted at 20:04:48    #
July 2003
MoTuWeThFrSaSu
  1 2 3 4 5 6
7 8 910111213
14151617181920
21222324252627
28293031   
Jun
2003
 Aug
2003

This is the Python Desktop Server weblog.


(Donations will be used by the author to buy stuff, fullfill selfish wishes or do other silly recreational things. You have been warned.).
The PyDS is
OSI Certified Open Source Software

Python Powered

XML-Image

© 2003-2007, Georg Bauer