river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Firmstone <j...@zeus.net.au>
Subject StreamServiceRegistrar Was: Re: Jini Activation Framework - A sub project?
Date Thu, 06 May 2010 02:00:12 GMT
The other thing I'm working on is a PackageVersion annotation, using the 
implementation version and package name from the Java Package Version 
spec, so developers can version their proxy's allowing sharing of 
compatible bytecode for reduced codebase downloads.

I'm hoping that these things combined will assist to enable lookup over 
the internet.

Peter Firmstone wrote:
> Gregg Wonderly wrote:
>> Many of my service APIs have streaming sockets needed for I/O based 
>> activities.  For example, remote event monitoring happens through an 
>> ObjectInputStream that is proxied through the smart proxy on the 
>> client to a socket end point that the proxy construction provided the 
>> details of on the server.
> This too is interesting Gregg,  I've done something similar with the 
> StreamServiceRegistrar; I've created a new interface called 
> ResultStream, to mimic an ObjectInputStream, which is returned from 
> lookup.  The idea is to provide a simple interface and minimise 
> network requests by allowing a smart proxy implementation to request 
> and cache larger chunks.  The main advantage of the Stream like 
> behaviour, is to enable incremental filtering stages and delay 
> unmarshalling of proxy's until after initial Entry filtering, then to 
> control the progress of unmarshalling, so your only dealing with one 
> proxy at at time. Further filtering can be performed after each 
> unmarshalling, such as checking method constraints.  Any unsuitable 
> proxy's can be thrown away before the next is unmarshalled, allowing 
> garbage collection to clean as you go and prevent memory exhaustion.
> The StreamServiceRegistrar lookup method also takes parameters for 
> Entry classes that are to be unmarshalled for initial filtering, 
> allowing delayed unmarshalling of uninteresting entries.
> Unmarshalling will still be performed by the Registrar implementation, 
> the client just gets to chose when it happens.
> Cheers,
> Peter.

View raw message