V
VisionSet
How good an idea is this?
I have a client that initiates calls on a server by a well defined protocol.
This I have implemented by RMI where the protocol forms the remote
interface.
The server wishes to initiate connection to its clients but only sends a
single notification object that is always the same type.
Now I was going down the road of two way RMI, but quickly realised, whilst
workable, it was unneccesarily complex. Now I have the RMI working well in
one direction, with a great clean design, this also solves some threading
issues I'd otherwise have to code. So I'm thinking the following.
Client makes intial RMI to server with its own address and a port that it is
listening on. Server then stores reference to this client with its other
clients. When the server wants to connect to client it creates a Socket
with the details it was provided and serialises the notification object onto
that socket. Client picks it up through the simple socket listener
implementation.
I'm not going down 3rd party library routes, this is only educational.
Anyone see a problem with this proposal?
This thread has some requirements for the system.
http://groups.google.co.uk/group/co...7de07ddb200/2b175afe80e687fe#2b175afe80e687fe
TIA
I have a client that initiates calls on a server by a well defined protocol.
This I have implemented by RMI where the protocol forms the remote
interface.
The server wishes to initiate connection to its clients but only sends a
single notification object that is always the same type.
Now I was going down the road of two way RMI, but quickly realised, whilst
workable, it was unneccesarily complex. Now I have the RMI working well in
one direction, with a great clean design, this also solves some threading
issues I'd otherwise have to code. So I'm thinking the following.
Client makes intial RMI to server with its own address and a port that it is
listening on. Server then stores reference to this client with its other
clients. When the server wants to connect to client it creates a Socket
with the details it was provided and serialises the notification object onto
that socket. Client picks it up through the simple socket listener
implementation.
I'm not going down 3rd party library routes, this is only educational.
Anyone see a problem with this proposal?
This thread has some requirements for the system.
http://groups.google.co.uk/group/co...7de07ddb200/2b175afe80e687fe#2b175afe80e687fe
TIA