Jinni: Intelligent Mobile Agent Programming at the Intersection of Java and Prolog Copyright © 1999, BinNet Corp. Paul Tarau University of North Texas.

Slides:



Advertisements
Similar presentations
Distributed Systems Architectures
Advertisements

Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Performance Testing - Kanwalpreet Singh.
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.
Intelligent Architectures for Electronic Commerce Part 1.5: Symbolic Reasoning Agents.
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.
Extensibility, Safety and Performance in the SPIN Operating System Presented by Allen Kerr.
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.
Ameoba Designed by: Prof Andrew S. Tanenbaum at Vrija University since 1981.
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.
Distributed Systems Architectures
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.
University of Kansas Construction & Integration of Distributed Systems Jerry James Oct. 30, 2000.
Chapter 11: Distributed Processing Parallel programming Principles of parallel programming languages Concurrent execution –Programming constructs –Guarded.
Software Engineering and Middleware A Roadmap Author: Wolfgang Emmerich Presented by: Sam Malek.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
.NET Mobile Application Development Introduction to Mobile and Distributed Applications.
Community Manager A Dynamic Collaboration Solution on Heterogeneous Environment Hyeonsook Kim  2006 CUS. All rights reserved.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 12 Slide 1 Distributed Systems Design 1.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 12 Slide 1 Distributed Systems Architectures.
More Software Architectures. Blackboard Architecture In a blackboard system, a set of problem solving modules (typically called knowledge sources) share.
1 Course Introduction CS423 Client/Server Programming and Apps References: Comer/Stevens, Ch1.
Chapter Intranet Agents. Chapter Background Intranet: an internal corporate network based on Internet technology. Typically, an intranet can.
TRƯỜNG ĐẠI HỌC CÔNG NGHỆ Bộ môn Mạng và Truyền Thông Máy Tính.
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.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
Reactive Mobile Agent Programming with Jinni Copyright © 1999, BinNet Corp. Paul Tarau University of North Texas & BinNet Corporation.
Unit – I CLIENT / SERVER ARCHITECTURE. Unit Structure  Evolution of Client/Server Architecture  Client/Server Model  Characteristics of Client/Server.
Distributed Data Mining System in Java Group Member D 王春笙 D 林俊甫 D 王慧芬.
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
A Logic Programming Based Software Architecture for Reactive Intelligent Mobile Agents - DIPLCL’99 Copyright © 1999, BinNet Corp. Paul Tarau University.
OPERATING SYSTEM SUPPORT DISTRIBUTED SYSTEMS CHAPTER 6 Lawrence Heyman July 8, 2002.
CSC 480 Software Engineering Lecture 18 Nov 6, 2002.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Construction Planning and Prerequisite
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.
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.
Operating Systems Distributed-System Structures. Topics –Network-Operating Systems –Distributed-Operating Systems –Remote Services –Robustness –Design.
1 Distributed Systems Architectures Distributed object architectures Reference: ©Ian Sommerville 2000 Software Engineering, 6th edition.
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.
Distribution and components
CSC 480 Software Engineering
#01 Client/Server Computing
University of North Texas
MANAGING KNOWLEDGE FOR THE DIGITAL FIRM
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
Operating Systems : Overview
AGENT FRAMEWORK By- Arpan Biswas Rahul Gupta.
Distributed Systems Bina Ramamurthy 4/22/2019 B.Ramamurthy.
In Distributed Systems
#01 Client/Server Computing
Software Architecture Taxonomy
Presentation transcript:

Jinni: Intelligent Mobile Agent Programming at the Intersection of Java and Prolog Copyright © 1999, BinNet Corp. Paul Tarau University of North Texas & BinNet Corporation

other talk: Blackboard Constraints in 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 compoutation mobility, remote executionhigh level networking operations: code and compoutation 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 hyothetical reasoning, backtrackable assumptions, Assumption Grammarshyothetical 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(nscp,29)).?- notify_about(stock_offer(nscp,29)). ?-wait_for(stock_offer(nscp,Price), less(Price,30)).?-wait_for(stock_offer(nscp,Price), less(Price,30)).

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 localy or remotelyhere/there switch: same code can be run localy 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

Ongoing Work Day trader: reactive agent, using Internet data mining for quotes and user defined rules beyond conventional limit/stop/market transactionsDay trader: reactive agent, using Internet data mining for quotes and user defined rules beyond conventional limit/stop/market transactions Network monitoring: new Internet2 infrastructure at UNT, experiments with mobile agents on Gigabit networksNetwork monitoring: new Internet2 infrastructure at UNT, experiments with mobile agents on Gigabit networks Visual Jinni, educational agentsVisual Jinni, educational agents

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