[OSM-dev] The future of Potlatch

Richard Fairhurst richard at systemeD.net
Fri May 2 15:37:57 BST 2008


Thanks for some really helpful and interesting responses. (Thanks  
especially to Tom C for a very valuable perspective.)


-- API

The API has come up a lot. I've said before and will happily restate  
now that I think it would be great to get Potlatch talking Rails on  
the serverside, rather than the SQL at present. It wouldn't affect  
the Potlatch user experience (which is my primary concern), but would  
mean more peace-of-mind for Tom H, Steve et al; its benefits could be  
open to other editors; and it'd remove a major stumbling block when  
talking about Potlatch, which would be helpful.

I don't have any emotional attachment to the code there at the moment  
- it's simply like that because it was actually developed before OSM  
moved to Rails (the pre-Rails API was a lot less sophisticated than  
the current one and really couldn't do what Potlatch needed), and  
rewriting it in Rails is something I'm not really qualified to do  
safely without breaking lots of stuff. One can always learn, and  
given unlimited time I'd like to; but sadly I don't currently have  
the time to learn AS3, _and_ Rails, _and_ respond to people's  
requests for Potlatch... oh, and do the day job! So given that the  
serverside code works, albeit inelegantly, learning to rewrite it  
hasn't been my priority.

I'm very happy, of course, to spend as much time as necessary talking  
others through how it currently works should they be kind enough to  
take on the task of rewriting it - I've already documented a bunch of  
it for Steve. I'm pretty sure that'd be more efficient than me  
blundering in and writing some very bad Rails code.

There are really only two provisos to this and neither's a big one, I  
think. I do feel fairly strongly that Potlatch, as currently written,  
and the API should continue to talk AMF to each other rather than  
XML; it keeps the code compact and fast, especially given that AS1  
doesn't have great XML handling. But that's just a transport format,  
really, just 50 or so lines of (pretty reliable and fast) code.

The other one is that it would be good if the getway call, in  
particular, could exist in _both_ SQL and Rails forms in the code,  
with a switch called RICHARD_NOT_HIT_BY_BUS_YET to determine which  
one is called. Up until the time of the bus incident we could use the  
(very, very simple, read-only) single SQL call because it's between  
two and four times faster, and this is the one call that does have a  
significant performance impact on Potlatch. After I'm run over, you  
could switch to Rails, which means a performance hit but may be  
considered more maintainable. Please don't treat this as an  
invitation to drive a bus at me.

Pretty much everything I'd want to say on this has already been  
expressed by TomH:
http://lists.openstreetmap.org/pipermail/talk/2008-May/025886.html
http://lists.openstreetmap.org/pipermail/talk/2008-May/025889.html


-- Frederik's uniqueness point

Really can't argue with that. Going back to the Java applet days I  
did actually want both it and Potlatch to be available at the same  
time (http://wiki.openstreetmap.org/index.php/ 
Talk:Java_Applet_Development); unfortunately this never happened. But  
as long as the choice is presented through a friendly UI and doesn't  
confuse novices, it's a good principle.

On the openness (or otherwise) of Potlatch, Frederik, I think I  
mentioned to you in the internationalisation discussion that I'm  
planning to build a preset tagging system that will let people  
contribute their own plug-in tagging panels. Otherwise Potlatch's  
only impact on mapping practices has probably been to hasten the  
demise of segments which I suspect you agreed with!


-- AS1 / AS3

Dave - I think your definition of donkey balls might be different to  
mine. ;) Or rather, when you've been sucking horse balls for several  
years then donkey balls don't seem very different.

Er, I should probably rephrase that.

To me (coming from a Perl script kiddie background, rather than  
Proper Programming In Java) AS1 is the nice approachable stuff while  
AS3 is scary with lots of stuff you have to write that doesn't  
actually do anything. I'm not holding that up as a truth, I don't  
doubt that AS3's objectively the better language by current norms:  
it's just that it's an utterly new way of doing things for me, and I  
can't immediately see the payback for me in spending a long while  
learning it, then rewriting all 7,000 lines of code. AS3 doesn't yet  
_do_ much that AS1 doesn't: some clever typography stuff (not needed  
for Potlatch), faster (but Potlatch's UI is plenty fast, it's the  
server responses that slow the UI), and better XML handling (but as  
written Potlatch doesn't need that). And it doesn't make me more  
marketable as a programmer because I'm not a professional programmer.

Now this is my problem, of course, not something anyone else needs to  
worry about. But it's the thing that I'm still most unsure how to  
answer. I'm a bit more sure than the other day, though, so thanks,  
all, for that. :)

(Incidentally, I'm talking to Steve, I didn't think there was much  
point in doing a point-by-point slanging match on the list.)

cheers
Richard




More information about the dev mailing list