Thursday 14 August 2008

ArtenSUITE Part 14: Network Messaging

ArtenSUITE
A Development Journal
Part 14: Network Messaging

I’ve built simple network messaging into the ArtenSUITE framework. Using UDP (a connectionless transport) I am able to detect and communicate with all other copies of my software running on the local network. This offers me several advantages.

Licensing
Using this facility I am able to detect how many copies of the software are running concurrently, and compare that to the license owned by the customer. This is a fairly foolproof method of ensuring that license limits are not breached and the customer is then likely to purchase additional licenses if they run into this restriction often.

Messaging
The user can use this facility to send messages directly to another user, or group of users. A sort of simple ‘Group Chat’. My software can also use this mechanism to sent messages to both itself and also other copies of itself running elsewhere on the network. Some Interesting possibilities here.

Commands
Messages are send with an identifier, currently set to 0 this is interpreted as a simple message, and is display as such. I can however send messages with a different identifier which can be processed as a command on the remote machine. For example it could be used to force the remote software to perform a particular action, such as quit :-) This again offers interesting possibilities.


I’m not sure yet how to present this messaging interface to the user, currently I am using the screen shown below:



Any messages received by the application will select the Incoming Tab and display the latest message on the screen. There is no annoying ‘popup’ dialog, although if the speech interface is enabled in the preferences, the message will be announced, if not then a simple beep will be heard by the user.

I haven’t yet created any code to resolve the IP address, I am considering writing the IP Address to the user record at logon and then displaying the user name as logged into the system, rather than resolve the IP Address to the computer name.

There’s lots I can do with this, but the framework is in place :-)

"Never fear the want of business. A man who qualifies himself well for his calling, never fails of employment." - Thomas Jefferson

www.artenscience.co.uk
Honest Expert Independent Technology Advice for Business

No comments: