Reactive Mobile Agent Programming with Jinni Copyright © 1999, BinNet Corp. Paul Tarau University of North Texas & BinNet Corporation.

Slides:



Advertisements
Similar presentations
Performance Testing - Kanwalpreet Singh.
Advertisements

Mobile Agents Mouse House Creative Technologies Mike OBrien.
University of Southampton Electronics and Computer Science M-grid: Using Ubiquitous Web Technologies to create a Computational Grid Robert John Walters.
A component- and message-based architectural style for GUI software
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 9 Distributed Systems Architectures Slide 1 1 Chapter 9 Distributed Systems Architectures.
Parallel Programming Motivation and terminology – from ACM/IEEE 2013 curricula.
Context-Awareness on Mobile Devices – the Hydrogen Approach Sangkeun Lee.
I.1 Distributed Systems Prof. Dr. Alexander Schill Dresden Technical University Computer Networks Dept.
Objektorienteret Middleware Presentation 2: Distributed Systems – A brush up, and relations to Middleware, Heterogeneity & Transparency.
Technical Architectures
Notes to the presenter. I would like to thank Jim Waldo, Jon Bostrom, and Dennis Govoni. They helped me put this presentation together for the field.
Java: History and Introduction (Lecture # 1). History… Java – Based on C and C++ – Developed in 1991 for intelligent consumer electronic devices – Green.
© Chinese University, CSE Dept. Distributed Systems / Distributed Systems Topic 1: Characterization and Design Goals Dr. Michael R. Lyu Computer.
Distributed Systems Architectures
Towards I-Space Ninja Mini-Retreat June 11, 1997 David Culler, Steve Gribble, Mark Stemm, Matt Welsh Computer Science Division U.C. Berkeley.
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
Advanced Topics COMP163: Database Management Systems University of the Pacific December 9, 2008.
Scripting Languages For Virtual Worlds. Outline Necessary Features Classes, Prototypes, and Mixins Static vs. Dynamic Typing Concurrency Versioning Distribution.
Ch 12 Distributed Systems Architectures
1 Chapter 4 Threads Threads: Resource ownership and execution.
Systems Architecture, Fourth Edition1 Internet and Distributed Application Services Chapter 13.
.NET Mobile Application Development Introduction to Mobile and Distributed Applications.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 12 Slide 1 Distributed Systems Design 1.
Slide 1 of 9 Presenting 24x7 Scheduler The art of computer automation Press PageDown key or click to advance.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 12 Slide 1 Distributed Systems Architectures.
Chapter Intranet Agents. Chapter Background Intranet: an internal corporate network based on Internet technology. Typically, an intranet can.
1 소프트웨어공학 강좌 Chap 9. Distributed Systems Architectures - Architectural design for software that executes on more than one processor -
1 MSCS 237 Communication issues. 2 Colouris et al. (2001): Is a system in which hardware or software components located at networked computers communicate.
Architecting Web Services Unit – II – PART - III.
1 A Logic Programming Based Mobile Agent Infrastructure January 19, 2001 Copyright © 2000, Paul Tarau Paul Tarau University of North Texas & BinNet Corporation.
Composing Adaptive Software Authors Philip K. McKinley, Seyed Masoud Sadjadi, Eric P. Kasten, Betty H.C. Cheng Presented by Ana Rodriguez June 21, 2006.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
Jinni: Intelligent Mobile Agent Programming at the Intersection of Java and Prolog Copyright © 1999, BinNet Corp. Paul Tarau University of North Texas.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
A Logic Programming Based Software Architecture for Reactive Intelligent Mobile Agents - DIPLCL’99 Copyright © 1999, BinNet Corp. Paul Tarau University.
1 MSCS 237 Communication issues. 2 Colouris et al. (2001): Is a system in which hardware or software components located at networked computers communicate.
OPERATING SYSTEM SUPPORT DISTRIBUTED SYSTEMS CHAPTER 6 Lawrence Heyman July 8, 2002.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
ECI – electronic Commerce Infrastructure “ An application to the Shares Market ” Demetris Zeinalipour ( Melinos Kyriacou
1 Object Oriented Logic Programming as an Agent Building Infrastructure Oct 12, 2002 Copyright © 2002, Paul Tarau Paul Tarau University of North Texas.
© Chinese University, CSE Dept. Distributed Systems / Distributed Systems Topic 1: Characterization of Distributed & Mobile Systems Dr. Michael R.
1 BBN Technologies Quality Objects (QuO): Adaptive Management and Control Middleware for End-to-End QoS Craig Rodrigues, Joseph P. Loyall, Richard E. Schantz.
Distributed System Architectures Yonsei University 2 nd Semester, 2014 Woo-Cheol Kim.
Seminar on Service Oriented Architecture Distributed Systems Architectural Models From Coulouris, 5 th Ed. SOA Seminar Coulouris 5Ed.1.
Institute for Visualization and Perception Research 1 © Copyright 1999 Haim Levkowitz Java-based mobile agents.
CSC 480 Software Engineering Lecture 17 Nov 4, 2002.
Problem On a regular basis we use: –Java applets –JavaScript –ActiveX –Shockwave Notion of ubiquitous computing.
Design Patterns for Multi-Threaded Logic Programming Languages Copyright © 1999, BinNet Corp. Paul Tarau University of North Texas & BinNet Corporation.
Towards a High Performance Extensible Grid Architecture Klaus Krauter Muthucumaru Maheswaran {krauter,
Distributed Systems Architectures Chapter 12. Objectives  To explain the advantages and disadvantages of different distributed systems architectures.
Distributed Systems Architectures. Topics covered l Client-server architectures l Distributed object architectures l Inter-organisational computing.
Recipes for Use With Thin Clients
Distribution and components
CSC 480 Software Engineering
#01 Client/Server Computing
University of North Texas
Distributed Systems Bina Ramamurthy 11/30/2018 B.Ramamurthy.
Distributed Systems Bina Ramamurthy 12/2/2018 B.Ramamurthy.
Mobile Agents M. L. Liu.
IDSS Lab – research directions Sept 6, 2002
Bina Ramamurthy Chapter 9
Bina Ramamurthy Chapter 9
Web Application Server 2001/3/27 Kang, Seungwoo. Web Application Server A class of middleware Speeding application development Strategic platform for.
Bina Ramamurthy Chapter 9
AGENT FRAMEWORK By- Arpan Biswas Rahul Gupta.
Calypso Service Architecture
#01 Client/Server Computing
Presentation transcript:

Reactive Mobile Agent Programming with Jinni Copyright © 1999, BinNet Corp. Paul Tarau University of North Texas & BinNet Corporation

What is Jinni? JINNI: Java INference engine and Networked Interactor lightweight, multi-threadedlightweight, multi-threaded Prolog-style agent scripting languageProlog-style agent scripting language knowledge processing componentsknowledge processing components high level, distributed, Java based: alternative to RMI, CORBA, KQMLhigh level, distributed, Java based: alternative to RMI, CORBA, KQML

Motivation paradigm shift towards networked, mobile, ubiquitous computingparadigm shift towards networked, mobile, ubiquitous computing increasingly complex patterns of interactionincreasingly complex patterns of interaction reactive and mobile agentsreactive and mobile agents inference capabilities, autonomy and self- reliance.inference capabilities, autonomy and self- reliance.

BASIC ONTOLOGY: THE USERS' VIEW Things: represented as Prolog termsThings: represented as Prolog terms Places: server component listening on a port + Linda blackboardPlaces: server component listening on a port + Linda blackboard Agents: collections of mobile threadsAgents: collections of mobile threads running a set of goals at set of Placesrunning a set of goals at set of Places transporting and processing Thingstransporting and processing Things

A typical Jinni application a hierarchy of Places and Agentsa hierarchy of Places and Agents Agent threads moving between PlacesAgent threads moving between Places wait for/produce Things satisfying constraintswait for/produce Things satisfying constraints sensing changes of state, produce and react to eventssensing changes of state, produce and react to events

THE ARCHITECTURE OF JINNI operatorless syntactic subset of Prologoperatorless syntactic subset of Prolog multiple engines running on separate threads,multiple engines running on separate threads, blackboards to communicate between enginesblackboards to communicate between engines Linda coordination, associative searchLinda coordination, associative search

Architecture of Jinni - details - high level networking operations: code and computation mobility, remote executionhigh level networking operations: code and computation mobility, remote execution Jinni-to-Java translatorJinni-to-Java translator ability to load code directly from the Webability to load code directly from the Web hypothetical reasoning, backtrackable assumptions, Assumption Grammarshypothetical reasoning, backtrackable assumptions, Assumption Grammars

The Jinni Kernel: Basic Linda + Remote Predicate Calls out(X): puts X on the blackboardout(X): puts X on the blackboard in(X): waits until it can take an object matching X from the blackboardin(X): waits until it can take an object matching X from the blackboard all(X,Xs): reads the list Xs matching X currently on the blackboardall(X,Xs): reads the list Xs matching X currently on the blackboard the(Pattern,Goal,Answer): runs Goal to produce the(Answer) or no => here/there switch =>local/remotethe(Pattern,Goal,Answer): runs Goal to produce the(Answer) or no => here/there switch =>local/remote

Assertional Constraints vs. Binding Constrains when nonvar(X)...when nonvar(X)... when proven(X) …when proven(X) … when a_fact(X)… more realisticwhen a_fact(X)… more realistic lower granularitylower granularity arguably: more appropriate for distributed programmingarguably: more appropriate for distributed programming

Beyond Linda: Blackboard Constraint Operations wait_for(Pattern,Constraint): waits for a Pattern on the blackboard, such that Constraint holds, and when this happens, it removes the result of the match from the blackboardwait_for(Pattern,Constraint): waits for a Pattern on the blackboard, such that Constraint holds, and when this happens, it removes the result of the match from the blackboard notify_about(Pattern): notifies about this Pattern one of the blocked threads which waits for it with a matching constraintnotify_about(Pattern): notifies about this Pattern one of the blocked threads which waits for it with a matching constraint

Coordination with Blackboard Constraints ?- notify_about(stock_offer(aol,89)).?- notify_about(stock_offer(aol,89)). ?-wait_for(stock_offer(aol,Price), less(Price,90)).?-wait_for(stock_offer(aol,Price), less(Price,90)).

wait_for(Pattern,Constr) wait_for(P,C):- if(take_pattern(available_for(P),C), if(take_pattern(available_for(P),C), true, true, and(local_out(waiting_for(P,C)), and(local_out(waiting_for(P,C)), local_in(holds_for(P,C)) local_in(holds_for(P,C)) ) ). ) ).

notify_about(Pattern,Constr) notify_about(P):- if(take_pattern(waiting_for(P,C),C), if(take_pattern(waiting_for(P,C),C), local_out(holds_for(P,C)), local_out(holds_for(P,C)), local_out(available_for(P)) local_out(available_for(P)) ). ).

take_pattern/2 take_pattern(Pattern,Constraint):- local_all(Pattern,Ps), local_all(Pattern,Ps), member(Pattern,Ps), member(Pattern,Ps), Constraint, Constraint, local_cin(Pattern,_). local_cin(Pattern,_).

Mobile thread operations run_server/0, here/0, there/0, where/1run_server/0, here/0, there/0, where/1 set_this_host/1, set_this_port/1set_this_host/1, set_this_port/1 set_that_host/1,set_that_port/1set_that_host/1,set_that_port/1 move/0, return/0move/0, return/0 bg/1, bg/2, thread_clone/1bg/1, bg/2, thread_clone/1

BUILDING BEHAVIORS: BASIC AGENT PROGRAMMING CONSTRUCTS a reactive channel listenera reactive channel listener ?-listen(fun(_)).?-listen(fun(_)). selective channel publisherselective channel publisher ?-talk(fun(jokes)).?-talk(fun(jokes)). will not match:will not match: ?-talk(stocks(quotes,nasdaq))?-talk(stocks(quotes,nasdaq))

Example: a stock market trader agent sell(Who,Stock,AskPrice) :- notify_about(offer(Who,Stock,AskPrice)).sell(Who,Stock,AskPrice) :- notify_about(offer(Who,Stock,AskPrice)). buy(Who,Stock,SellingPrice) :- bg(try_to_buy(Who,Stock,SellingPrice)).buy(Who,Stock,SellingPrice) :- bg(try_to_buy(Who,Stock,SellingPrice)). try_to_buy(Me,Stock,LimitPrice) :- wait_for(offer(You,Stock,YourPrice), ……….try_to_buy(Me,Stock,LimitPrice) :- wait_for(offer(You,Stock,YourPrice), ……….

Examples of Mobile Computations Window 1: a mobile threadWindow 1: a mobile thread ?- there, move, println(on_server), member(X,[1,2,3]), return, println(back).?- there, move, println(on_server), member(X,[1,2,3]), return, println(back). Window 2: a serverWindow 2: a server ?- run_server.?- run_server.

Mobile code vs. RPCs: move once, compute many times ?-for(I,1,1000), remote_run(println(I)), eq(I,1000).?-for(I,1,1000), remote_run(println(I)), eq(I,1000). ?-there, move, for(I,1,1000), println(I), eq(I,1000).?-there, move, for(I,1,1000), println(I), eq(I,1000).

Mobile code: WHY? Large database, small agentLarge database, small agent Speed-up: move to a fast processor and back, transparentlySpeed-up: move to a fast processor and back, transparently here/there switch: same code can be run locally or remotelyhere/there switch: same code can be run locally or remotely fault tolerance - move->run->come backfault tolerance - move->run->come back

Emulating multiple answer computations ?- there, move, findall(X,for(I,1,3),Xs), return, member(X,Xs).?- there, move, findall(X,for(I,1,3),Xs), return, member(X,Xs). X=1;X=1; X=2;X=2; X=3X=3

Reflective Meta Interpreter solve(G):-once(reduce(G,NewG)),NewG.solve(G):-once(reduce(G,NewG)),NewG. reduce(G,G):-is_builtin(G).reduce(G,G):-is_builtin(G). reduce(','(A,B),','(solve(A),solve(B))).reduce(','(A,B),','(solve(A),solve(B))). reduce(G,','(clause(G,Gs),solve(Gs))).reduce(G,','(clause(G,Gs),solve(Gs))).

MUTUAL AGENT/HOST SECURITY: THE BRING YOUR OWN WINE PRINCIPLE reflective meta-interpreter: a few lines of Prolog - can be mobile - bring your own!reflective meta-interpreter: a few lines of Prolog - can be mobile - bring your own! a sandbox can protect the Host against the Agenta sandbox can protect the Host against the Agent undecidability of a Turing equivalent meta-interpreter protects the Agent against the Hostundecidability of a Turing equivalent meta-interpreter protects the Agent against the Host

Jinni Agent Classes Java layer:Java layer: –code and type inheritance –reaction to events –libraries: Java3D, XML, special devices etc. Prolog layer Prolog layer –knowledge processing –reaction to blackboard constraints –mobile code

Shared Virtual Reality Agents Web based: browser+EAI+Java+JinniWeb based: browser+EAI+Java+Jinni Jinni Server + Thin Jinni Applet ConnectorJinni Server + Thin Jinni Applet Connector NEXT: Java 3D + virtual peer-to-peer Jinni networkNEXT: Java 3D + virtual peer-to-peer Jinni network new transport layers: Corba, RMI, HMLnew transport layers: Corba, RMI, HML

Stock Market Agents Day trader:Day trader: reactive agentsreactive agents Internet data mining for quotesInternet data mining for quotes user defined rulesuser defined rules far beyond conventional limit/stop/market transactionsfar beyond conventional limit/stop/market transactions

Network monitoring new Internet2 infrastructure at UNT new Internet2 infrastructure at UNT directly running in Java enabled routersdirectly running in Java enabled routers mobile agents for Gigabit network monitoringmobile agents for Gigabit network monitoring QoS negotiationQoS negotiation

Visual Jinni open sourceopen source extensibleextensible embedding of fast native Prolog acceleratorembedding of fast native Prolog accelerator upcoming Java2D and Java3d librariesupcoming Java2D and Java3d libraries

Agent Programming with Controlled Natural Language extension to distfix grammarsextension to distfix grammars patterns, backrackable assumptionspatterns, backrackable assumptions third party speech I/Othird party speech I/O translation from CNL to Kernel Prologtranslation from CNL to Kernel Prolog

Educational agents chat, self organizing groupschat, self organizing groups alerts triggered by blackboard constraintsalerts triggered by blackboard constraints reusable agent hierarchiesreusable agent hierarchies student progress evaluationstudent progress evaluation Wizard of Oz help desk: combined human and programmed agentsWizard of Oz help desk: combined human and programmed agents

Conclusion Synergy between Logic Programming and Java based distributed programmingSynergy between Logic Programming and Java based distributed programming Integrated infrastructure for building Internet aware, GUI-enabled, networked Agent componentsIntegrated infrastructure for building Internet aware, GUI-enabled, networked Agent components High level software patterns for productivity, reusability, quick prototypingHigh level software patterns for productivity, reusability, quick prototyping