Mobile Agents for Database Applications Ludwig Klug Database - - PDF document

mobile agents for database applications
SMART_READER_LITE
LIVE PREVIEW

Mobile Agents for Database Applications Ludwig Klug Database - - PDF document

DBagents dbagents@scch.at +43 7236 3343 837 www.scch.at Mobile Agents for Database Applications Ludwig Klug Database Agents 1 Ludwig Klug Ludwig works with Agents for more than 1.5 years Technical consultant for Grasshopper


slide-1
SLIDE 1

1

Database Agents 1

Mobile Agents for Database Applications

Ludwig Klug

DBagents dbagents@scch.at +43 7236 3343 837 www.scch.at

Database Agents 2

Ludwig Klug

■ Ludwig works with Agents for more than 1.5 years ■ Technical consultant for Grasshopper implementations ■ Implementation of DBagents

slide-2
SLIDE 2

2

Database Agents 3

Grasshopper

Building an Agent with Grasshopper

DBagents dbagents@scch.at +43 7236 3343 837 www.scch.at

Database Agents 4

Grasshopper – The Agent Platform

■Producer IKV++ GmbH, Berlin, Germany Partner of GMD FOKUS ■Costs Evaluation free of charge Licenses ~10000 € (for 100 VAR licenses) 3000 € / Year for premium support (answers

within 24 hrs)

Discussion forum (answers usually within 1 week)

slide-3
SLIDE 3

3

Database Agents 5

Grasshopper - The Agent Platform

■FIPA and MASIF Extensions One of few agent platforms building on

standards

Extensions realized as Grasshopper

agents

Database Agents 6

Grasshopper Security I ■External Security

Protect agents against external threats SSL (e.g., IAIK Implementation)

■Internal Security

Protect platforms against hostile agents Protect agents against hostile platforms Public key encryption (certificates)

slide-4
SLIDE 4

4

Database Agents 7

Grasshopper Security II

■ Authorization

Restrict Access to Agency Resources

– Directories – Sockets

Policy Files (for Each Place Separate)

– Current version only allows the same access rights for all agents – Next version: codesource-based access control

■ Missing: Protecting agents against hostile

platforms

Database Agents 8

Communication

■ Agent-to-Agent, Agent-to-Platform, Agent- to-Registry ■ Communication Over Proxies ■ Synchronous Communication

Wait for a return value

■ Asynchronous Communication

Do not wait for a return value

■ Broadcasts

Communicate with more object simultaneously

slide-5
SLIDE 5

5

Database Agents 9

Grasshopper Agent Model I

■Region Unit of agencies Region registry maintains agent

addresses

■Agency Container for places Usually one agency on one computer

Database Agents 10

Grasshopper Agent Model II

■Place Runtime environment for agents ■Agent Code that runs as a thread in a place (Optional) can move between places

slide-6
SLIDE 6

6

Database Agents 11

Grasshopper Agent Model III

■What is an agent? Instance of subclass of MobileAgent or

StationaryAgent

Has a unique identifier (IP-address, time,

copy-number)

Database Agents 12

Grasshopper Agent Model IV

■MobileAgent Allowed to move PersistentMobileAgent ■StationaryAgent Limited to a single place PersistentStationaryAgent

slide-7
SLIDE 7

7

Database Agents 13

Actions

■public void init(Object[] args) Initialization of the agent (agent parameters) Called after the agent is loaded ■public void live() Heart of the agent (agent‘s active behaviour) Only method that MUST be overridden

Database Agents 14

Actions

■public void move (GrasshopperAddress location) Migrate to another location ■public void remove()

Destroy an agent.

slide-8
SLIDE 8

8

Database Agents 15

Event Handlers

■before/afterMove Called before/after the agent migrates ■before/afterCopy Called before/after the agent is cloned ■beforeRemove Called before the agent is removed

Database Agents 16

Example Agency Structure

newyork.scch.at Hagenberg InformationDesk Softwarepark chicago.scch.at Linz InformationDesk Hauptplatz boston.scch.at Wien InformationDesk Stephansplatz

slide-9
SLIDE 9

9

Database Agents 17

Creating a Region Registry

■Decide on Which Computer It Should Run Registry is vital

for agencies

Computer should

run permanently

Database Agents 18

Creating a Region Registry

■Three Ways To (Configure and) Run an Agency Commandline

argument

Wizard Profile editing ■GUI/TUI option

slide-10
SLIDE 10

10

Database Agents 19

Creating the Agencies ■Name of the Agency ■Decide Which Region it Should Belong to ■Access Control ■Security ■Enter Region Address

Format:

socket://chicago:7020/Austria protocol://host:port/region

Database Agents 20

Creating Places ■Place InformationDesk is Predefined

Place where every

agent can migrate to

No security limits

Place creation in an agency

slide-11
SLIDE 11

11

Database Agents 21

Creating Places ■Create Custom Places

Specify a name Specify security

policy

Place creation in an agency

Database Agents 22

3 Ways of Running an Agent ■GUI

In an agency explorer by right-clicking and

selecting "New Agent" on a place's popup menu

■Profile

The

user can define an agent in the configuration window, which is started on initialization of the agency

slide-12
SLIDE 12

12

Database Agents 23

3 Ways of Running an Agent ■API

During execution of an agent another agent can

be activated by calling the createAgent-method

  • f the Grasshopper API

Database Agents 24

