Building Intelligent Mashups

1,590 views
1,480 views

Published on

Published in: Spiritual, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,590
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
42
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Building Intelligent Mashups

  1. 1. Building Intelligent Mashups An Introduction Adrian Giurca BTU Cottbus Dept. of Internet Technologies http://www.informatik.tu-cottbus.de/~agiurca/ http://adrian-giurca.blogspot.com Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  2. 2. About me <ul><ul><li>Adrian Giurca (42 years old) </li></ul></ul><ul><ul><li>I'm with BTU Cottbus from 2005 </li></ul></ul><ul><ul><li>Previously I was with University of Craiova, RO (from 1990) </li></ul></ul><ul><ul><li>I did my PhD (Dr. rer. nat) at University of Bucharest, RO </li></ul></ul><ul><ul><li>During the last 15 years, I taught Logic Programming , Natural Language Processing, Software Engineering , Project Management , Web Technologies , eBusiness Technologies , Semantic Web , and some others. </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  3. 3. This talk is about mashups <ul><ul><li>What is an Intelligent Mashup? </li></ul></ul><ul><ul><li>How to build intelligent mashups? </li></ul></ul><ul><ul><li>This talk is not about data but about software </li></ul></ul><ul><ul><li>Creating content is expensive but using it is much more easy </li></ul></ul><ul><ul><li>We like users to create data and services </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  4. 4. What is a mashup? <ul><ul><li>A mashup is a new song that is mixed from the vocal and instrumental tracks from different source songs ( usually belonging to different genres ). </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009 <ul><ul><li>How the mixing is done gives the value of the mashup </li></ul></ul><ul><ul><li>A Web Mashup is a Web application that is mixed from different other Web applications ( usually belonging to different domains ). </li></ul></ul>
  5. 5. Why we need mashups <ul><ul><li>To increase innovation by unlocking and remixing information in ways not originally planned for. </li></ul></ul><ul><ul><li>To discover new business insights by easily assembling information from multiple sources. </li></ul></ul><ul><ul><li>To reduce development costs through lightweight integration, reuse and sharing. </li></ul></ul><ul><ul><li>To increase agility by supporting dynamic assembly and configuration of applications. </li></ul></ul><ul><ul><li>To speed up the development , usually using visual artifacts </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  6. 6. A Simple Mashup Classification <ul><ul><li>Server-Side Data Mashup – It is still hard to mashup up data across databases from different vendors. </li></ul></ul><ul><ul><li>Server-Side Software Mashup - Service orchestration, service choreography? </li></ul></ul><ul><ul><li>Client-Side Data Mashup - combines remote data (from, feeds, XML, or plain HTML ). New knowledge that didn’t exist before can result. </li></ul></ul><ul><ul><li>Client-Side Software Mashup - the application code is directly integrated in the browser to result in a distinct and new capability. There is a considerable browser potential in being able to easily wire together services into new functionality. </li></ul></ul><ul><ul><li>Presentation Mashup - Showing existent information in another way (e.g. Ajax Based “desktops”). </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  7. 7. IBM Trip Planner <ul><ul><li>Many similarities with typical Web applications </li></ul></ul><ul><ul><li>Low or none user innovation/creativity. Users cannot customize/add services (I want to use my own Weather Service!) … </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  8. 8. iGoogle Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009 <ul><ul><li>… probably the most complex user-defined mashup </li></ul></ul><ul><ul><li>... is a collection of Gadgets </li></ul></ul><ul><ul><li>... but Gadgets are proprietary technology </li></ul></ul><ul><ul><li>… as well Microsoft Gadgets, Apple Widgets, ... </li></ul></ul><ul><ul><li>Users would like to build mashups by mixing from different services and platforms </li></ul></ul><ul><ul><li>Users have to design to build their mashups </li></ul></ul>
  9. 9. Real Mashups are client-side <ul><ul><li>Server-side mashups look like classical server applications but using Data and API’s/Services offered by many platforms (Google, Amazon, Yahoo, YouTube, Flickr, Reuters, CNN, …). They have to be built by skilled programmers </li></ul></ul><ul><ul><li>Client-side mashups are created by users (business people), typically using widgets (as programming components) and feeds (as data components). </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  10. 10. What is an Intelligent Mashup? <ul><ul><li>An Intelligent Mashup uses Artificial Intelligence reasoning techniques to combine different Web Sources (Web Data, Web Services and Web Applications). </li></ul></ul><ul><ul><li>Using both usual data (XML, Atom, RSS, HTML) and Semantic Web data (RDF, RDFS, OWL) allows reasoning on the Semantic Web, too. </li></ul></ul><ul><ul><li>One way doing AI is to embed rule-based reasoning inside mashups . </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  11. 11. Open Issues: Doing Business with Mashups <ul><ul><li>How one can sell a mashup ? (SaaS?) </li></ul></ul><ul><ul><li>What is the lifetime of a mashup ? </li></ul></ul><ul><ul><li>How to deal with the lifetime of the data sources we use? What about services we use? </li></ul></ul><ul><ul><li>What are the legal aspects involved in mashups? </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  12. 12. Open Issues: Modeling, Design and Reasoning <ul><ul><li>What is a mashup information model ? (Ongoing Research on Widgets standards) </li></ul></ul><ul><ul><li>What are the mashup business processes ? (A BPMN extension?) </li></ul></ul><ul><ul><li>How to model the user behavior on the mashup page? (A rule-based model?) </li></ul></ul><ul><ul><li>How to reason on the basis of user activity ? (JSON Rules?) </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  13. 13. Open Issues: Implementation <ul><ul><li>How to catch user activity ? ( users interacts with HTML forms and events (DOM Events)... ) </li></ul></ul><ul><ul><li>What's happening when a data source is unavailable ? Do we have to define exceptions/faults? ( Probably yes ) </li></ul></ul><ul><ul><li>How to prohibit malware code ? ( use frameworks? ) </li></ul></ul><ul><ul><li>How can be implemented widget dependency i.e. how we exchange data between widgets ? ( With forms, events and rules? ) </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  14. 14. Lets Do Intelligent Mashups <ul><ul><li>… software mashups </li></ul></ul><ul><ul><li>… using AI techniques to implement reasoning </li></ul></ul><ul><ul><li>… can play both server-side and client-side: </li></ul></ul><ul><ul><ul><li>server-side: using reasoning engines (rule-based reasoning , description logic based reasoning, …) </li></ul></ul></ul><ul><ul><ul><li>client-side : using client-side reasoning engines (?) </li></ul></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  15. 15. Reasoning inside server-side mashups <ul><ul><li>Old knowledge better infrastructure and technologies </li></ul></ul><ul><ul><ul><li>Classical AI applications tailored by actual technologies (e.g. running Drools instead of CLIPS or running Jena Rules instead of Prolog rules) providing better integration with the existent middleware </li></ul></ul></ul><ul><ul><ul><li>AI based combination of (Semantic) Web Services </li></ul></ul></ul><ul><ul><li>Pros </li></ul></ul><ul><ul><ul><li>Deriving new knowledge assets using well known classical AI applications </li></ul></ul></ul><ul><ul><ul><li>Deriving intelligent Web Services (based on AI integration with actual technologies) aka Semantic Web Services </li></ul></ul></ul><ul><ul><li>Cons </li></ul></ul><ul><ul><ul><li>Need skilled developers </li></ul></ul></ul><ul><ul><ul><li>Less social </li></ul></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  16. 16. Reasoning inside client-side mashups <ul><ul><li>Innovative AI applications using the browser infrastructure and technologies </li></ul></ul><ul><ul><ul><li>combining remote information from different services together with the information derived from the user activity </li></ul></ul></ul><ul><ul><ul><li>using Event-Condition-Action Rules to describe the reasoning </li></ul></ul></ul><ul><ul><li>Pros </li></ul></ul><ul><ul><ul><li>Designed and created by users (No high skilled developers) </li></ul></ul></ul><ul><ul><ul><li>Deriving new knowledge assets (e.g. new feeds) </li></ul></ul></ul><ul><ul><ul><li>Improving the user activity towards live achieving of the user goals </li></ul></ul></ul><ul><ul><li>Cons </li></ul></ul><ul><ul><ul><li>Consume the users hardware resources( Pros?) </li></ul></ul></ul><ul><ul><ul><li>Keep their data on third party servers </li></ul></ul></ul><ul><ul><ul><li>Security at the browser level </li></ul></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  17. 17. 2. How to build intelligent mashups Challenges and potential solutions. What we achieved until now. Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  18. 18. The actual challenges <ul><ul><li>No industry-wide agreement on a widget standard yet. </li></ul></ul><ul><ul><li>Big players try to promote only their own APIs and services </li></ul></ul><ul><ul><li>Security concerns around mashing internal data with external (non trusted?) API </li></ul></ul><ul><ul><li>Potential for malicious, malformed code (rogue widgets) </li></ul></ul><ul><ul><li>Industry looking to establish standard cross-domain secure communication mechanism </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  19. 19. A Proposal: JSON Rules <ul><ul><li>Based on JSON (any rule is a JSON object) </li></ul></ul><ul><ul><li>Uses a Drools-like condition language </li></ul></ul><ul><ul><li>Uses JavaScript function calls as actions </li></ul></ul><ul><ul><li>Supports both Production Rules and </li></ul></ul><ul><ul><li>Event-Condition-Action Rules </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  20. 20. A Simple Rule and its Execution Effect <div class='note'> <ul> <li>First issue</li> <li>Second issue </li> </ul> </div> <div class=&quot;note&quot;> <p>Another note</p> </div> Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009 On any occurrence of a &quot;mouse click&quot; on any element with class='note' having as first child an ul element, change the first child background color to blue. Mouse click
  21. 21. Criticism <ul><ul><li>This can be done immediately with JavaScript and event listeners </li></ul></ul><ul><li>but </li></ul><ul><ul><li>You should register listeners on all necessary elements, or, using event bubbling one may have some simplification </li></ul></ul><ul><ul><li>Event listeners implements just a simple kind of rule: ON event DO Action </li></ul></ul><ul><ul><li>What about much more complex rules? </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  22. 22. Can you do this fast with JS? <ul><ul><li>[Usability] If The user reads Reuters news about swine flu, then deliver him similar news from CNN and possibly update his swine flu Google Map </li></ul></ul><ul><ul><li>[Advertising] If the user loads financial news offers him a three months subscription to Financial Times </li></ul></ul><ul><ul><li>[Accesibility] Whenever the user clicks more than 3 times a menu item add this item to the fast menu items. </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  23. 23. Encoding the rule (JSON Rule) { &quot;id&quot; :&quot;rule101&quot;, &quot;appliesTo&quot; : [ &quot;http://www.mysite.com&quot;, &quot;http://www.google.com/&quot; ], &quot;eventExpression&quot; : { &quot;type&quot; : &quot;click&quot;, &quot;target&quot; : &quot;$X&quot; }, &quot;conditions&quot; : [ &quot;$X:Element( class == 'note', $Y:firstChild)&quot;, &quot;$Y.tagName == 'ul'&quot; ], &quot;actions&quot; : [ &quot;changeBackground($Y, 'blue')&quot; ] } Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009 On any occurrence of a DOM click on any element with class='note' having as first child an ul element, change the first child background color to blue.
  24. 24. Basic components and roles Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  25. 25. Internal Encoding (plain JSON) {&quot;id&quot;: &quot;rule101&quot;, &quot;priority&quot;: 1, &quot;appliesTo&quot;: [&quot;http://www.mysite.com&quot;,&quot;http://www.google.com/&quot;], &quot;eventExpression&quot;:{ &quot;type&quot;:&quot;click&quot;, &quot;target&quot;:{&quot;variable&quot;:{&quot;name&quot;:&quot;$X&quot;}} }, &quot;condition&quot;:[ {&quot;description&quot;: {&quot;type&quot;:1, &quot;binding&quot;: {&quot;variable&quot;:{&quot;name&quot;:&quot;$X&quot;}}, &quot;constraints&quot;:[ {&quot;propertyRestriction&quot;:{&quot;property&quot;:&quot;class&quot;, &quot;operator&quot;:&quot;EQ&quot;, &quot;value&quot;:&quot;note&quot; } }, {&quot;propertyBinding&quot;:{&quot;property&quot;:&quot;firstChild&quot;, &quot;variable&quot;:{&quot;name&quot;:&quot;$Y&quot;} } } ] } }, {&quot;javaScriptBooleanCondition&quot;:&quot;$Y.tagName == 'ul'&quot;} ], &quot;actions&quot;:[ { &quot;functionName&quot;:&quot;changeBackground&quot;, &quot;functionArgs&quot;:[&quot;$Y&quot;,&quot;blue&quot;] } ] } Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  26. 26. Basic engine activities Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009 © E. Pascalau & A. Giurca (submitted paper at KESE 2009)
  27. 27. Using JSON Rules in Mashups <ul><ul><li>Embed the engine: </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009 <ul><ul><li>Create an engine instance and run a ruleset: </li></ul></ul><script type=&quot;text/javascript&quot; src=&quot;http://.../jsonRulesEngine_Version.js&quot;> </script> var ruleSystem = new org.jsonrules.JSONRulesMainSystem(); ruleSystem.run(&quot;http://.../rulesRepo.txt&quot;); <ul><ul><li>The mashup is ready to be used. The event manager listens for all DOM events and possible user-defined events and triggers corresponding rules accordingly. </li></ul></ul>You are not constraint on using only rules
  28. 28. Benefits and Drawbacks (1) <ul><ul><li>Easy Modeling – rules are a natural way to express things and relationships (are they ?) </li></ul></ul><ul><ul><li>Complex business workflows ( mBPMN? ); </li></ul></ul><ul><ul><li>Declarative programming - (Some people like rules some others not). </li></ul></ul><ul><ul><li>Information can be fetched and displayed in anticipation of the user response ; </li></ul></ul><ul><ul><li>Support for intelligent user interfaces </li></ul></ul><ul><ul><li>Allow re-syndication </li></ul></ul><ul><ul><li>Service aggregation - Using ECA rules </li></ul></ul><ul><ul><li>Move the reasoning process to the client-side resulting in reduced network traffic and faster response ; </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  29. 29. Benefits and Drawbacks (2) <ul><ul><li>Search based on public Web services - via Ajax </li></ul></ul><ul><ul><li>Complex side effects - Rule actions allow any JavaScript function call </li></ul></ul><ul><ul><li>Any presentation layer - Induced by CSS availability (CSS is rule-based too) </li></ul></ul><ul><ul><li>Pages can be updated in response to the user input, including the usage of cached data ; </li></ul></ul><ul><ul><li>Speed - Scalability tests should be performed </li></ul></ul><ul><ul><li>Stability - As much as any other JavaScript-based application </li></ul></ul><ul><ul><li>Security - As much as any other JavaScript-based application </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  30. 30. Past and Present Work <ul><ul><li>Analysis on basic mashup platforms (IBM Mashup Editor, Yahoo Pipes, Semantic Pipes, Microsoft Popfly, Google Mashup Editor) towards a top level ontology for defining mashup concepts (final stage – report will came soon) </li></ul></ul><ul><ul><li>A Rule Language tailored to the DOM Processing supporting ECA Rules (different extensions wait their time) </li></ul></ul><ul><ul><li>A Rule Engine (final stage - online soon) </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  31. 31. What we don't have but like to <ul><ul><li>An extension of BPMN towards modeling mashup business processes ( mBPMN ) </li></ul></ul><ul><ul><li>mBPMN patterns directly serialized to JSON Rules </li></ul></ul><ul><ul><li>A tool for using mBPMN (Oryx?) </li></ul></ul><ul><ul><li>A complex use case (on the way) </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009
  32. 32. Advertising <ul><ul><li>We spread the world with some publications </li></ul></ul><ul><ul><ul><li>A. Giurca and E. Pascalau. JSON Rules , Proc. of 4 th Knowledge Engineering and Software Engineering, (KESE 2008), at KI 2008, September 23, 2008, Kaiserlautern, Germany. </li></ul></ul></ul><ul><ul><ul><li>E. Pascalau and A. Giurca. Towards enabling SaaS for Business Rules. ISM'2009, March 23-24, 2009, Leipzig, Germany. </li></ul></ul></ul><ul><ul><ul><li>E. Pascalau and A. Giurca. A Rule-Based Approach of Creating and Executing Mashups , 9 th IFIP Conference on e-Business, e-Services, and e-Society (I3E 2009), September 23-25, 2009, Nancy, France. </li></ul></ul></ul><ul><ul><li>We'll give a tutorial at the 32 nd Annual Conference on Artificial Intelligence (KI 2009) September 15–18, 2009, Paderborn, Germany (available online soon) </li></ul></ul><ul><ul><li>Three more papers are under review ( the engine architecture , the relationship with cloud computing , and the information model of an intelligent mashup ) </li></ul></ul><ul><ul><li>Two Master theses are defined (to be defended in 2010) </li></ul></ul>Future Trends in Service-Oriented Computing, Hasso Plattner Institut, Potsdam, June 18-19, 2009

×