Title: CORE: Putting Things Together
1CORE Putting Things Together
2CORE Communication Oriented Routing Environment
- Part of ORG (Oxygen Research Group)
- Assumptions
- Actuators / Sensors (I/O) in the environment
- Many are shared by apps users
- Many are flaky / faulty
- User does not know much about them
- Environment, application, users desires change
over time
3An Oxygen Application
- Interconnected Collection of Stuff
- Who specifies the stuff?
- I dont know, but its mostly virtual stuff
- Many layers of abstraction
- Dont ask, its turtles all the way down
- Two main layers of programming
- Professionals
- Users, e.g. grandmother
4Communications-Oriented Programs
- Connecting the (virtual) stuff done by user
- Home stereo / theater analogy
- Plug Stuff together unplug it if doesnt work
- Dont like it, unplug it
- Device drivers, services, clients, dont know to
whom or to what they connect - In client/server model,
- server knows a lot about the client,
- the client knows even more about the server
- Extend Unix Pipes
5CORE
Larry Bear
6Message Flow
- Messages flow between nodes core
- Core is both language and router
- Within Core Router, some messages
- are interpreted and may trigger actions
- other messages get routed to other nodes
- Request-Reply message strategy
- Even number of messages
- No reply within time period, means error
7CORE Language Elements
- Interpreted Language
- Statement is a message request with 3 parts
- ( ACTION, param1, param2 )
- Reply indicated success or failure
- Each language element has an inverse
- Four elements
- Nodes, Links, Messages, Rules
8Nodehandler (nickname, specifier)
Nodes Specify via INS
Cam deviceweb-cam location518
PTRvision deviceprocess OSLinuxFileLaser
Vision, ..
CORE
Laser Vision
9 Node Statement Handler
- When node message arrives
- Verified for correctness (statements allowed)
- Routed to Node Manager (just another node)
- Node Manager
- INS lookup, verifies if allowed, creates if
needed - Creates core thread to manage communication with
node - Bookkeeping reply message with handle/error
10CORE Essentials
Links specify with nicknames
Lcamera,vision (Cam,PTRvision)
Slide Speech
Presentation Speech
Command Speech
CORE
Laser Vision
11Link Statement Handler
- Message routed to link manager
- Two queries to node mng for thread cntl
- Message to thread controller of source node
- Specifying destination thread controller
- Message to thread controller of dest node
- Specifying source thread controller
- Bookkeeping reply message handler/error
12CORE Essentials
Messages flow over the links
Next Slide!
Slide Speech
Presentation Speech
Command Speech
CORE
Laser Vision
13CORE Essentials
Messages flow over the links
Slide Speech
Presentation Speech
Command Speech
CORE
Next Slide!
Next Slide!
Laser Vision
14CORE Essentials
Messages flow over the links
Slide Speech
Presentation Speech
ADVANCE
Command Speech
CORE
ADVANCE
ADVANCE
Laser Vision
15Message Handling
- Messages can be encrypted
- Core statement messages have fixed format
- Everything else is data message
- Each node thread has two unbounded buffers
- Core to node Node to core
- Logging, rollback, fault-tolerance
16CORE Essentials
How do we change output for questions?
Questions?
Slide Speech
Presentation Speech
Command Speech
CORE
Laser Vision
17CORE Essentials
Slide Speech
Presentation Speech
Command Speech
Question?
CORE
Question?
Laser Vision
18CORE Essentials
RULES (trigger,action)
( MESSQuestion , Lslide,lcd -- Lslide,qlcd )
Slide Speech
Presentation Speech
Questions
Command Speech
CORE
Questions
Questions
Laser Vision
19Rule Statement Handler
- ( trigger , consequence )
- Both are event sets
- Eight basic events
- Node, -Node, Link, -Link
- Message, -Message, Rule, -Rule
- Event set is a set of events
- Trigger is true when events are true
- Consequence makes events true
20Rules II
- A message event is of form
- (node, message specifier)
- ( message specifier , node )
- Message came from or going to node
- A link (x,y) is just shorthand for the rule
- ( x , m ) ? ( - (x, m) , (m , y) )
- If a message m arrives at node x, then make that
event false (remove the message) and make the
event of m arriving at y from core true.
21Rules III
- Rule statement gets sent to rule manager
- Event set is just another shorthand for rules
- Rule manager sends command to trigger node thread
that tells it about the consequence - Rules are reversable