middleware a guide to middleware construction (roughly) based on Boris

Slides:



Advertisements
Similar presentations
Data Structures A data structure is a collection of data organized in some fashion that permits access to individual elements stored in the structure This.
Advertisements

CSCC69: Operating Systems
COSC 1P03 Data Structures and Abstraction 9.1 The Queue Whenever you are asked if you can do a job, tell 'em, "Certainly, I can!" Then get busy and find.
1 Chapter 24 Lists Stacks and Queues. 2 Objectives F To design list with interface and abstract class (§24.2). F To design and implement a dynamic list.
Multiagent systems a practical approach to MAS construction in Java (using Boris) Simon Lynch
Programming in Java CSE301 Half Lecture Harry Erwin, PhD University of Sunderland.
Queues. … frontrear dequeueenqueue Message queues in an operating system There are times that programs need to communicate with each other.
Multiagent systems a practical approach to MAS construction in Java (using Boris) Simon Lynch
© The McGraw-Hill Companies, 2006 Chapter 17 The Java Collections Framework.
Multiagent systems (MAS) Simon Lynch
COMP 110 Introduction to Programming Mr. Joshua Stough.
Data Abstraction and Object- Oriented Programming CS351 – Programming Paradigms.
1 Foundations of Software Design Fall 2002 Marti Hearst Lecture 13: Queues and Vectors.
1 Lecture 26 Abstract Data Types – IV Overview  The List ADT  Implementing Stacks as Linked List  Linked List Implementation of Queues .  Preview:
Concurrency - 1 Tasking Concurrent Programming Declaration, creation, activation, termination Synchronization and communication Time and delays conditional.
C++ fundamentals.
SDS Foil no 1 How to make real systems: Implementation design, deployment and realisation.
Lecture 4 The Java Collections Framework. Java Container Classes.
Threads some important concepts Simon Lynch
REVIEW On Friday we explored Client-Server Applications with Sockets. Servers must create a ServerSocket object on a specific Port #. They then can wait.
Interfaces. –An interface describes a set of methods: no constructors no instance variables –The interface must be implemented by some class. 646 java.
In the name of Allah The Proxy Pattern Elham moazzen.
1 Web Based Programming Section 8 James King 12 August 2003.
ABSTRACT The real world is concurrent. Several things may happen at the same time. Computer systems must increasingly contend with concurrent applications.
1 Concurrency Architecture Types Tasks Synchronization –Semaphores –Monitors –Message Passing Concurrency in Ada Java Threads.
09-1 Queues and List-Based ADT Implementations Problem Set: PS3 due Wednesday, March 7 Wellesley College CS230 Lecture 09 Monday, February 26 Handout #18.
CSE 501N Fall ‘09 11: Data Structures: Stacks, Queues, and Maps Nick Leidenfrost October 6, 2009.
A data structure is a type of data storage ….similar to an array. There are many data structures in Java (Stacks, Queues, LinkedList, Sets, Maps, HashTables,
Dynamic Architectures (Component Reconfiguration) with Fractal.
Concurrent Programming and Threads Threads Blocking a User Interface.
Stacks and Queues. 2 3 Runtime Efficiency efficiency: measure of computing resources used by code. can be relative to speed (time), memory (space), etc.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 Reusing threads.
Getting Started on Lab 1 Requirements MigratableProcess TransactionalFile{Input, Output}Stream ProcessManager MigratableProcesses.
CSS446 Spring 2014 Nan Wang  Java Collection Framework ◦ Stack ◦ Queue & Priority Queue 2.
QUEUES What are Queues? Creating a Queue Enqueuing and Dequeuing Testing for an Empty Queue.
1 Linked Structures, LinkedSet References as Links Linear Linked Lists and Non-linear Structures Managing Linked Lists Data Encapsulation Separate from.
Ordered Linked Lists using Abstract Data Types (ADT) in Java Presented by: Andrew Aken.
Abstract Data Type EnhanceEdu.
Slides prepared by Rose Williams, Binghamton University Chapter 16 Collections and Iterators.
3-1 Java's Collection Framework Another use of polymorphism and interfaces Rick Mercer.
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
CSCI 62 Data Structures Dr. Joshua Stough September 23, 2008.
Linked Data Structures
Small talk with the UI thread
Review Array Array Elements Accessing array elements
Based on Eric Dashofy’s slides for
Linked List Stacks, Linked List Queues, Dequeues
Object-Oriented Network Communication (OOMI)
Doubly Linked List Review - We are writing this code
Queues Queues Queues.
The Component System … a bit further
Programming Models for Distributed Application
Prof. Neary Adapted from slides by Dr. Katherine Gibson
Implementation CAN Communication Engine
Stacks and Queues.
Introduction to Behavioral Patterns (1)
Initializing Objects.
Chapter 24 Implementing Lists, Stacks, Queues, and Priority Queues
Dr. Mustafa Cem Kasapbaşı
Bond-Jini Interoperability
Computer Science and Engineering
Queues CSC212.
Rick Molloy Senior Developer Microsoft Startup Business Group
Programming II (CS300) Chapter 02: Using Objects Java ArrayList Class
NETWORK PROGRAMMING CNET 441
Ordered Structures Wellesley College CS230 Lecture 10
Stacks and Queues.
some important concepts
Message Passing Systems
Presentation transcript:

middleware a guide to middleware construction (roughly) based on Boris (roughly) geared towards Java Simon Lynch s.c.lynch@tees.ac.uk

what is middleware? a substrate to support system components / subsystems an interface between subsystems an additional level of abstraction

what does middleware do? handles data/message passing between subsystems provides clean subsystem interfacing allowing greater encapsulation & interoperability adding a new level of abstraction “glues (sub)systems together”

what may it also do? facilitate easier concurrency for subsystems allow distribution provide system diagnostics allow dynamic reconfiguration manage resources

building middleware NB: these notes based on Boris philosophy meta-agents / meta-actors building blocks blocking queue  (spooler)  meta-agent  Portal agent, socket agent, interface agent PS: assume (here) all messages are Strings

messages & threads see example… message sending message receiving clones non-clones

a meta-agent subsystem

the blocking queue eg: class LinkedBlockingQueue<E> extends AbstractQueue<E> implements BlockingQueue<E>, Serializable  void put(E e) Inserts element at the tail of queue, waiting if necessary for space to become available.  E take() Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.

meta-agent meta-agent extends blocking-queue variables: name, portal constructor method( args... ) | super.constructor( args... ) | thread{ loop-forever | msgHandler ( dequeue() )} void msgHandler( String msg ) | ... msg processing code goes here...

msgs via portals (i) agents sharing a portal (ii) agents with their own portal

portal portal extends meta-agent variables: routing-table void msg-handler(msg) | routing-table.get( | recipient-of(msg)).enqueue(msg) void add-agent( name, agent ) | routing-table.set( name, agent ) so... meta-agent.send-message(recipient, msg) | portal.enqueue( | wrap(name, recipient, msg)

comms with sockets

name mapping #1 P1 : { A1  | A1| , A2  | A2| }

name mapping #2 P1 : { A1  | A1| , A2  | P2| } P2 : { A1  | P1| , A2  | A2| }

name mapping #3 P1 : { A1  | A1| , A2  | S1| } P2 : { A1  | S2| , A2  | A2| }

usr-agent #1 usr-agent variables: metaAgent, msgHandler constructor method( args... ) | metaAgent = new MetaAgent( args... ) | ...other stuff... void sendMessage( String to, String msg) | ... add who from & send ... ...other methods...

usr-agent #2 usr-agent variables: metaAgent, msgHandler constructor method( args... ) | metaAgent = new MetaAgent( args... ) | ...other stuff... void msg-handler(msg) | if msgHandler != null | msgHandler.processMsg( ...un-wrapped msg...) void addMsgHandler( MsgHandler m )... NB: MsgHandler is an Interface with a method... void processMsg( String )