Agent life cycle

slide-13
SLIDE 13

13

Database Agents 25

Agent@Singapore

Singapore Tokyo Frankfurt Chicago Moscow toVisitVector Singapore here Singapore Tokyo Frankfurt Chicago Moscow visitedVector Singapore creator Agency Singapore Agent Singapore Tokyo Frankfurt Chicago Moscow toVisitVector Singapore here visitedVector Singapore creator Agency Singapore Agent

Agent.move(Tokyo)

Database Agents 26

Agent@Tokyo

Singapore Tokyo Frankfurt Chicago Moscow toVisitVector Singapore here Singapore Tokyo Frankfurt Chicago Moscow visitedVector Singapore creator Agency Singapore Agent Tokyo Frankfurt Chicago Moscow toVisitVector Tokyo here Singapore visitedVector Singapore creator Agency Tokyo Agent

Agent.move(Moscow)

slide-14
SLIDE 14

14

Database Agents 27

Agent@Moscow

Singapore Tokyo Frankfurt Chicago Moscow toVisitVector Singapore here Singapore Tokyo Frankfurt Chicago Moscow visitedVector Singapore creator Agency Singapore Agent Tokyo Frankfurt Chicago Moscow toVisitVector Tokyo here Singapore visitedVector Singapore creator Agency Tokyo Agent Frankfurt Chicago Moscow toVisitVector Moscow here Singapore Tokyo visitedVector Singapore creator Agency Moscow Agent

Agent.move(Frankfurt)

Database Agents 28

Agent@Frankfurt

Singapore Tokyo Frankfurt Chicago Moscow toVisitVector Singapore here Singapore Tokyo Frankfurt Chicago Moscow visitedVector Singapore creator Agency Singapore Agent Tokyo Frankfurt Chicago Moscow toVisitVector Tokyo here Singapore visitedVector Singapore creator Agency Tokyo Agent Frankfurt Chicago toVisitVector Frankfurt here Singapore Tokyo Moscow visitedVector Singapore creator Agency Frankfurt Agent

Agent.move(Chicago)

slide-15
SLIDE 15

15

Database Agents 29

Agent@Chicago

Singapore Tokyo Frankfurt Chicago Moscow toVisitVector Singapore here Singapore Tokyo Frankfurt Chicago Moscow visitedVector Singapore creator Agency Singapore Agent Tokyo Frankfurt Chicago Moscow toVisitVector Tokyo here Singapore visitedVector Singapore creator Agency Tokyo Agent Chicago toVisitVector Chicago here Singapore Tokyo Moscow Frankfurt visitedVector Singapore creator Agency Chicago Agent

Agent.move(Singapore)

Database Agents 30

Agent@Singapore

Singapore Tokyo Frankfurt Chicago Moscow toVisitVector Singapore here Singapore Tokyo Frankfurt Chicago Moscow visitedVector Singapore creator Agency Singapore Agent Tokyo Frankfurt Chicago Moscow toVisitVector Tokyo here Singapore visitedVector Singapore creator Agency Tokyo Agent toVisitVector Singapore here Singapore Tokyo Moscow Frankfurt Chicago visitedVector Singapore creator Agency Singapore Agent

slide-16
SLIDE 16

16

Database Agents 31

DBagents

Agents in Database Systems

DBagents dbagents@scch.at +43 7236 3343 837 www.scch.at

Database Agents 32

DBagents ■Basic platform runtime required on each computer Advantages ■Database queries within DBMS ■Searching within network ■Load balancing (not between DB servers but processing at the DB where data is located)

slide-17
SLIDE 17

17

Database Agents 33

Solution Concept ■Standard Agent Platform for Transportation

Extend available migration strategies Extend available security solutions Perform non-SQL operations

(e.g., schema export)

Transport query results back

to home agency

Database Agents 34

Solution Concept ■Mobile Database Agents

SQL statements SQL scripts Java stored procedures

slide-18
SLIDE 18

18

Database Agents 35

Implemented Architecture

miami.scch.at dbag on miami.scch.at Miami MediatorAgents

  • UIAgent
newyork.scch.at NewYork
  • RegionRegistry
DBagent Transport Agent boston.scch.at Boston dbttest on boston.scch.at
  • Database Agents

36

Implemented Architecture

miami.scch.at boston.scch.at Boston dbag on chicago.scch.at dbttest on havana.scch.at Miami MediatorAgents UIAgent

  • newyork.scch.at

NewYork

  • RegionRegistry

DBagent Transport Agent

slide-19
SLIDE 19

19

Database Agents 37

DBagents Framework

DBagents provides a flexible API to support agent-based

  • perations for DBs.

Database Agents 38

DBagents Framework ■4 Agent types ■4 Result handlers ■2 Communication modes ■Agent groups support multi-agent transactions ■UI templates for results, logs and migration strategies

slide-20
SLIDE 20

20

Database Agents 39

Framework Agent Operations ■SQL

A statement is executed and results are

returned to home

■SQL script

A script is executed and log information is

returned

■Stored procedure installation ■Java stored procedure installation

Database Agents 40

Status ■Status

Basic prototype implemented Currently, test scenarios are being

developed

Implementation of CopyAgent in Progress Problem for real-world applications:

– Stability – Security

slide-21
SLIDE 21

21

Database Agents 41

+ =

Mobile Agents DBagents Distributed Databases

DBagents@scch.at