Changes Current users: guest (web) |
ReplicatedObjectClient interface. Once retrieved, replicas remain in a client-side cache, and the server will send Change messages to the client for the duration of the client's connection. This approach has been reasonable for many CORK applications, but wastes both memory and bandwidth for long-lived applications or applications that involve briefly accessing many objects (such as MOO-ish tools). A solution to this problem is also needed for server federation support (see Server federation), as caching servers will essentially act as long-lived clients. Finally, solving this problem will also allow us to re-design a more scalable indexing mechanism for search. (Since it is no longer practical for the indexer to hold all active objects in server-side memory.) At the level of the interations between client and server, an additional message will need to be added that allows the client to tell the server that it is no longer interested in being notified of changes to the object with a given ObjectID. The initiation of this messaging is somewhat less straightforward. Possible solutions include:
It does not appear that these two approaches conflict with each other, so it may be possible to do both. It probably makes more sense to do (2) first, since it will provide greater application control over release. Another hybrid approach would be to simply introduce a timer thread that would periodically release any objects that had been marked for release. This would introduce a window of time during which an object whose UI had been closed could be re-accessed without having to be re-retrieved. All (?) ComponentViews currently extend bridge.DefaultComponentView, which invokes startSharing in the load() method. It does not invoke stopSharing, pending fixes to ReplicationManager's reference-counting implementation. Once those issues have been fixed, there are at least two places where we might want to turn off sharing:
DefaultComponentView must make sure they call their superclass's method if they override one of these. In practice, subclasses will rarely override finalize(), but will almost always override deactivate().Timing is another issue: Releasing in deactivate will be immediate, while releasing in finalize will be delayed by an unknown time (and is, in fact, not garaunteed to happen at all). In the common case, the bandwidth and processing savings achieved by immediately releasing the object will make sense. In other applications, the user may be switching back and forth between objects, so delaying release will make more sense. Unfortunately this decision appears to be based on the nature of the application, and not on the nature of any individual component.Notes:
|
| /public/projects/bridge/design/Releasing client-side replicas | Login | Web Editor | Full Editor |
| Last modified 9/11/03 2:24 PM by isenhour (history) Site contents | |