Control and Data Flow
Your application requests a map from GeoBase.
GeoBase detects you are running in GeoStream mode and creates a GeoStream version of the Map object.
The area of the map to be fetched is divided up into a rectangular grid of tiles.
For each tile, GeoStream determines if the tile is in its memory or disk caches.
If the tile is already in the cache, GeoStream gets the tile from the cache and draws it on the map.
If the tile is not already in the cache, GeoStream adds it to the queue of tiles to be fetched from the server.
Several threads run in the background, fetching tiles from the GeoStream server.
Whenever a new tile arrives from the server, the tile is added to the memory and disk caches. If the tile is part of a map you have requested, it is added to the map or your application is notified the map has been updated, as appropriate (depending if you are using synchronous or asynchronous methods to fetch the map).
Your application creates a new Route object. GeoBase detects you are running GeoStream and creates a GeoStream version of the Route object.
Your application sets start and end points, and a series of intermediate stops for the Route. GeoStream records these internally.
Your application asks for the route to be optimized. GeoStream records the request.
Your application asks for directions for the Route. GeoStream sends off a request to the GeoStream server, creating the route, adding the stops, optimizing the route, and finally returning the optimized route. Total round trips: 1.
Your application changes some of the intermediate stops and calls GetDirections() again. GeoStream sends off a request to update the existing route, and return the directions for the updated route, and returns these to your application. Total round trips: 1.
Below is a visual representation of how GeoStream works.