Sunday, September 9, 2012

The Return of the Intent

Gentle readers, I am returning with renewed intent and vigor to the task of programming my legal costs application. The new program is to be known as Visibill. This weekend I have been wrestling with the concept of channels and things. Among the key questions I have are:

(1) I can readily understand why a ServerSocketChannel must have a selector. Why does a client SocketChannel need a selector too?

(2) How does a blocking Socket handle asynchronous (non-blocking) input from a ServerSocketChannel?

In other news, my christening of the server application has been successful. Unsuspecting public, I present to you Visibill Control! As for the client... Visibill Receipt?

More puzzlement to come!

Sunday, April 29, 2012

The remembrance of patterns past

The Observer pattern is a pattern that is easy enough to grasp and remember. Yet it has proved a struggle for me to implement this pattern in the context of a client-server application using Java sockets. The issue boils down to this. The client subscriber or observer must be Serializable enough to pass through the socket to the server for it to register with its subscribers list. Yet the socket reference that the client communicates with the server by is non-Serializable.

More to come. :)