300 likes | 453 Views
Java-based mobile agents. Java effective for mobile agents in e-commerce. Earlier technologies. “Fathered” mobile agents Dev’d to improve RPC for distributed programming Process migration Remote evaluation Mobile objects. Process migration. Move entire address space among computers
E N D
Earlier technologies • “Fathered” mobile agents • Dev’d to improve RPC for distributed programming • Process migration • Remote evaluation • Mobile objects
Process migration • Move entire address space among computers • Reduce net BW compared to RPC • Multiple RPCs to execute app • ==> Entire process can migrate • No way to return data back to source node wo entire process returning
Remote evaluation • Send request in form of program (not entire process address space) • Remote executes + returns results • No need to transmit process control data • Lack ability to encapsulate more state info into program
Mobile objects • Extend remote eval • Capture more program behavior within mobile object • Objects migrate, carrying executable code, data (object specific properties), other objects • Mobile agents improved …
Mobile agents improved • Reduce net traffic for app’s processing large quantities of data • Earlier: client/server • Ship data to program source • Agents: ship program to data • Also, autonomy: decide dynamically, where, when to travel
Client/server vs. agent computing models Client Server Client Server Agent Network Interaction Network Interaction
Mobile agents improvements (cont.) • Adapt to changes in program state + net environment • Asynchrounous interaction • User can disconnect from net • Store-and-forward mechanism • Async + autonom ==> protect mission-critical app’s form unreliable net’s
Mobile agent advantages (cont.) • Traveling user • Connect/disconnect • Fault tolerance • Security
Java as a language for mobile agent dev • Concordia • Odyssey • Voyager
Java for mobile agents • Multiplatform support • “Write once, run anywhere” • Ubiquity of JVM • ==> Facilitate dissemination
Java unique features • Object serialization • ==> Convert agent + state -->suitable form for net transmission • Remote sys reconstruct
Java unique features (cont.) • Persistent agent state info • Serialize agent’s state • Write to persistent storage • Retrieve state + use to reconstruct agent
Java unique features (cont.) • Network support • Sockets • URL comm. • Distributed object protocol • RMI: Remote method invocation • Prog. Access to dist. object simple • RMI handled by local proxy
Java unique features (cont.) • Class loading mechanism • ==> Facilitate migration of code + state • Dynamically load classes • Classpath / net • Code subject to security restrictions • Fine-grain, configurable security policies • Tight integration with Web ...
Tight integration with Web • Applets can launch mobile agents • Receive returning agents when done • Servlets: function like CGI script • May launch + receive mobile agents • JNDI: Java Naming & Directory Interface ==> seamless connectivity via unified access to multi naming + directory services
Agent Manager Generic mobile agent architecture Generic Mobile Agent Server External Application Application Gateway Interagent Communication Manager Agent Directory Manager Network Generic Mobile Agent Server Reliability Manager Security Manager Generic Mobile Agent Server
Generic mobile agent architecture • Six major components • Agent manager • Interagent communications manager • Security manager • Reliability manager • Application gateway • Directory manager
Agent manager • Send agents to remote hosts • Receive agents for execution on local host • Serialize agent prior to transport • Pass serialized form to counterpart on destination • Really to reliability manager • Ensure reception on other side
Agent manager • Upon reception • Reconstruct • Agent + objects ref’d • Create execution context
Mobile agent system (JVM) • Auto invoke security manager • Authorize any op’s using sys resources • Request agent manager to transport agent to correct location
Security manager • Protect host + mobile agents against unauthorized code • Authenticate received agent • Encrypt agents before • Transmission • Saving to storage • Digitally sign agents • Exchange certificates
Reliability manager • Ensure robustness of mobile agent system • Shield agents from server / sys crash • Guarantee persistence of • State associated with agents • Mobile agent sys • Use transactional queuing to ensure agents reach destination even during sys crashes