You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@river.apache.org by Sim IJskes - QCG <si...@qcg.nl> on 2010/03/01 17:51:25 UTC

stream data

Hello,

i've 'derived' some of the stuff i wrote for a SocketFactory 
replacement, and i came to the following interfaces.

Any comments?

public interface StreamConnectionService
     extends Remote
{
     StreamData pollForInput() throws RemoteException ;

     void sendOutput(StreamData buf) throws RemoteException ;

     public void close() throws RemoteException ;
}

public final class StreamData
     implements Serializable
{
     private byte buffer[];

     public StreamData(byte[] buffer)
     {
         this.buffer = buffer;
     }

     public byte[] getBuffer()
     {
         return buffer;
     }


}


-- 
QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
Quality Consultancy Group b.v., Leiderdorp, Kvk Leiden: 28088397

Re: stream data

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Wed, Mar 3, 2010 at 6:21 PM, Sim IJskes - QCG <si...@qcg.nl> wrote:
> Sim IJskes - QCG wrote:
>>
>> Maybe Mekon is a very good name for it.
>
> Mekong!

More importantly, a cheap "whisky"... :-)

Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

Re: stream data

Posted by Sim IJskes - QCG <si...@qcg.nl>.
Sim IJskes - QCG wrote:
> Maybe Mekon is a very good name for it.

Mekong!

Gr. Sim

-- 
QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
Quality Consultancy Group b.v., Leiderdorp, Kvk Leiden: 28088397

Re: stream data

Posted by Sim IJskes - QCG <si...@qcg.nl>.
Jeff Ramsdale wrote:
> The only river that flows in both directions is the Mekong River in
> Cambodia. The river sits in such a low basin that when the tide rises
> the river flows backwards. Sadly, Mekong is probably not a terribly
> descriptive name for your construct...

Well, maybe. I've hacked-up a model of a TCP connection running over 
jini. The implementation is reversing the direction of the calls. It's 
basically polling for chuncks of streamdata. A single serverendpoint 
exposed on the internet serves acts as a rendezvouz for both the 
accept() and connect() calls. The device behind the firewall binds() to 
the rendezvous service, and waits for incoming connect() calls in a 
accept() call. The underlying endpoint family is servlet/httpclient 
based for easy deployment, but any endpoint family should be possible.

Maybe Mekon is a very good name for it.

Gr. Sim

-- 
QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
Quality Consultancy Group b.v., Leiderdorp, Kvk Leiden: 28088397

Re: stream data

Posted by Jeff Ramsdale <je...@gmail.com>.
The only river that flows in both directions is the Mekong River in
Cambodia. The river sits in such a low basin that when the tide rises
the river flows backwards. Sadly, Mekong is probably not a terribly
descriptive name for your construct...

-jeff

On Mon, Mar 1, 2010 at 9:31 AM, Sim IJskes - QCG <si...@qcg.nl> wrote:
> I'm in desparate need of a good name for a bidirectional stream.
>
> Stream, Channel or Socket are causing so much duplication, things like
> StreamInputStream etc.
>
> hmm, a River?
>
> Gr. Sim
>
> --
> QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
> Quality Consultancy Group b.v., Leiderdorp, Kvk Leiden: 28088397
>

Re: stream data

Posted by Zsolt Kúti <la...@gmail.com>.
On Mon, 01 Mar 2010 18:31:39 +0100
Sim IJskes - QCG <si...@qcg.nl> wrote:

> I'm in desparate need of a good name for a bidirectional stream.
> 
> Stream, Channel or Socket are causing so much duplication, things
> like StreamInputStream etc.
> 
> hmm, a River?

BiDi (BiDiStream) like in font or pdf?

Zsolt


Re: stream data

Posted by Sim IJskes - QCG <si...@qcg.nl>.
I'm in desparate need of a good name for a bidirectional stream.

Stream, Channel or Socket are causing so much duplication, things like 
StreamInputStream etc.

hmm, a River?

Gr. Sim

-- 
QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
Quality Consultancy Group b.v., Leiderdorp, Kvk Leiden: 28088397

Re: stream data

Posted by Sim IJskes - QCG <si...@qcg.nl>.
And this one:

public interface ListeneningService
     extends Remote
{

     String getPublicId() throws RemoteException ;

     /**
      * Accept an incoming connection.
      */
     StreamConnectionService accept() throws RemoteException ;
}


-- 
QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
Quality Consultancy Group b.v., Leiderdorp, Kvk Leiden: 28088397