reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Chung <>
Subject TransportEvent, RemoteEvent, and Mapping Identifiers to Endpoints in Java
Date Mon, 20 Jun 2016 23:38:04 GMT
Hi all,

I'm having a bit of trouble understanding REEF Networking,
particularly on the Java side.

In both Java and C#, RemoteEvent has a source and a sink but neither
are used upon calling the constructor - instead both fields are set
when receiving a TransportEvent, using the Link's LocalAddress and
RemoteAddress properties.

I know that in C#, when a process A initiates a connection with
NetworkService, we use a new TCPClient and get a new TCP Stream - this
means that we open a new endpoint (host:port) for the client upon
creating a new connection. On the server side of process B, after it
accepts the request from process A, it creates a new Link object with
a remote endpoint of the host:port for the client on process A.
However, the endpoint is different from what process A registers with
the NameClient. Process A registers the endpoint of its own Server,
but not the newly opened endpoint used to initiate the connection.
This causes a problem in that the server of process B cannot know that
the connection was initiated by process A.

Is this scenario of concern on the Java side? I notice that Java
performs some sort of connection caching at the lower level - e.g. if
process A already has a client connected to process B and process B
wants to connect to process A, it does not seem to open a new endpoint
but directly uses the existing connection.

Can the server in Java identify which process initiated the connection
using the NameClient? How do the LocalAddress and RemoteAddress
properties get filled in? Do they correspond to what is registered
using the NameClient?


View raw message