1 / 52

Research: BAM, Ajax View, And Doloto

Research: BAM, Ajax View, And Doloto.  Emre K ıcıman Researcher Microsoft Corporation.  Ethan Jackson Post Doc Researcher Microsoft Corporation. End-To-End Service Development. BAM. Ajax View. Doloto. Model-Based Development Of Cloud Applications: BAM.  Ethan Jackson

monet
Download Presentation

Research: BAM, Ajax View, And Doloto

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Research: BAM, Ajax View, And Doloto  Emre KıcımanResearcher Microsoft Corporation  Ethan JacksonPost Doc Researcher Microsoft Corporation

  2. End-To-End Service Development BAM Ajax View Doloto

  3. Model-Based Development Of Cloud Applications: BAM  Ethan Jackson RiSE – MSR Redmond Microsoft Corporation  Wolfram Schulte RiSE – MSR Redmond Microsoft Corporation

  4. The Challenge Of Cloud ComputingThe weather might be stormy We want the “Internet-as-a-Platform,” but how can we: Master necessary implementation technologies ? Predict behavior of the overall application? • 1. Distributed Systems Programming • 2. Web Development • 3. Uncertainty of Computer Fabric

  5. Use Models To Develop CloudsYour model is your weather man BAM provides technology-independent abstractions for modeling cloud applications. Ask the model how the system behaviors, pre-implementation. Then, synthesize implementation from the model.

  6. The Building Blocks Of A Cloud A node is an independent process containing some structured data. The type of the node determines the type of data it can contain. User Credentials Maps MP3s Nodes can (logically) connect, making point-to-point information exchange possible. A cloud is a collection of these nodes. Operations modify data. Invariants check data for consistency. Nodes can initiate operations; one or more nodes may violate invariants.

  7. Dealing With DynamicsExtending invariants and operations Invariants and operations are understood over the maximal cliques; i.e. the largest pair-wise connected subgraphs. Evolving Cloud Union data on {2,6} then check invariants Union data on {0,1,2} then check invariants The system is stable is all maximal cliques satisfy invariants.

  8. More About Maximal Cliques Architect understands specs over highly symmetric, logically local regions of the cloud The maximal cliques are regions of the network that can directly work together to perform operations.

  9. demo The Cloud

  10. Modeling Cloud ApplicationsParts of a BAM model Data Specs Operation Specs Access Policies Abstract database schema Declarative queries that identify inconsistent databases Set of operations that can manipulate the database Types of agents in the cloud Data access rights of each agent Communication capabilities of each agent BAM Technology-Independent Abstractions Analysis, Simulation, Code generation

  11. Modeling Cloud ApplicationsRunning example Document Management System Authorized users can view, create, and modify their documents, from a local client. (Data, Operations, Access Control) Authorized users can manage their documents, even if not connected to a server. (Asymmetry, Connectivity) One or more servers synchronize with clients to record the latest versions of document. (Consistency)

  12. Data SpecificationAbstract database We do not specify foreign keys or specific implementation of containment, etc…

  13. Data SpecificationDeclarative queries

  14. Data SpecificationConsistency rules

  15. Operation SpecificationQueries with actions Operations also query the database, but then modify it for each successful query.

  16. Operation SpecificationAnother example Operations can be used to model synchronization actions.

  17. Agent TypesCommunication Policies The legal communication paths between agent types Data access rights for agent types.

  18. Extending Operations Over CloudsMaximal cliques Synchronize Operation Synchronize Operation Create New Document Operations are extended over the cliques, but by applying data access rights first.

  19. demo A Preview of What We Defined

  20. Review Of A BAM Model Data Specs Operation Specs Access Policies What you provide – A BAM Model Abstract Database Consistency Extension over maximal cliques What it means – Powerful technology-independent abstraction BAM Simulation and Implementation What you get – Simulation and synthesized solution

  21. Overview Of Technology Stack We solve the integration problem once, and reuse through code generators and frameworks. Implementation time was 3 months by a summer intern.

  22. demo Synthesizing A Cloud Application

  23. Implementing A BAM Cloud • Connectivity state PRNP allows one BAM node to discover other nodes with which it may interact. Internet boundary .NET Remotingserves as the primary protocol layer by which nodes request connections and exchange data. Maximal cliques are calculated using a distributed algorithm with heartbeat messages to improve robustness of the overall system.

  24. Generating A Web-based UIVolta Microsoft Volta uses IL-level rewriting to automatically split a system into browser-side and server side tiers. Local lightweight web server Volta Internet boundary Browser with single origin restriction

  25. Conclusion • BAM provides a powerful technology-independent modeling layer to describe cloud applications • Models can be analyzed and simulated to quickly recognize and correct architectural problems • Real code can be synthesized using a state-of-the-art technology stack. As technology changes so can the code generators

  26. Next Up… Ajax View  EmreKıcımanResearcherMicrosoft Research  Ben LivshitsResearcherMicrosoft Research

  27. A Web Application ~ 1 MB code Talks to >14 backend services (traffic, images, search, directions, ads, …) 70k lines of JavaScript code downloaded to the client. 2855 Functions

  28. Lots To See Inside The Web Application • Performance •  Performance profiling •  String optimization; cache placement; … •  Code splitting and joining • Debugging •  Report function arguments, app state, errors •  Memory leak checking •  Statistical debugging • Test •  Code coverage •  A/B tests • Operations •  Measure RPCnetwork latencies • User interaction feedback •  What features are being used / discovered? • Ajax View Power Tool coming soon • ASP.Netplugin • VS integration • Cross-browser • Focus: Perf profiling in test

  29. Ajax View Ajax View Plugin/Proxy Instrumented Applications Logs Goal: Detailed visibility into app behavior on client Approach:“On-the-fly” rewriting to add instrumentation • No client-side changes. Work with existing web applications Low Overhead: Adapt/distribute instr. across users

  30. Server-side Deployment Ajax View Logs My Service Users Logs 3rd Party Service (Mashup, Ads, Gadgets, etc)

  31. demo Ajax View

  32. JavaScript Rewriting • Simple but powerful monitoring • Inspect application state • Observe control flow • Limited only by JS sandbox • Easy deployability • No changes required to original web app • No changes to client-side browsers

  33. Maintaining Low Perf Overhead • Key Enabler: Instant re-deployabilityof web applications • Fine-grained control of code sent to client • 1. Adapt instrumentation over time • Drill-down into problems • Only gather data that is needed • 2. No single user runs all instrumentation code • Split heavy-weight monitoring policies into pieces • Each user gets 1/N of instrumentation code • Data aggregated at service backend

  34. Observe, Analyze, Update Code • Iteratively add logging only where needed • Ex. Auto-Drill-down performance profiling <script> FastFunc1(); FastFunc2(); SlowFunc(); </script> … function SlowFunc() { // drill-down continues } <script> LogTime(); FastFunc1(); LogTime(); FastFunc2(); LogTime(); SlowFunc(); LogTime(); </script> <script> LogTime(); FastFunc1(); FastFunc2(); SlowFunc(); LogTime(); </script> If it’s slow Found it!

  35. Experimental Setup • Profile 90 web sites’ “startup” • Ajax View running as client-side proxy • Plus 6 more JS-heavy news & game sites • Plus 78 sites randomly chosen, weighted by popularity

  36. Expt: AdaptativePerf Profiling Avg 30% reduction in CPU Overhead 95% Avg Reduction in Logging Bandwidth

  37. Fine-grained control of per-user overhead Trades-off detection time Expt: Distributing Expensive Tests Baseline

  38. Ajax View Summary • End-to-end visibility into client-side web applications • Requires no client-side/server-side changes • Distribution and adaptation controls overhead • While maintaining high coverage & detail • Variety of instrumentation policies • Performance profiler, memory leak checker, cache placement, … • Download and extend the prototype • http://research.microsoft.com/projects/ajaxview/ • Supports plug-ins for new instrumentation policies

  39. Next Up… Doloto  EmreKıcımanResearcherMicrosoft Research  Ben LivshitsResearcherMicrosoft Research

  40. Doloto Up to 90% of a Web 2.0 app is JavaScript code!

  41. Doloto • Minimize code downloads • Start with a small piece of code on the client • Download required code on demand (pull) • Send code when bandwidth available (push) • Leads to better application responsiveness • Interleave code download & execution • Faster startup times • Rarely executed code is rarely downloaded

  42. Doloto Steps • [training] Runtime training to collect access profiles • [rewriting] Function rewriting or “stubbing” for on-demand code loading • [prefetch] Background prefetch of clusters as the application is running

  43. Doloto Training Tool • [training] Runtime training to collect access profile (AjaxView Fiddler plugin) • [rewriting] Function rewriting or “stubbing” for on-demand code loading • [prefetch] Background prefetch of clusters as the application is running

  44. Automated Function Splitting var g = 10; var real_f1; function f1() { if(!real_f1){ var code = load(“f1”); real_f1 = eval(code); f1 = real_f1; } return real_f1.apply(this, arguments); } var g = 10; function f1(){ var x=g+1; … … … … … return …; } eval($exp(“f1”), “”); // 21 chars

  45. Size Savings With Doloto

  46. Runtime Savings With Doloto

  47. Conclusions • Monitoring + control  cross-user, large-scale feedback loop • Web app environment gives fine-grained control of code version clients execute • Adaptive, distributed instrumentation for low-overhead, cross-user monitoring • 2 simple examples of using this runtime visibility to help optimize performance • Ajax View: Performance instrumentation • Doloto: Workload-sensitive code splitting

  48. More Information Ethan Jackson (ejackson@microsoft.com) Emre Kıcıman (emrek@microsoft.com) For papers, presentations, and downloads: http://research.microsoft.com/~ejackson/bam.htm http://research.microsoft.com/projects/ajaxview/ http://research.microsoft.com/projects/doloto/

  49. Evals & Recordings Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com

  50. Q&A Please use the microphones provided

More Related