evaluating centralized, hierarchical, and networked architectures for rule systems benjamin craig...
Post on 26-Dec-2015
219 Views
Preview:
TRANSCRIPT
Evaluating Centralized,Evaluating Centralized, Hierarchical, and Networked Hierarchical, and Networked
Architectures for Rule SystemsArchitectures for Rule Systems Benjamin CraigBenjamin Craig
University of New BrunswickUniversity of New Brunswick
Faculty of Computer ScienceFaculty of Computer Science
Fredericton, NB, CanadaFredericton, NB, Canada
Senior Technical Report Presentation Senior Technical Report Presentation
November 20, 2008November 20, 2008
22
OutlineOutline Defining the TerminologyDefining the Terminology
Rules, Distributed Systems, Topologies, OO Rules, Distributed Systems, Topologies, OO jDREW, Rule ResponderjDREW, Rule Responder
Topologies for distributed ArchitecturesTopologies for distributed Architectures Star Topology Advantages and Star Topology Advantages and
DisadvantagesDisadvantages P2P Topology AdvantagesP2P Topology Advantages
Knowledge Maintenance for Rule SystemsKnowledge Maintenance for Rule Systems Knowledge OrganizationKnowledge Organization Knowledge MaintenanceKnowledge Maintenance
ConclusionConclusion
33
What is a rule?What is a rule? Fact (POSL format):Fact (POSL format):
spending(Peter Miller, min 5000 euro, last year).spending(Peter Miller, min 5000 euro, last year).
Rule (POSL format):Rule (POSL format):
premium(?Customer)premium(?Customer) :- :- spending(?Customer, min 5000 euro, last year).spending(?Customer, min 5000 euro, last year).
A deductive rule engine can deduce that A deductive rule engine can deduce that Peter Miller is a premium customer from his Peter Miller is a premium customer from his spendingspending
44
Distributed SystemsDistributed Systems
A distributed system is a set of computer processes that appear to the user as a single system
The distributed system must coordinate all of these processes
Distributed systems are implemented using middleware that creates a communication topology
55
Hierarchical - Star TopologyHierarchical - Star Topology
Single level hierarchySingle level hierarchy
Connects all spokes with Connects all spokes with a centralized huba centralized hub
All information must be All information must be sent through the hub to sent through the hub to the spokesthe spokes
66
Networked (P2P-Like Architecture)
Fully connected networkFully connected network Connects all nodes together Connects all nodes together
with a direct connectionwith a direct connection Full mesh topologyFull mesh topology
Partially connected Partially connected networknetwork Only a subset of nodes are Only a subset of nodes are
connected togetherconnected together Partial mesh topologyPartial mesh topology
77
OO jDREWOO jDREW
Centralized Rule SystemCentralized Rule System Object Oriented Java Deductive Object Oriented Java Deductive
Reasoning Engine for the Web – Reasoning Engine for the Web – extensions of jDREWextensions of jDREW
Supports rules in two formats:Supports rules in two formats: POSL: POSL: Positional Slotted presentation syntaxPositional Slotted presentation syntax RuleML: RuleML: XML interchange syntaxXML interchange syntax
(can be generated from POSL) (can be generated from POSL)
88
Rule ResponderRule Responder Distributed Rule System Is currently implemented as a hierarchical
rule system Rule Responder is a prototypical
multi-agent system for virtual communities
Supports rule-based collaboration between the distributed members of community
Members are assisted by semi-automated rule-based agents, which use rules to describe the decision and behavioral logic
99
1010
Topology PerformanceTopology Performance
When building a distributed system a When building a distributed system a topology is requiredtopology is required
Distributed topologies all have Distributed topologies all have communication over head that communication over head that centralized systems do not havecentralized systems do not have
A key design goal for distributed A key design goal for distributed systems is to minimize this systems is to minimize this communication over headcommunication over head
1111
Star AdvantagesStar Advantages Isolation of spokes from other spokesIsolation of spokes from other spokes
If one spoke fails then it does not affect If one spoke fails then it does not affect othersothers
Adding and removing spokes in the hub is Adding and removing spokes in the hub is trivialtrivial
Hub provides single point of inspection of Hub provides single point of inspection of all traffic through the topologyall traffic through the topology Improved SecurityImproved Security
Trouble shooting is easyTrouble shooting is easy Easy to understand and implementEasy to understand and implement
1212
Star DisadvantagesStar Disadvantages
Scalability, reliability and performance of the star topology rely on the hub
If the hub fails then the entire system fails
The hub can become overloaded and the system will experience slowdown
To prevent the bottleneck of the star topology a P2P topology can be used
1313
P2P AdvantagesP2P Advantages
Removes bottleneck performance Removes bottleneck performance issues of the star topologyissues of the star topology
Whenever a node is added the total Whenever a node is added the total bandwidth capacity is increasedbandwidth capacity is increased
When a node fails the system will be When a node fails the system will be able to recoverable to recover A peer can act in place of another peerA peer can act in place of another peer
1414
Knowledge Maintenance forKnowledge Maintenance for Rule Systems Rule Systems
A distributed system can have many A distributed system can have many different knowledge bases different knowledge bases distributed across the systemdistributed across the system Each knowledge base acts as a moduleEach knowledge base acts as a module Many files and databasesMany files and databases
A centralized system has all of the A centralized system has all of the knowledge stored in a single locationknowledge stored in a single location Either a file or a databaseEither a file or a database
1515
Knowledge Organization - IKnowledge Organization - I
When deciding how to group modules When deciding how to group modules one of two ways can be usedone of two ways can be used Predicate CentricPredicate Centric
All clauses of a predicates are stored in one All clauses of a predicates are stored in one modulemodule
Person CentricPerson Centric All clauses about one person or thing is stored All clauses about one person or thing is stored
in one modulein one module Rule Responder uses person centric Rule Responder uses person centric
organizationorganization example on next slideexample on next slide
1616
Knowledge Organization - IIKnowledge Organization - II
Predicate Centric: phoneOf(ben, 1-506-270-3403) phoneOf(jim, 1-506-275-9712) emailOf(ben, ben.craig@unb.ca) emailOf(jim, jim.lorde@unb.ca)
Person Centric: phoneOf(ben, 1-506-270-3403) emailOf(ben, ben.craig@unb.ca) phoneOf(jim, 1-506-275-9712) emailOf(jim, jim.lorde@unb.ca)
1717
Module BoundariesModule Boundaries
When querying modules sometimes When querying modules sometimes information from multiple modules is information from multiple modules is requiredrequired
Example Query Example Query ““What are the phone numbers of everyone What are the phone numbers of everyone
in the organization?”in the organization?” This query must backtrack across multiple This query must backtrack across multiple
modules when using person centric modules when using person centric storagestorage
1818
Centralized MaintenanceCentralized Maintenance
All knowledge is stored in a single All knowledge is stored in a single locationlocation Updating knowledge is simpleUpdating knowledge is simple Can better avoid/repair knowledge Can better avoid/repair knowledge
inconsistenciesinconsistencies All knowledge is stored in a single All knowledge is stored in a single
formatformat No translation steps when using a rule No translation steps when using a rule
engine to execute the rules and factsengine to execute the rules and facts
1919
Distributed MaintenanceDistributed Maintenance
Knowledge is stored in a many locationsKnowledge is stored in a many locations Each agent can separately update their own Each agent can separately update their own
knowledgeknowledge Knowledge bases could be incomplete or Knowledge bases could be incomplete or
inconsistentinconsistent Integrity rules can be used to test if the knowledge Integrity rules can be used to test if the knowledge
is complete and consistentis complete and consistent
Knowledge is stored in many formatsKnowledge is stored in many formats Translation steps are required when sending a Translation steps are required when sending a
query from one rule engine to anotherquery from one rule engine to another An interchange language is requiredAn interchange language is required
2020
Benchmarking Use CaseBenchmarking Use Case
RuleML-20xy SymposiaRuleML-20xy Symposia An organizational agent acts as the single An organizational agent acts as the single
point of entry to point of entry to assistassist with symposium with symposium planning:planning:
Currently, query answering about the symposium Currently, query answering about the symposium Ultimately, preparing and running the symposium Ultimately, preparing and running the symposium
Personal agents have supported Personal agents have supported symposium chairs since 2007 (deployed symposium chairs since 2007 (deployed as as Q&AQ&A in 2008) in 2008)
General Chair, Program Chair, Panel Chair, General Chair, Program Chair, Panel Chair, Publicity Chair, etcPublicity Chair, etc..
2121
Queries UsedQueries Used
1) Sponsoring the symposium1) Sponsoring the symposium
2) Check panel participants2) Check panel participants
3) View symposium sponsors3) View symposium sponsors
4) View organization partners4) View organization partners
5) 5) Check panel timeCheck panel time
2222
OO jDREW (centralized) OO jDREW (centralized) BenchmarkingBenchmarking
Query: Computation Time (ms):1) 141 2) 313) 224) 185) 16 Results show that a centralized system
does not take much computation time Queries do not require heavy computation
2323
Rule Responder (Rule Responder (Hierarchical) BenchmarkingBenchmarking
Same 5 queries used as in the OO jDREW bench Same 5 queries used as in the OO jDREW bench markingmarking
Query: Computation Time (ms):1) 3430 2) 48613) 40574) 90485) 2780 Increase in computation time due to sequential Increase in computation time due to sequential
delivery of answers to the queriesdelivery of answers to the queries Communication overhead of distributed system Communication overhead of distributed system
not compensated by workload distributionnot compensated by workload distribution
2424
Network Performance Network Performance ConsiderationsConsiderations
Speed ups can be obtained using a P2P Speed ups can be obtained using a P2P topologytopology
Instead of all communication going Instead of all communication going 'vertically' through the hub, direct 'vertically' through the hub, direct 'horizontal' communication between 'horizontal' communication between spokes could be often usedspokes could be often used Will reduce the amount of communication Will reduce the amount of communication
steps in the distributed systemsteps in the distributed system The bottleneck issue of a hierarchical The bottleneck issue of a hierarchical
system does not exist in a networked system does not exist in a networked systemsystem
2525
ConclusionConclusion
A rule system can be either distributed or A rule system can be either distributed or centralizedcentralized
When using a distributed system the When using a distributed system the communication topology must be decidedcommunication topology must be decided
The topology should reflect the modularization The topology should reflect the modularization decision about the distributed rule systemdecision about the distributed rule system
The advantages and disadvantages of distributed The advantages and disadvantages of distributed knowledge maintenance must be weighted when knowledge maintenance must be weighted when building a rule systembuilding a rule system
Our initial benchmarks, not requiring heavy Our initial benchmarks, not requiring heavy computation, show increase in computation time computation, show increase in computation time for a distributed Hierarchal systemfor a distributed Hierarchal system
Only distributed networked system will *scale* to Only distributed networked system will *scale* to the Webthe Web
top related