Skip to content

Streaming downloads

October 21, 2009

I’ve not been very good at keeping this blog up-to-date. The last posting was about Potlatch 0.11. In the five months since then, we’ve moved onto 1.2c, with some pretty massive improvements: offline editing, POI icons, online help, one-way arrows, a fix for the infamous Linux Flash Player Unicode bug, photo-mapping, the ‘inspector’ panel, a roundabout button and a whole load else. (You can see the full list over at the changelog.) And then there’s Potlatch 2, but that’s a whole other story.

But sometimes things change under the surface, and today was one of those days.

Potlatch doesn’t talk XML like other OpenStreetMap applications; it uses an efficient Flash protocol called AMF (Action Message Format) instead. AMF has some very cool features, and one of these is that it can stream data.

So we’re now using this. When Potlatch previously asked for data from the OSM server, the server would assemble it into one big chunk before sending that back. Now, it sends each way back as it fetches it from the database. The same goes for uploads; the server now responds to each uploaded way in turn, rather than waiting until the last one is done.

Sadly Flash Player still waits until the download is complete before displaying the ways. (It would be much cooler if ways were displayed one-by-one.) But there are still a couple of advantages.

Firstly, uploads in particular should be less likely to hang if there’s a regular flow of information back. Secondly, the server needs to keep less information in memory at any one time – quite a lot less if you’ve asked for a densely-mapped city at zoom level 14. This is a Good Thing for everyone as it makes the server faster.


From → development

  1. I am new to OSM and want to try potlatch but cannot find a download site – maybe I’m just stupid.

    Can you let me know a download site


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: