Applying E-book Model to Mobile Agent in Network Wire &Wireless

With the support of internet technology which has made the limitation of distances and regions broken for business behaviours, e-commerce can extend the marketing of companies to unlimited regions. Agent technique is not only an important technology to support the Internet applications, but also is a technique to solve the problems of temporality even if the users are off-line and the agents are still active in the computer network wire and wireless and can play the roles that their users assigned. In this paper we proposed a model for e-book based on mobile agent system and our model include five systems which are: buying system, bookshop system, account management system, a consumer system and a manager system, those systems connect the consumer and bookshop via the manager server, its tasks are doing a route between consumer and bookshop. Moreover, it makes negotiation mechanisms and deals with the account management. The implementation and the testing of e-book model has concluded with remarkable achievement that we have gained from applying a proposed model for e-book based on IBM aglet mobile agent technology.


Introduction
The popularizations of Internet and World W ide Web have made the limitat ion of distances and regions broken for business behaviours. In general E-co mmerce can extend the market ing of a co mpany or enterprise to unlimited reg ions. E-co mmerce is environment wh ich provide new channel and business models fo r buyers and sellers efficiently and effectively t rade goods and services over the Internet [1].
E-co mmerce can be divided into two types: the first one is the E-co mpanies to customers (B2C) which represents electronic treat between companies and customers. The second one is B2B, which represents electronic treat exchange between the company and another company. Co mpanies use the E-commerce will achieve many benefits such as: Marketing is mo re effective, mo re profit, reduced costs for companies, effective communicat ion with partners and customers. Moreover the customers also will obtain some benefits such as: Save time and effort, Freedo m of choice, lower prices and user's satisfaction.
As we have mentioned of the benefits of use E-co mmerce we will present some of e-co mmerce risks wh ich are as follow: The legal risks of electronic dealing in treat, the risk of e-documentation and the risk of not being able to protect the sites on the Internet. E-co mmerce is known as a system of sales and purchases between producers and consumers through the use of ICT or is the system to sellers and buyers, providing the products and services in digital form, and paid for with electronic cash, these operations are carried out through the Internet, more new techniques are developed for Internet and WWW applications. One o f these technologies is a mobile agent technique which is developed to support the Internet applications. These technologies have broken the limitation of space for enterprise marketing. Moreover, the mob ile agent techniques solve the problems of temporality even if the users are off-line, the agents are still working in the world of computer network and play the pre-defined scenarios. Few research efforts have been devoted to analysing agent-mediated e-Marketplaces by means of discrete event simu lation. Th is paper proposes an approach to the modelling e-book based on mob ile agent IBM aglet. The approach is exemp lified by defining and simu lating a consumer-driven e-book model, inspired by the system presented in [2,3,4], which offers mob ile agent-based services for searching and buying goods. The remain o f this paper is organized as follows: In section 2, a definition of a mobile agent, advantages, disadvantages and their applications, also the mobile agent systems have been presented. In section 3 arch itecture model for e-book and its three levels which contains the five systems and they are as follow: buying system, bookshop system, account management system, a consumer system and a manager system in addition to several sub-systems.
In section 4 a simu lation scenario of the defined e-book model is described through the flowchart for a source program and the interfaces forms, also the evaluation of the e-book system has been described in this section. Finally, conclusions are drawn.

Mobile Agent
A mobile agent is a program or object that migrates fro m node to node according to the program's objective. A mobile agent consists of the program code and the program execution state. At starting point a mobile agent resides on a computer called the home machine. The agent is then dispatched to execute on a remote co mputer called a mob ile agent host or mobile agent server. When a mobile agent is dispatched, its entire code and the execution state of the mobile agent are transferred to the remote host. The suitable execution environment will be provided by remote host for executing mobile agent. The mobile agent checks the availability of the resources that he wants. If the resources are available then mobile agent executes the task and then returns back and if resources are not available then simp ly go to next node or terminates. In this model if a client wants any informat ion fro m server, client use to generate request and give the detail info rmation about that which it wants. After complet ing its task on the remote host, the mobile agent migrates to another co mputer. Since the state information is also transferred to the remote host, mobile agents can resume the execution of the code fro m where they left off in the previous remote host instead of having to restart execution fro m the beginning. This continues until the mobile agent returns to its home machine after co mpleting execution on the last machine in its journey.
Some advantages of mobile agent are applied on the world of computer network wire and wireless such as: Reduce the network load, Overco me network latency, execute asynchronously, Encapsulate protocols, etc. in the running test of e-book model we have achieved the satisfaction of most of those advantages of Mobile agent. In other hand mobile agents have some Disadvantages such as: Security risk, which we have tackled in our previous work [3] and also, other research papers have been tackled the security in [4,5,6].

Applications of Mobile Agents
Huge numbers of applications have been developed for mobile agents in various areas such as the follo wing: • Parallel Co mputing: Solving a co mplex problem on a single Co mputer takes a lot of time. To overcome this, mobile agents can be written to solve the problem. More details can be found in our previous work [5]. These agents migrate to computers on the network, which have the required resources and use them to solve the problem in parallel thereby reducing the time required to solve the problem.
• Data Collection: Consider a case wherein, data from many clients has to be processed. In the traditional client-server model, all the clients have to send their data to the server for processing resulting in high network traffic. Instead mobile agents can be sent to the individual clients to process data and send back results to the server, thereby reducing the network load.
• E-co mmerce: Mobile agents can travel to d ifferent trading sites and help to locate the most appropriate deal, negotiate the deal and even finalize business transactions on behalf of their owners. A mobile agent can be programmed to bid in an online auction on behalf of the user. The user himself does not need to be online during the auction.
• Mobile Computing: Wireless Internet access is likely to stay slow and expensive. Power consumption of wireless devices and high connection fee deter users fro m staying online while some co mplicated queries are handled on behalf of the user. Users can dispatch a mobile agent, which embodies their queries, and log off, and the results can be picked up at a later time.

Mobile Agent Systems
There are number of Mobile agent systems most of them are java based. So me of them are introduced as follow: • Aglets: -Aglet was developed by IBM Tokyo Research Lab. A developer can use the classes and methods defined in java Aglet API for aglet creation and man ipulation in [7,8,9,10]. The mob ility of the aglet is achieved by the sterilizat ion and dynamic class loading techniques of java. An aglet serializes itself and dispatches to another Aglet Workbench, where it is loaded (executed) by the class loader. A security model has been defined for the Aglet. Every aglet has an identifier, with the help of them appropriate security policies and some of security model of aglet mobile agent has been applied to secure the dataflow fo r our proposed E-book model.
• Concordia is Java-bases mobile agent system and this is developed by Mitsubishi Electric Informat ion Technology Centre. It provides a Concordia Server that executes on the top of the Java Virtual Machine as the agent platform. Three types of protection are available in Concordia security model: Protection of agent storage area, Protection of transmission of agent , and protection of server resources.
• Odyssey:-The research of General Magic Inc. developed the first commercial mob ile agent system known as Tele-script wh ich is based on network arch itecture and proprietary language. General Magic re-imp lements the mobile agent in java-based Odyssey.
Voyager:-Voyager is a java based platform for agents to enhanced distributed computing. Voyager supports various objects including object for messaging capabilit ies and object for movement of agents in the network.

The Architecture Scheme for E-Book
The proposed architecture for our e-book model is divided into three levels as shown in the figure 1.

Application Level (E-book)
Application level contains the model of e-book which has been divided into several systems and sub-systems these are Illustrated in figure 2 Mobile Agents Buyer Search Ag le (MA SA), recommendati on system for consumer, and negotiation mechanism of ma rket . One can see Figure 3 several previous research works have discussed marketing place online for different purposes [11,12]. Our E-book Co mponents consist of five main systems and several sub systems. The main five systems are: buying system, bookshop system, account management system, a consumer system and a manager system. These systems connect consumer with all ment ioned components through several numbers of interfaces.

