Design of a Scalable Reasoning Engine for Distributed, Real-time and Embedded Systems KSEM 2011 Paper Discussion December 13, 2011

James Raymon Edmondson [email protected]

Department of Electrical Engineering & Computer Science Vanderbilt University, Nashville, TN, USA

Table of Contents

James R. Edmondson

Overview of Presentation Flow • • • • •

Introduction Solution Approach Case Study Experimental Results Conclusion

Design of a Scalable Reasoning Engine for DRE Systems

2

Introduction

James R. Edmondson

Problem Overview

• DRE Systems – Large scale – Less resources available than adequate for all participants in the system at full usage • Network capacity • CPU and memory

– Some participants are more important than others • Require differentiated service during contentious periods

– Often mission critical

• Examples – – – – – – – – –

• Lives are often at stake • Cannot go down or become unresponsive

Design of a Scalable Reasoning Engine for DRE Systems

Shipboard computing Satellite software Traffic light management Ambulance services Search and rescue missions Conveyor belt systems Avionics control systems Missile guidance systems Even public clouds could use differentiated service with their resources

3

Introduction

James R. Edmondson

Introduction •

DRE systems have stringent quality-of-service needs under scarce resource scenarios – A satellite arm may have milliseconds or even microseconds to read and process information from laser and radio sensors – A gateway service may need to process data from thousands of data sources in a battlefield and prioritize data delivery in real-time



A sensor without the right information cannot proceed with mission critical tasks



To complicate matters, data arriving too late is useless data



DRE system developers need solutions that monitor and mutate knowledge in a system within microseconds Design of a Scalable Reasoning Engine for DRE Systems

4

Introduction

James R. Edmondson

Motivating Scenario 1. Deployment of 10 components in a DRE system (imagine thousands in real DRE scenario) 2. Each component has its own dependencies 3. Components can be deployed on any processor or host in the DRE system 4. Important components have failover components 5. Similar state graphs needed for each complex action in a DRE system

Design of a Scalable Reasoning Engine for DRE Systems

5

Introduction

James R. Edmondson

Problem Breakdown 1. Scenario can be broken down into a knowledge and reasoning problem •

e.g., C1, C5, and C6 need knowledge about C2 being ready

2. The knowledge and reasoning engines out there are inadequate • •

Host specific Evaluations take milliseconds or even seconds due to managed languages and unneeded features

3. Evaluations must be fast 4. Dissemination must be fast 5. Mechanism must be flexible •

Deployments can change

Design of a Scalable Reasoning Engine for DRE Systems

6

Related Work

James R. Edmondson

Related Work • Knowledge and Reasoning Languages (DRAGO, SOMEWHERE, P2PIS, DDL, HPKB, KAoS, RacerPRO) – Many implemented in managed languages – Remote variables are host-specific – Do not offer consistency semantics for conflicting knowledge • Consistency is specialized in boolean

– Support integers through ontologies into boolean variables – Require milliseconds to seconds to evaluate rules

Design of a Scalable Reasoning Engine for DRE Systems

7

Solution Approach

James R. Edmondson

Solution Approach - KaRL Knowledge and Reasoning Language • Evaluated against local context • Supports boolean logic • Supports reinforcement learning • Supports multi-valued logic (not fuzzy logic)

High Performance Reasoning Engine • Written in C++ (fast) • Interprets the new language • Disseminates knowledge across network to other contexts with DDS • Provides both synchronous blocking and asynchronous eval semantics Design of a Scalable Reasoning Engine for DRE Systems

8

Solution Approach

James R. Edmondson

About the Knowledge Engine • Supports many types of complex many-valued logics – – – –

2-logics, 3-logics, 4-logics Top (via the ; operator, e.g. 3 ; 4 ; 5 == 5) Conjunction (&&), Disjunction (||), Implication (=>) For n-logics, can use division (/), remainder (%), addition (+), subtraction (-), etc. • N is limited to +/- 2^63 values in KaRL engine

• KaRL engine is extensible C++ middleware – – – –

Include headers and link to the library to use Transports can be added by overriding three functions Library is Doxygen commented Open source under a BSD license

