© Donald F. Ferguson, 2014. All rights reserved. Topics in Computer Science: Modern Internet Service Oriented Application Development Lecture 8: IPaaS.

Slides:



Advertisements
Similar presentations
Ontology-Based Computing Kenneth Baclawski Northeastern University and Jarg.
Advertisements

Welcome to Middleware Joseph Amrithraj
Visual Scripting of XML
SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION
Chapter 10 THINKING IN OBJECTS 1 Object Oriented programming Instructor: Dr. Essam H. Houssein.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
Programming Creating programs that run on your PC
16/13/2015 3:30 AM6/13/2015 3:30 AM6/13/2015 3:30 AMIntroduction to Software Development What is a computer? A computer system contains: Central Processing.
Software Factory Assembling Applications with Models, Patterns, Frameworks and Tools Anna Liu Senior Architect Advisor Microsoft Australia.
Describing Syntax and Semantics
Audumbar Chormale Advisor: Dr. Anupam Joshi M.S. Thesis Defense
Oakkar Fall The Need for Decision Engine Automate business processes Implement complex business decision logic Separation of rules and process Business.
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
UNIT-V The MVC architecture and Struts Framework.
MDC Open Information Model West Virginia University CS486 Presentation Feb 18, 2000 Lijian Liu (OIM:
Introduction to High-Level Language Programming
Managing Large RDF Graphs (Infinite Graph) Vaibhav Khadilkar Department of Computer Science, The University of Texas at Dallas FEARLESS engineering.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
5/5/2005Toni Räikkönen Internet based data collection from enterprises using XML questionnaires and XCola engine CoRD Meeting May 11th 2005.
Semantic Web. Course Content
Imperative Programming
Ontology Development Kenneth Baclawski Northeastern University Harvard Medical School.
Practical RDF Chapter 1. RDF: An Introduction
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
XML and its applications: 4. Processing XML using PHP.
Knowledge representation
Introduction to Database Systems Fundamental Concepts Irvanizam Zamanhuri, M.Sc Computer Science Study Program Syiah Kuala University Website:
CSCI-383 Object-Oriented Programming & Design Lecture 13.
DEPICT: DiscovEring Patterns and InteraCTions in databases A tool for testing data-intensive systems.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
WSMX Execution Semantics Executable Software Specification Eyal Oren DERI
Question of the Day  On a game show you’re given the choice of three doors: Behind one door is a car; behind the others, goats. After you pick a door,
File Systems and Databases Lecture 1. Files and Databases File: A collection of records or documents dealing with one organization, person, area or subject.
Chapter 6 Server-side Programming: Java Servlets
FlexElink Winter presentation 26 February 2002 Flexible linking (and formatting) management software Hector Sanchez Universitat Jaume I Ing. Informatica.
Department of computer science and engineering Two Layer Mapping from Database to RDF Martin Švihla Research Group Webing Department.
Semantic Web Constraint Language complement and the editor development in Protégé Piao Guangyuan.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
Ontology-Based Computing Kenneth Baclawski Northeastern University and Jarg.
Overview of Form and Javascript fundamentals. Brief matching exercise 1. This is the software that allows a user to access and view HTML documents 2.
1. 2 Preface In the time since the 1986 edition of this book, the world of compiler design has changed significantly 3.
User Profiling using Semantic Web Group members: Ashwin Somaiah Asha Stephen Charlie Sudharshan Reddy.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
ModTransf A Simple Model to Model Transformation Engine Cédric Dumoulin.
A Portrait of the Semantic Web in Action Jeff Heflin and James Hendler IEEE Intelligent Systems December 6, 2010 Hyewon Lim.
© Donald F. Ferguson, All rights reserved. Topics in Computer Science: Modern Internet Service Oriented Application Development Lecture 8: IPaaS.
XML and Distributed Applications By Quddus Chong Presentation for CS551 – Fall 2001.
OWL (Ontology Web Language and Applications) Maw-Sheng Horng Department of Mathematics and Information Education National Taipei University of Education.
Introduction The concept of a web framework originates from the basic idea that every web application obtains its foundations from a similar set of guidelines.
INTRO. To I.T Razan N. AlShihabi
Witold Staniszkis Empowering the Knowledge Worker End-User Software Engineering in Knowledge Management Witold Staniszkis
Introduction to Databases
Building Enterprise Applications Using Visual Studio®
CST 1101 Problem Solving Using Computers
The Semantic Web By: Maulik Parikh.
CSCI-235 Micro-Computer Applications
LOCO Extract – Transform - Load
MongoDB Er. Shiva K. Shrestha ME Computer, NCIT
XML QUESTIONS AND ANSWERS
Object-Oriented Programming & Design Lecture 14 Martin van Bommel
Un</br>able’s MySecretSecrets
Spreadsheets, Modelling & Databases
Developing and testing enterprise Java applications
Tonga Institute of Higher Education IT 141: Information Systems
Query Optimization.
Tonga Institute of Higher Education IT 141: Information Systems
Rule Engine Concepts and Drools Expert
Presentation transcript:

© Donald F. Ferguson, All rights reserved. Topics in Computer Science: Modern Internet Service Oriented Application Development Lecture 8: IPaaS and Rules Programming Dr. Donald F. Ferguson (Admin:

2 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Contents

3 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Contents A couple of Boomi/ESB patterns –Select Distinct –Lookup tables –Simple Join Rules programming –Conceptual model and motivation –Tools –Some simple approaches to rules –Decision tables –Decision trees –Some rules –Observations Discussion and final project

4 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming A Couple of Boomi/IPaaS Patterns

5 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Select Distinct and Table Lookup Problem statement: I have a spreadsheet with rows for students in the class. I want to: –Find the set of schools, with one entry for each school. A given school may have several students in the class. –Map the distinct school codes to “human readable names.”

6 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Simple Join We have seen manipulation of single documents, e.g. –PROJECT (do not pass fields through maps). –Transform between profile types, and between schema. –Operations on fields, e.g. trim whitespace. How do I JOIN two documents into a single document? For example, –…/posts (blog) posts have user ID, title, comment, etc. –…/users has user ID and name –I want a single document with {user name, post ID, title} that merges information from two sets of documents. JOIN activity/steps JOIN clause SELECT posts.*, users.username FROM posts INNER JOIN users WHERE posts.userid==users.id

7 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Rules Programming

8 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Conceptual Model

9 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Flexible Implementation – Some of which we will Cover REST Imperative languages Java PHP JavaScript “Programming in the Large:” State changes Graph based orchestration of “Programming in the Small” Using BPMN and Activit ESB/Data/Message Flows: Route Split Map/transform Using Boomi. Now it’s time for Business rules.

10 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Rule and Rule Set A rule is a statement of the form –IF (When) (…) –THEN { s1; s2; …} A rule set –Is a set of rules –Sharing a set of objects –That are the scope of IF –And what s1, … change. Isn’t this just “code?” –Well yes, but in “code” –The rule flow is fixed by the order and nesting of “if … then … else …}. –The rule set is fixed by what you entered in Eclipse/emacs and compiled. –In a rule engine, the engine –Reads a data file containing rules and facts. –And there is an API for dynamically adding rules and facts to a running engine. –Similar to the way Activiti reads an XML file defining a process.

11 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Why Use a Rule Engine? Flexibility Sometimes, you can write down all the rules but cannot easily figure out which ones to apply when and in which order, and you sometimes figure out new rules by watching the answer the running system produces. Logic and Data Separation Breaking your domain objects from business rules can lead to a much easier to maintain application as it can shield from changes in the future, since the logic is all laid out in rules. Speed and Scalability Many times we apply "if" conditions that we didn't really need. The Rete algorithm, as implemented by Drools, replaces all of the if... then statements with an optimized network. Centralization of Knowledge By using rules, you create a repository of knowledge (a knowledgebase) which can be considered as a single point of truth, for business policy (for instance) - ideally rules are so readable that they can also serve as documentation Tool Integration Writing rules means also to get accustomed with Rule language, validation and debugging. Eclipse provide an excellent tool to deliver and test your Rules. Understandable Rules Using tools and rule templates facilitates collaborative design of business policy/rules between business professionals and software developers, similar to how BPMN facilitates collaborative design of business processes.

12 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Rules Engine – Drools (xxx.drl) Load rules and facts Modify rules and facts.

13 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Tools

14 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Three Core Concepts Editor Tools Rule Set “xxx.drl” file “Engine”

15 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Structured Text Rule Definition Business professionals (or others) can provide the high-level structure for rules Using a “constrained” language with predefined “words” and “clauses,” e.g. –“There exists” –“An {x} with property {y}” –“Property {p} of {x} is …” The editor has popups allowing selection of valid terms, words, clauses, etc. The tool “generates” the “code” for final implementation by a programmer.

16 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Rich Developer Tools

17 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Debugger Reveals Big Picture Current rule/thread. Location in source. Variables for the rule. Inferencing graph. What rules and working memory changes got me here. Current working memory.

18 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Some Simple Rule Models

19 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Decision Table Suppose –I have a load application with properties period, amount, … –And want to produce approved/denied, rate, … A very common, intuitive is “look it up in a table.”

20 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Decision Table Tool

21 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Maps To/From Intuitive, Understood Spreadsheet Model

22 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Decision Table Intuitive model for combining reusable rules that mirrors a common way people think about solving a problem.

23 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Some Rules

24 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Rule and Example

25 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Some “ When ” Examples

26 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Some More Examples

27 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Some More Examples

28 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Some More Examples

29 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming You Get the Picture The working memory is a set of –JavaBean classes. –A set of instances of the class. There is a query language for building query statements –Finding an instance of a type whose properties match a pattern. –Boolean combinations in statements. –Existence and non-existence. –etc. You can bind variables to a properties of a matched fact for use in subsequent statements. But remember, every (power) set of facts that meets the “When” condition is logically chosen for the rule, e.g. –$c : Cat() –$d : Dog() matches every pair of a Dog and a Cat.

30 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming “ Then ” Example

31 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming “ Then ” The “Then” clause can be –Pretty much any Java code. –And has access to “facts” that were matched in the “When” clause. There are some guidelines/best practices –Avoid –if … then … else … and similar constructs. –While … –For … and other control flow constructs because adding control flow to a “declarative, no explicit control” programming model defeats the whole purpose. –Typically, then “When” clause –Creates, removes or changes properties of facts. –Invokes “services APIs”

32 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Semantic Web Application Platform – SWAP “ The Modern Internet Perspective ” Resource Description Framework (RDF) Is a language for representing information about “resources” in the World Wide Web. Treats the WWW liked a gigantic, typed web of facts As opposed to a web of documents.

33 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Semantic Web Application Platform – SWAP “ Cwm is the Modern Internet Rules Perspective ” Cwm (pronounced coom) is –A general-purpose data processor for the semantic web –It is a forward chaining reasoner which can be used for –Querying –Checking –Transforming –Filtering information (RDF)

34 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Some Examples

35 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Observations General observations –Rules is a popular and powerful approach to implementing services. –There are a lot of languages, engines and models. –Rules are a powerful way of “collaboration” between –Business professionals. –Engineering/SW developers. –The full power can be complex and counter-intuitive. –But there are some very models that are very intuitive, e.g. Decision Tables. The Internet/web has an emerging model similar to rules –Resource Description Framework –Web Ontology Language (OWL) –Closed World Model (Cwm) –N3 – RDF serialization Exciting, but not sure how much uptake is really happening.

36 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Final Project

37 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 9: IPaaS Continued and Rules Programming Final Project Implement a REST service using a rule engine of your choice. –The implementing is a rule file that you load, e.g. a.drl file. –The working memory –Is a set of resource types –A set of resource instances –The REST API CRUDs resource instances. –Which triggers the rule engine to modify facts in working memory. –Enabling GET to retrieve new and/or updated facts. Your solutions must have –3 simple resource types of your choice. –10 simple rules. –You can start with one of the many examples. This is a group project. One project/team.