Buyer Server
Buyer system provides the web interface that lets consumers control their agents to carry the e-book activation out via standard Web-browser. Buyer system manages the Mobile Agents Search Aglet (MASA). The MASA will produce Buyer Agent (BA) for each consumer to serve its homologous consumer. BA will generate Mobile Agents Buyer Aglet (MA BA) accord ing to the requirements of the consumer. The MABA stands for its consumer to go to every bookshop to make bargains and buy the book. The book shopping scenario/ book buying scenario has been shown in figure 3. 11) In case the consumer accepted to buy the book then he needs to click on the desirab le book and the system will request the consumer to write his/her account number and password, after that the system will also require the conformat ion fro m consumer and this will be by clicking ok as a result of the conformation the MA Buyer Buying Aglet will be created.
12) The MA Buyer Buying Aglet takes the book and account number and password then goes to the Manager Server.
13) As soon as MA Buyer Buying Aglet arrives to the Manager Server, the book and account number and password sent to the MA Broker Aglet wh ich will check the account and balance if everything as usual then MA Broker Buying Aglet will be created.
14) MA Bro ker Buying Aglet will move to the bookshop and ask the MA Shop Aglet for sending the book to consumer and return the invoice nu mber to MA Broker Buying Aglet. 15) Then MA Broker Buying Aglet will return to Manager Server and give the invoice number to the MA Broker Aglet.
16) The MA Bro ker Aglet transfer price fro m the consumer account to the Book Shop account.
17) Then MA Buyer Buying Aglet goes back to Consumer Server and in forms the consumer about the buying process.

Book Shop Server
The book shop which wants to jo in E-book proposed in this paper, should have a softcopy of E-book system installed in their server. There are two agents in a book shop Server, include: (a) Bookshop Agent (BSA) BSA has two main functionalities: (1) Manages bookshop Server, (2) creates Mobile Bookshop Agents and dispatches them to bookshop places for selling book. 3) Then account number and password will be sent by Account Aglet to the Manager Server. 4) When the MA Shop Account Aglet / MA Buyer Account Aglet arrive at the Manager Server then account number and password will be sent to the MA Broker Aglet. 5) MA Broker Aglet will search for the account in the Account DB and return the results to the MA Shop Account Aglet/ MA Buyer Account Aglet. 6) Then MAS hop Account Aglet / MA Buyer Account Aglet will return back to its ho me and immed iately send the results for the bookshop/consumer to display the account informat ion and transaction. 7) Disposing MA Shop Account Aglet/ MA Buyer Account Aglet.

Manager Server System
This interface does monitor bookshops that are connected or not with information about every bookshops and shows the aglets that have arrived to it.
The manager system of this e-book monitors not only the bookshops that are connected but also those who are not. The manger system also monitors the change of agent behaviour states and provides distinct services, which are responsible of particular functional agents in this e-book. There are three steps of marketplace management: • The first step is an identification of MABA or MASA. When MABA or MASA entered e-book locations, MABA or MASA must register to Manager Agent (MA) immediately. The purpose of the first step of manager is to let legal agents acquire authority to request services , and either enforcing illegal agents to leave or disposing it directly.
• The second step is the period that MABA or MASA act in marketplace. MA BA or MASA can request functional agents to provide services and all messages between MBA and MBSA will pass through functional agents.
• The third step is to handle MABA and MASA leaving marketplace and release marketplace resources. In this step some operations need to be completed such as agents that its state is ready or agents that its state is leaving.

Coordi nator Server
The responsibility of a Coordinator Server (CA) is to manage the E-book do main and monitoring bookshop agent, buyer agent, and provides the other functions of e-book system.

Interface Level
Interface level is developed to make a connection between Mobile Agent Platform level and E-book system level. E-book consists a number of co mponents and the task of the interface level is to connect the components for E-Book. These components provide all the necessary services such as database connection, GUI connection, and security technique for E-book over IBM Aglet. The paper has presented number of Interfaces as follows: Figure 5, presented Management Server Interface, has been developed by java programming and is responsible for different activities such as, monitoring Bookshops that are connected or not with the information about every bookshop. The figure shows the aglets that have arrived. Figure 6 shows the result of the execution of E-book search interface and according to this result the consumer can select the book he intends to buy

