Actors in Java: Coding the Surveillance and Security Application – Part 1
This post introduces a new Java actor based open source sub-project of the project "Learning Actors in Java". This work will develop a premises guardian system. A premises guardian system is a distributed application whose purpose is to support the physical protection of premises such as office buildings, campuses, apartment complexes, shopping malls, etc. Protecting information stored in these premises is beyond the scope of this application. This application has requirements that are very well served by the capabilities that are native to the actor programming paradigm and therefore I will use it as an example of the kind of application where you will find advantage in choosing actors. My personal philosophy of technology is not ideologically fixated on a panacea solution but is eclectic and pragmatic preferring whatever technology is the best fit for a given problem. We don't have to go to work with one tool in our belt. The application that will begin here makes a very good case for the actor model of programming but an important part of the learning to take away from this project is a conditioned intuition of what kind of application can get a boost from actors. This insight will serve you going forward.
The premises guardian system has to reliably accomplish the following goals.
- Monitor all building entrances
- Monitor all locked internal doors.
- Monitor all controlled access gates.
- Support camera surveillance of both interior and exterior.
- Capable of storing images recorded by camera surveillance
- Can communicate using commodity LANs.
- Can communicate via Internet.
- Must be capable of sending alerts with robotic telephone calls.
- Must be capable of sending alerts via email.
- Must be capable of sending alerts using text messages.
- All units must be able to communicate with each other.
- Capable of monitoring smoke detectors.
- Protects its own information and its transmission from cyber attack
- Is able to detect when one of its actors has died or been compromised and is able to restart a replacement.
- Must be flexible enough to allow deployment of its functioning units anywhere that has commodity hardware, networking, and the requisite software.
- Must maintain all premise maps with associated GPS information.
- Must have the ability to log all significant events.
- Must have a secure central command console.
The application is made up of five components, four of which remain resident throughout the service of the application.
The initiator is an actor that is the entry point to the application. It is responsible for creating the four actor systems that implement the application. It also is responsible for creating the four top level managing actors that remain resident as the supervisors of major units of functionality. The initiator is a transient actor that exits as soon as it has finished its work.
Control is a resident actor. It is the highest level manager of the four managing actors. Control has overall responsibility for monitoring and managing the three subordinate managing actors discussed below.
Surveil is a resident actor. It is the managing actor that has responsibility for supervising all of the cameras used to monitor what is happening on and within the protected premises. Surveil reports directly to Control.
Secure is a resident actor. It is the managing actor that has responsibility for the monitoring of all of the gate and door entry mechanisms. Additional duties include custody of all premise maps and associated GPS information, monitoring of all window breakage sensors and the monitoring of all smoke detectors. Secure reports directly to Control.
Alert is a resident actor. It is the managing actor that has responsibility for knowing how to engage in every modality of communication used by the application. When Control, Surveil, or Secure need to communicate to the outside world or to people on the premises who have security responsibility they communicate through the services managed by Alert. Alert reports directly to Control.
Code for this project is being written now. Available at the next post will be code that implements creation and deployment of the managing actors as well as a test that confirms that the managing actors are all connected and can talk to each other. Look for
"Actors in Java: Coding the Surveillance and Security Application – Part 2" to be published November 30, 2013