Design of a Scalable Reasoning Engine for DRE Systems

9

Solution Approach

James R. Edmondson

Engine Semantics • All global knowledge mutations within a logic are aggregated together to form a knowledge update – Local knowledge is specified with a period prefix (e.g., .local) – Global knowledge does not have a period prefix (e.g., Global)

• Global ordering of knowledge updates via Lamport clocks per variable and update with host:ephemeral port tie breakers

• High knowledge quality can be specified to override lower importance publishers – Quality timeouts can be specified so publisher is not high priority forever Design of a Scalable Reasoning Engine for DRE Systems

10

Case Study

James R. Edmondson

KaRL Case Study C1 Logic

C6 Logic

Init: C2.ready Post: C1.ready=1

Init: C1.ready && C2.ready Post: C6.ready=1

C2 Logic

C7 Logic

Init: Post: C2.ready=1

Init: C4.ready Post: C7.ready=1

C3 Logic

C8 Logic

Init: Post: C3.ready=1

Init: C3.ready && C7.ready Post: C8.ready=1

C4 Logic

C9 Logic

Init: C3.ready Post: C4.ready=1

Init: C4.ready && C10.ready Post: C9.ready=1

C5 Logic

C10 Logic

Init: C2.ready && C3.ready && C7.ready Post: C5.ready=1

Init: C5.ready Post: C10.ready=1

Design of a Scalable Reasoning Engine for DRE Systems

11

Example

James R. Edmondson

Switches and subsumed knowledge (earlier presentation) • From earlier presentation – If switch is on, then the lights are on – If the switch is on and the switch is OK then the lights are on

• In KaRL – Switch.on => ++Lights.on (can also do Lights.on = 1) – Switch.on && Switch.OK => ++Lights.on (or Lights.on = 1)

• Adding the new rule does not force a recomputing of the knowledge unless you explicitly clear the knowledge base – Saves computation time and allows the user to construct simple logics with known consequences Design of a Scalable Reasoning Engine for DRE Systems

12

Experimental Results

James R. Edmondson

Latency of the KaRL Engine Reasoning engine latency • •

Evaluates knowledge rules in nanoseconds Performs faster with longer rule sheets and logics

Dissemination latency • • • •

Round trip time divided by 2 KaRL Logic is shown in Table 2.3 Compilation time is one-shot One-to-all latencies in microseconds

Design of a Scalable Reasoning Engine for DRE Systems

13

Future Work

James R. Edmondson

Upcoming enhancements •





Fuzzy logic – Support for doubles as first class support – Weak conjunctions/disjunctions, etc. String support – For a more integrated knowledge and reasoning experience – Typical string manipulation constructs (e.g., concatenation) Faster – Compilation of string lookups to array indices rather than hash maps • Variables • Logics • Likely to increase speed by 20-50%



Timed evaluation blocks – Incremental evaluation of rules as the system has time



External functions (C++ or other languages) Design of a Scalable Reasoning Engine for DRE Systems

14

Conclusion

James R. Edmondson

Concluding Remarks •

The KaRL engine beat our targets – Capable of interpreting knowledge rules in nanoseconds – Local evaluations are clocking in at up to 1.6 mhz – Has worked for us with real-time knowledge and reasoning on DARPA projects



Dissemination latency is dependent on the transport – User has ability to specify unreliable transport but reliable is recommended – DDS is the default transport – User may implement their own UDP- or TCP-based protocols



The KaRL engine is open source and well documented – http://madara.googlecode.com – Any questions or comments? [email protected]

Design of a Scalable Reasoning Engine for DRE Systems

15

Design of a Scalable Reasoning Engine for Distributed ...

Dec 13, 2011 - Distributed, Real-time and Embedded Systems. KSEM 2011 Paper Discussion .... Open source under a BSD license. Solution Approach ...

453KB Sizes 1 Downloads 254 Views

Recommend Documents

a scalable sparse distributed neural memory model
6.10 Average recovery capacity of the memory with error bits . . . . . 83 ... 9.6 Virtual environment . .... diction, machine vision, data mining, and many others.

