PD Consulting and Security
Wikis » PlayLand » AtomTcpHub » Revision #1

AtomTcpHub: Revision #1

Page Details

First published by:
peterw
on 02-25-2009
Last revision by:
peterw
on 02-25-2009
This page has not yet been rated
You are currently reviewing an older revision of this page. Go to current version

AtomTcpHub

Filed under:

AtomTcpHub is an implementation of AtomHub for TCP-IP. It listens for incoming sockets on a port specified in the AtomTcpHub.exe.config file. When a socket is established, an AtomSession is constructed around the socket stream and incoming ATOM packets are extracted and processed.

Processing of ATOM packets

As soon as incoming data is identified as constituting an ATOM packet, an instance of the AtomPacket class is constructed. This is then processed as follows:

  1. The AtomPacket is sent via MSMQ to the configured instance of AtomLogger.
  2. The device number and command code are extracted from the packet and are used to produce a list of interested subscribers.
  3. Each subscriber is notified. This notification includes a copy of the packet.

This use of a message queue followed by a publish-subscribe system combines the reliability of the former with the extensibility and immediacy of the latter. Subscriptions are implemented using dual-binding web services. Process isolation means that a fault in a subscriber cannot affect any other subscriber or the publisher. This architecture also makes extension behaviour straightforward to implement, and dynamically installable: it is not necessary to stop the service to add or remove a subscriber.

© PD Consulting and Security 2007-2010
Powered by Community Server (Non-Commercial Edition), by Telligent Systems