# Linked Data Aware Agent Development Framework for Mobile Devices
## 2 Architecture of LDAF-M
### FIPA Compliant Architecture
In LDAF-M, an agent looking for a specific agent first makes a search using the AMS in its local platform. If it is understood that the specific agent being looked for is not in the same platform, then the search is extended to the DF residing in the index server's agent platform. With such a design, we aim to reduce the load on the index server's agent platform. As discussed in detail in the previous section, there is a notification mechanism between peers and the index server. By this way, peers that go offline because of battery or out of network range problems can be tracked. In such cases, the index server updates the entries in the DF to provide the most accurate information to agents located on mobile device agent platforms. Message Transport Service (MTS), is the component that handles the message delivery between agents on the same or different platforms. The type of message transport protocol that is used in the communication between agents residing in a mobile device is the socket technology, which is actually on top of TCP/IP transmission protocol. On the other hand, the type of message transport protocol that is used in the communication between the index server and any mobile device is Hypertext Transfer Protocol (HTTP), since the agent platform running on the index server receives messages sent to it from the mobile devices using Java Servlet technology. Agents exchange messages expressed in an agent communication language. FIPA also issued standards related with agent communication language and message structures. FIPA Agent Communication Language (FIPA-ACL) is the proposed agent communication language, and hence used in LDAF-M for the communication of agents. The structure of a standard FIPA message consists of two parts which are the message envelope and the message content. To overcome the memory limitations on the mobile devices, a slight modification has been performed on the structure of messages exchanged. This slight modification includes combining the envelope and the content parts of the messages to form a single deliverable unit and using only one of the optional message parameters that are similar. For example, the \"to\" and \"from\" parameters that can be used within the message envelope, and the \"receiver\" and \"sender\" parameters that are used in the content of a FIPA-ACL message have been combined into two single parameters. Finally, agents running on the mobile device agent platforms are implemented as independent Java threads. Internally, each agent supports the agent life cycle standard proposed by FIPA. According  
Figure 3: Mapping of the P2P communication infrastructure into Foundation for Intelligent Physical Agents (FIPA) compliant architecture. to this specification, an agent can be in one of five states, which are \"initiated\", \"active\", \"suspended\", \"waiting\", and \"transit\". Transitions among these states are also defined. When an agent is constructed, the finite state machine representing the life cycle begins at the initial state. The active state is the one where an agent continues to behave in order to meet its delegated objectives. In the active state, transport messages are transmitted to the agent in a normal fashion. Within the scope of suspended and waiting states, all activities of an agent are terminated temporarily. In suspended and waiting states, the message transport service stores the messages locally on behalf of the agent. After the agent passes to the active state again, the stored messages are delivered to it. In the transient stage, an agent is able to move to different platforms. In the current version of LDAF-M, agent mobility is not supported, since agents that travel between the platforms is a research topic in its entirety.