MassWare Reconfigurator and System-level Reflection

 

Because each distributed middleware agent has its own executive component chain in the active actuator, behavior synchronization is a crucial service of the middleware to achieve behavior consistency for vehicle applications in the reconfigurations. We have designed and implemented an efficient asynchronous synchronization protocol in MassWare based on active messages (the terminologies of synchronous and asynchronous is borrowed from the synchronous and asynchronous communication model in RPC-based middleware and MOM depicted in the related work section). The basic idea of the proposed asynchronous protocol is that every middleware agent constructs the reactive actuators for all connected agents in the initialization phase, and selects one of them to process each received application layer data packet according to the active message header attached in the packet. The synchronization protocol has five initialization steps, such as those shown in the Figure

  1. In the middleware initialization phase, proactive actuators of each agent are constructed based on a user-defined script file. Each proactive actuator is also associated with a middleware-assigned unique index and the architecture-information of an optional reactive actuator.
  2. The middleware agent then sends a synchronization request packet to each distributed peer agent. The packet contains the indices of the proactive actuators and the architecture-information of the reactive actuators.
  3. After receiving the synchronization request packet, the peer agent constructs the reactive actuators according to the packet information, each of which is associated with the IP address of the packet sender and a middleware-assigned unique index as well.
  4. The receiver or the peer agent replys the sender a synchronization response packet that contains a set of index pairs, each of which contains an index of the proactive actuator and the index of the reactive actuator.
  5. The sender agent replaces the architecture-information of each reactive actuator with its corresponding index received from the synchronization response packet.

The above-mentioned initialization is a one-time process for each peer agent. Then the middleware agent appends the index of the reactive actuator, which corresponds to the current active actuator, to the payload of each data packet. The peer agent receiving the data packet activates the reactive actuator indexed by the received index to process the data packet correctly.

The active message based asynchronous synchronization protocol has four advantages:

  • low overhead,
  • short delay,
  • high efficiency, and
  • better robustness.

In general, only the index of the reactive actuator needs to be stored in the active message header for each data packet. By using the asynchronous method, the system does not need to be paused in the synchronization process, which dramatically reduces the reconfiguration time. Further, based on the information in the active message header, a peer agent can always process the received packets by choosing the correct reactive actuator and then no buffered clearance is needed in the reconfiguration process, which makes the reconfiguration by our middleware efficient. Moreover, once the reactive actuators are constructed in the system initialization phase, the local agent reconfiguration does not require the availability of other agents and then is not affected by the network condition or the capacity of other agents. Thus the robustness of the application is improved and the communication overhead is reduced.

MassWare is rule-based reflective middleware, in which all adaptation rules (or policies) are predefined and applications then adapt to contexts according to the rules. However, it may be difficult to predict all the desired policies in advance and users may need to change the policies based on the vehicle runtime status. MassWare provides a re-synchronization method to support the runtime modification of adaption policies. That is, the agent suspends its operations, clears data buffer, re-synchronizes the modified policies with peer agents, and resumes its operations.

 

Copyright(c) 2007 Lehigh University. All rights reserved.
Web master: Shengpu Liu (shl204@lehigh.edu)