A Scalable Distributed QoS Multicast Routing Protocol
Protocol. Shigang Chen. Department of Computer & Information Science & Engineering ... the system requirements; it relies only on the local state stored at each router. ... routing algorithms that search a selected subset of the network to find feasi

A distributed system architecture for a distributed ...
Advances in communications technology, development of powerful desktop workstations, and increased user demands for sophisticated applications are rapidly changing computing from a traditional centralized model to a distributed one. The tools and ser

Design of Optimal Quantizers for Distributed Source ...
Information Systems Laboratory, Electrical Eng. Dept. Stanford ... Consider a network of low-cost remote sensors sending data to a central unit, which may also ...

Contract-oriented design of distributed applications: a tutorial
For instance, consider a naıve online store with the following behaviour: ... Some recent works have studied honesty at the specification level, using the process calculus ...... Science of Computer Programming, 109:36 – 60, 2015. [6] Massimo ...

Contract-oriented design of distributed applications: a tutorial
Developing service-oriented applications is a challenging task: programmers ... For instance, consider a naıve online store with ... skeletal Java programs, implementing the required contract-oriented in- ..... isHonest(StoreHonest.class), which ret

Design of a Distributed Localization Algorithm to ...
GPS to jamming) by providing a cheap, low-power alternative that can exploit existing, readily ... In the robotic domain, angular sensors (e.g., monocular ...

Scalable Web Reasoning using Logic Programming ...
One of the key issues for the uptake of the Semantic Web idea is the availability ... than relying on the more generic WAM execution model. ..... Superset builder.

Recursion in Scalable Protocols via Distributed Data Flows
per explains how with our new Distributed Data Flow (DDF) ... FROM RECURSION TO DATA FLOWS ... Thus, the crash of B3 and joining of B4, B5, should.

Recursion in Scalable Protocols via Distributed ... - Research at Google
varies between local administrative domains. In a hierarchi- ... up to Q. How should our recursive program deal with that? First, note that in ... Here, software.

A Survey of Indexing Techniques for Scalable Record Linkage and ...
A Survey of Indexing Techniques for Scalable Record Linkage and Deduplication..pdf. A Survey of Indexing Techniques for Scalable Record Linkage and ...

Towards Scalable MAC Design for High-Speed ...
message with NULL frame, which is a data frame without any payload. Table 1 lists the protocol overhead as the frac- tion of idle stations increases.4 The ...

Biologically Inspired Design Principles for Scalable ...
activated by other immune system cells, that B cell produces a large and variable ..... [10] A. Somayaji and S. Forrest, “Automated response using system-call delays”, In: ... Systems, 8th International Conference, ICARIS 2009, Lecture Notes in.

Biologically Inspired Design Principles for Scalable ...
impact of innovations in online social networks. We review design ... when physical distance makes communication more costly. ... response (but see [10]). Here ...

Biologically Inspired Design Principles for Scalable ...
novel events, particularly given data distributed across multiple platforms in a variety of ... and removing an unknown needle in a very large haystack. Traditional ...

Biologically Inspired Design Principles for Scalable ...
social or physical distance makes long distance communication more costly. ...... [10] A. Somayaji and S. Forrest, “Automated response using system-call delays” ...

Leveraging Sharding in the Design of Scalable ...
Most if not all datacenter services use sharding and repli- cation for ... Because of this design, and the use of ... the face of network partitioning, in exchange for.

Leveraging Sharding in the Design of Scalable ... - Ymir Vigfusson
in Paxos and Quorum Replication systems, is not only expensive in terms of resources, ...... 10th Symposium on Operating Systems Design and. Implementation ...

A Distributed Approach for the Federation of ...
make them exchange information about published services. The paper ... To this end, in September 2000, BEA, IBM, and Microsoft started. UBR (UDDI Business ...

A framework for parallel and distributed training of ...
Accepted 10 April 2017 ... recently proposed framework for non-convex optimization over networks, ... Convergence to a stationary solution of the social non-.

Design of Scalable & Simple SIP Application Development ... - IJRIT
Jun 10, 2013 - enterprise emergency notification, mobile conferencing, ... IM to Conferencing, mobile multiplayer gaming, toll-free calling, location based ...