[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
basemap loaded + displayed
All --
Hit some serious issues today actually displaying the entire basemap +
route maps, mostly derived from Java serialization issues. I've attached
an image of the basemap loaded and displayed in a java applet after being
recursively obtained over RMI - basic b&w for now, will look pretty soon
(I promise). This at least shows you what the contours look like.
Java RMI note: it turns out that when Java serializes objects, every
non-transient field of the serialized object is *also* serialized. If a
Space is serialized, and it has a set of Portals ... which each have a
pair of Spaces ... which each have a set of Portals ... well, serializing
a single object requires that the entire graph state be serialized, which
is bad. This didn't show up for a single loaded building, or even a large
number of unconnected buildings (remember - the entire connected graph
only gets serialized, not the entire thing). Java has a hard cap of 15MB
of serializable state over RMI, causing horrible EOF errors if you try to
send a huge object over RMI.
Lesson learned: use the transient keyword early and often when writing
Java RMI code.
--
* * *
Patrick James Nichols II
Graduate Student, MIT Computer Graphics Group
http://graphics.csail.mit.edu/~pnichols