ewha univ. se lab. dw lecture1 hive: distributed agents for networking things ieee 2000 nelson...
TRANSCRIPT
EWHA Univ. SE Lab. DW Lecture 1
Hive: Distributed Agentsfor Networking Things
IEEE 2000
Nelson Minar, Matthew Gray, Oliver Roup, Raffi Krikorian and Pattie Maes
MIT Media Lab
2005. 05. 24
SE Lab.Heejin Kim
EWHA Univ. SE Lab. Web DB Lecture 2
Contents
Introduction
Conceptual Agents system The Hive architecture Hive agent implementation Hive application and experiments
Lessons from Hive Conclusion
EWHA Univ. SE Lab. Web DB Lecture 3
Introduction
What is Hive? A decentralized system for building applications by networking local system resources
Ecologies of distributed agents In an ecology of agents, an application is created
out of the interaction of multiple agents across a network
Each agent resides in a particular place and uses local resources
Agents communicate with each other to share information and access to resources
EWHA Univ. SE Lab. Web DB Lecture 4
Conceptual Agents system
Five useful ideas of conceptual agents:
1. Agents are autonomous Entrusted to carry out goals when sent into a system
2. Agents are proactive Active elements, Able to act on their own
3. Agents are self-describing An ontology of agent capabilities can describe
agents, allowing dynamic discovery of available services
4. Agents can interact Work together to complete a task
5. Agents can be mobile Provide a simple abstraction for complex,
dynamically distributed systems
EWHA Univ. SE Lab. Web DB Lecture 5
The Hive architecture
Hive is a set of Java libraries… The system Consists of roughly 280 classes
in 24,000 lines of code 50% lines : Generic infrastructure Other 50% : Specific code for approximately 30 devices and 60 agents
Uses Java RMI (Remote-method invocation) and serialization for agent communication & mobility
Uses XML for ontology support
EWHA Univ. SE Lab. Web DB Lecture 6
The Hive architectureHive’s three components
Hive has three components Cells, Shadows, Agents
Hive network is a decentralized collection of cells Cell is the analog of a Web
server Cell contains a set of shadows Each cell hosts many agents
By analogy to a conventional OS, A cell : kernel Shadows : device drivers Agents : processes
Hive’s architectureHive’s architecture
EWHA Univ. SE Lab. Web DB Lecture 7
The Hive architectureCells : Nodes in the decentralized network
Hive cells perform two primary tasks : Hosting software agents Managing access to local resources
The ideal model would place a Hive cell on every device => Impossible!! A typical cell has several devices
Input resources : motion sensor, camera, digital tag leader.. Output resources : computer display, small robot, speaker..
Hive has a location-dependent model of a distributed system Hive cells are not all the same!
Each cell is an equal peer in the network
EWHA Univ. SE Lab. Web DB Lecture 8
The Hive architectureShadows :Local resources
Shadows are nothing but an API to access a specific resource The shadow abstraction is useful for structuring a
system A system designer writes a shadow once,
encapsulating all of a device’s behavior
Shadows provide the static layer that the agents access
Shadows offer the place for Hive cell to enforce a security or resource control policy
EWHA Univ. SE Lab. Web DB Lecture 9
The Hive architectureAgents : Active computation
Hive agents embody the network interface and policy for resources
Hive agent combines… 4 pieces together create an agent,
an full-fledged autonomous process
Agents live on specific cells, accessing shadows for the resources they need and traveling on the network
s
Java object
Execution thread
Remote interface
Self-description
Hive AgentHive Agent
Shadows vs. Agentsfixed
dynamicstatic
local component networked aspect
active
EWHA Univ. SE Lab. Web DB Lecture 10
The Hive architectureUser Interface
Hive provides a graphical user interface to the distributed system Hive user interface is an agent
The interface lets users control their cells Create new agents : use drop-down menus Connect agents : by drawing lines Move or Kill agents : through pop-up menus
Interface can display multiple cells
EWHA Univ. SE Lab. Web DB Lecture 11
The Hive architectureA sample Example
Hive camera applicationHive camera application
Hive camera application Three agents
On-screen button Digital camera On-screen image display
Three agents work togetherto build this application
Easily build new applications by connecting existing agents
Flexibility and simplicity!!
System management agents
EWHA Univ. SE Lab. Web DB Lecture 12
Hive agent implementation
Hive draws techniques from many parts of agent research including… Agent autonomy Multiagent interaction Agent ontologies Agent Mobility
Agent Anatomy All Hive agents are rooted in a common agent base class Agent class is subclass of UnicastRemoteObject in RMI
RMI (Remote-Method Invocation) is the agent communication mechanism Agents are remote objects Management of agent communication must occur within RMI
EWHA Univ. SE Lab. Web DB Lecture 13
Hive agent implementation
Agent Interaction Completely ad hoc, based on simple distributed-object techniqu
es Each agent has two types:
Agent’s object, subclass of AgentImplAgentImpl Agent’s remote interface, a subtype of AgentAgent
Hive ontology Each agent is described in terms of two ontologies:
Syntactic ontology – use queryAgents() interfacequeryAgents() interface Semantic ontology - use RDF (Resource Description Frame work)
Mobility Hive mobility has two portions:
mobile code : each Hive cell to be updated dynamically mobile agent : move themselves around the Hive network
EWHA Univ. SE Lab. Web DB Lecture 14
Hive application and experiments
Things That Think, ubiquitous computing, and Hive The specific requirements of the application domain,
Things That Think (TTT)Things That Think (TTT), motivated Hive’s design Hive is a good infrastructure for TTT and TTT is a
good problem for Hive
Honey, I Shrunk the CDs, Part II Tangible Interfaces and ambient Displays Wearable Computing counter Intelligence Networking Synergy
EWHA Univ. SE Lab. Web DB Lecture 15
Lessons from Hive
1. Java, RMI and Asynchronous Messaging
Java is wonderful language for building distributed-agent systems Strong typing : syntactic ontology for free Java’s Abstract Window Toolkit (AWT) : graphical agents easy
RMI normally allows only synchronous calls, which do not work well for agent communication It means that agents are dependent on each other Having wait for each other to respond to message
Asynchronous messaging is a fundamental requirement for any distributed-agent system Added asynchronous messaging on top of RMI
EWHA Univ. SE Lab. Web DB Lecture 16
Lessons from Hive
2. Decentralization Useful strategy at many levels Ultimate advantage is scalability
However, Hive network is still small!
Organizational advantages New Hive users need no setup : simply start a cell and join the network
3. Mobility Pointed out two deep unsloved problems in mobile code
Versioning problem : Java tool’s for managing versoning are incomplete Conceptual problem : Not use a mobile agents very often
4. Ad- hoc Interaction The open nature of agent interactive might make the Hive syst
em seem Perilously unpredictable and inconsistent
EWHA Univ. SE Lab. Web DB Lecture 17
Conclusion
Hive, an implementation of an ecology of distributed agents
Agents are a good abstraction for building distributed systems
Ad-hoc agent communication along with ontologies mechanism is sufficient to build useful systems
Mobile agents are a useful abstraction, but that they are more applicable to larger distributed systems.
Agents are a fundamental building block for coherent distributed systems
EWHA Univ. SE Lab. Web DB Lecture 18
e-mail : [email protected]