Re: [Fresco-devel] kit destruction not informing the server?
Stefan Seefeld <[email protected]>
| Newsgroups | gmane.comp.video.fresco.devel |
|---|---|
| Message-ID | <[email protected]> |
Nick Lewycky wrote: > Over IRC, Tobias and I hashed out a couple of ideas. The "obvious" > quick-fix, to increment the Kit an extra time on construction introduces > a bad bug: the exit button doesn't work in the demo. that is close to the mark. The problem is indeed that the ownership semantics of kits is badly defined. At startup, the server instantiates one kit per type (plugin), which then serves as prototype (in the pattern sense). That's very useful as we can use the CORBA type system to figure out whether a given kit supports a specific interface or not (conceptually similar to C++'s RTTI). When a client shows up (in terms of a ServerContext object) and asks for a new kit, the appropriate prototype is cloned. If the same client asks for the same type of kit twice, it gets the same kit, so we use ref counting. It *should* work, but somewhere in that design is a logical error. You tell me where ;-) Btw., the ServerContext is not a singleton. The server instantiates one ServerContext per client, so it can do all the authentication and security checks for it, and then deals with the bookkeeping for the objects that are created on behalf of that client (in particular the kits). Regards, Stefan