| Author |
Socket I/O question
|
James Daley
Greenhorn
Joined: Oct 27, 2002
Posts: 4
|
|
Is there a standard pattern to follow for developing network applications that do request-response type conversations? I've built something but it's kludgy and relies upon instanceOf in delivering the response to the object that requested it. The remote system is non-java based.
|
 |
Michael Ernest
High Plains Drifter
Sheriff
Joined: Oct 25, 2000
Posts: 7292
|
|
You're passing an object back and forth but one side isn't Java-based? I'm not sure I understand. There's pretty much two general ways to do this sort of thing: use object serialization and define your own protocol for the request-response communication, or use a framework like RMI or CORBA to manage some of the lower-level details of that protocol.
|
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
|
 |
James Daley
Greenhorn
Joined: Oct 27, 2002
Posts: 4
|
|
|
Actually I was thinking along other lines. I can only communicate with the remote host at the socket api level. I implement a ServerSocket class and need to maintain stateful info about the sessions which operate asynchronously. This is probably a common thing to do, and so thought there just might be an oop design pattern suitable that I could use.
|
 |
 |
|
|
subject: Socket I/O question
|
|
|