[Opensim-dev] [Proposal] New software architecture
diva at metaverseink.com
diva at metaverseink.com
Fri May 22 15:42:40 UTC 2009
Thank you Justin. I added your suggestions to the page. Wasn't sure
about the "closing" date, so I just made it up.
Justin Clark-Casey wrote:
> 3. Are the details of the protocol between client and server side really invisible to the service clients? The awkward
> case here is between local 'in process' and remote servers, I think. For instance, on IAssetService there is a method
>
> Get(string id, Object sender, AssetRetrieved handler)
> [...]
> All this perhaps is a little unfair since this problem and the one below are not at all new. I'd like to know what you
> think about this.
Sure! This is a very old and always interesting problem. And a very
important one for unit tests ;-)
The semantics is not asset return on the same thread vs on another
thread. That's an operational detail that is/should be invisible to the
caller.
The semantics of this operation is "Thank you for your call, I'll return
the asset to you when I have it, if I find it, or a null if I don't find
it".
In the Local Connector case, the current implementation happens to
return the asset on the same thread, before the actual return of the
call. It's like the receiver was so efficient that it completed the job
even before the call was over. But that's an implementation detail. It
could very well return it later on another thread, which is what happens
in the case where remote calls are involved.
The caller should not assume anything about threads; if anything, it
should assume that the return of the asset will be at some other point
in time that does not coincide with the return of the call -- can be
before or after the return itself.
As opposed to the synchronous form:
AssetBase Get(string id);
whose semantics is "Thank you and stay on the line. Upon return of
calling me you are guaranteed to have the asset, if it exists, or a null
if it doesn't exist".
So just a minor change of the semantic model (timing semantics vs thread
semantics), and things are consistent.
> 4. In particular on IAssetService, there appears to be a purely synchronous get methods, e.g.
>
> AssetBase Get(string id);
>
> I know these also existed in the past, but are they a good idea in a world where the callers are not meant to know
> whether the underlying service is local or remote?
See above.
> 5. At the very least, interfaces need proper documentation if the caller is not meant to have to know what is happening
> inside. This documentation needs to be in the proper XML style so that it shows up in generated documentation.
Yes, they definitely will.
More information about the Opensim-dev
mailing list