Buying Interface
The following figure 7 handles the processes of buying the book that has been selected by the consumer and appeared in the previous interface. To finish the buying process the consumer requested his bank account number and bank account password also our e-book system accepts any type of money cards and the system has sub-interface to deal with such case.

Shop Server
E-Book system provides the consumer with the following interface shown in Figure 8. Th is interface that is responsible for opening the shop server and dispatch all the information requested in following form E-book system, has other several main and sub interfaces to deal with all the activities and operations necessarily required fo r the research included in this paper.

Mobile Agent Platform
Migration, deletion and others activities for agents are a hot topic for many researchers in a number of research areas [13]. In this paper we have adopted Mobile Agent IBM Aglet system to be the platfo rm for our e-book model, agent platform (IBM Aglet) resides in the last level of the proposed architecture model and it has been shown in figure 1. IBM Aglet supports all the activit ies of e-book model such, creation, clone, deletion and migrat ion of mobile agent, updating database, control bank count and other activities. These activities have been developed using java, JDBC and Oracle.

Execution Environment of E-Book
The wire and wireless networks connect four types of server have been described in the proposed architecture for E-book model in section 3. E-book system has been applied on IBM aglet mobile agent; the four servers are named as follow: (1) Buyer Server (2) Book Shop server (3) Manger server system, (4) Coordinator Server. Each server includes several agents and/or mobile agents (see Figure 3). We have experimented with Java mobile agent frameworks namely Aglet. This agent runs within hosts, which was free of additional processing load from other applications.

Security Used in E-Book
The security used in our e-book system is as simp le and usual as we encrypt "in sender" the data or " messages" which are e xchanged between aglet and server and then we decrypt "in the receiver" with the same key in sender and receiver and the same algorith m. Ou r paper provides a model for e-commerce based on application design using mobile agents. We do not look at the security aspects of mobile agent system. In our prev ious work we have been further extended with detailed study of security issues in mobile agent in [14]. Also study of suitability of existing e-pay ment protocols for mobile agents is essential for incorporating payment system with mob ile agents in [15]. Design of a new pay ment protocol which suits most of the mobile agent paradigm could be carried out as further extension in the upcoming research work.

Conclusions & Future Works
In this paper we presented our solution model for e-book based a dynamic IBM aglet mob ile agent infrastructure. The design and imp lementation have been described in the previous sections. The solution model p rovides automaticity and convenience compared with current electronic e-commerce. The functional agents in this model for e-book provide various services and the scenarios of some services have been discussed. One can see the transaction mechanism to mob ile agents to transact in e-book services efficiently and effectively. We have created an e-book for buying and selling books using a mobile agent paradig m. Several e-shops were hosted which handle large databases of books.
A user interested in buying some books enters parameters such as, title of the book, publisher's name, author's name etc. A mobile agent is created then which visits all the ten shops, searching for the book at each shop. The mobile agent contacts the shop's local agent and evaluates the result and finally returns back to the buyer with the matching results. E-book model provides three ways of buyer and seller transaction: shop directly, one-to-one negotiate, and auction. At the time of running our proposed model for e-book we have noted that not only mobile agent provides large flexib ility in application design, extendibility, easy integration of new functionalit ies and provide a solution for quicker, but also help consumers with tedious repetitive job and time consuming activ ities of product discovery and comparisons. Also the adopted mobile agent maintains a list of hosts to sit in case it could not migrate itself to a mobile host from where it was launched because of temporary disconnection. This feature prov ides support for disconnect ed operations. The agent moves to any of these hosts and pings the destination at regular intervals to determine when the host is connected. From all the prev ious descriptions we have noted that applying a proposed e-book model to IBM aglet mobile agent technology has benefited us with the following achievements: Reduced communication overhead and Increased Reliability and also achieve remarkab le performance. These achievements are being written to appear in our soon future paper.