[Openstreetmap] pop goes the segment
Lars Aronsson
lars at aronsson.se
Mon Dec 5 10:14:22 GMT 2005
nick at hogweed.org wrote:
> I've noticed something similar.... I'm uploading segments (or
> rather changing their tags) using osm-editor and sometimes I
> don't get a response to the API call (which causes osmeditor to
> hang... part of a major overhaul will be better error
> checking...). I guess it must be a database issue.
In sufficiently complex software systems, I've found
subject-oriented (rather than object-oriented) programming to be
of great value. If you're a client programmer, make your client
act like a subject, speaking error messages in terms of "I" and
"me", trying to cover its own ass, putting blame on other parts of
the system. For example: "At 10:57:05 I, the editor client, sent
this call to the server and at 10:57:35 (30 seconds later), that
stupid server still hasn't responded." Then it is up to the
server to cover its own reputation by providing an even more
detailed log of who's to blame. It's a code war, your program
against mine shooting blame on each other. Of course the programs
should not log everything they do. This should only happen when
there is a chance that someone will try to put blame on them, e.g.
when responses aren't issued within a reasonable time after a
request.
The server apparently can keep count of how many requests it
receives and what the average response time is. What if there was
an API call to query this information. The Java applet could
display these numbers next to the tool bar. On
http://runeberg.org/rc.pl I display the unix server's uptime and
load average at the top of the page.
--
Lars Aronsson (lars at aronsson.se)
Aronsson Datateknik - http://aronsson.se
More information about the talk
mailing list