480 likes | 551 Views
RIAlizing Enterprise Applications. AJAX World 2009 Conference, USA, June ‘09. By Sujoe Bose www.dsinedynamics.com. Agenda. Motivation The RIA Challenge RIA Methodology RIA Scalability Model Model Evaluation Conclusion and Future Work. Agenda. Motivation The RIA Challenge
E N D
RIAlizing Enterprise Applications AJAX World 2009 Conference, USA, June ‘09 By Sujoe Bose www.dsinedynamics.com
Agenda • Motivation • The RIA Challenge • RIA Methodology • RIA Scalability Model • Model Evaluation • Conclusion and Future Work
Agenda • Motivation • The RIA Challenge • RIA Methodology • RIA Scalability Model • Model Evaluation • Conclusion and Future Work
Motivation • RIA-Enabling Methodology for Existing Enterprise Applications • Predicting AJAX Scalability • Unavailability of Objective Method • Formal treatment of AJAX side-effects on Performance
Context • RIA-Enabling Existing Enterprise Application • Reuse of investment and infrastructure • Seamless changes to Workflow • Refactoring Interfaces Iteratively for Richer User Experience • Need for a repeatable method • Impact on Scalability • Prediction better than Trial-and-Error
Agenda • Motivation • The RIA Challenge • RIA Methodology • RIA Scalability Model • Model Evaluation • Conclusion and Future Work
The AJAX Conundrum • Page-based approach • Large Objects • Lower frequency of access • AJAX-based • Small Objects • Higher frequency of access • Which one is better as far as scalability is concerned?
Scalability Concern • TCP/IP – Slow Start Algorithm • Congestion and Flow Control • Round-trip overhead: • High for smaller requests • Amortized for larger requests (pipelined transfer) • Increase in Invocation Frequency and Quantity (AJAX Factor)
The RIA Challenge • Shorter reply/responses vs. Larger reply/responses • Frequent reply/responses vs. Infrequent • Page loading interspersed between AJAX bursts • Find the appropriate mix in a disciplined approach
RIA Targets • Look-and-feel • Responsiveness • Modified workflow that is more usable and natural • Moving away from page-centric behavior • Non-functional targets: Stability and Scalability with no Infrastructural upgrades
Advantages of Evolutionary RIA • Find what works and what does not • Experiment without large impact • User’s likes and dislikes • System Performance • Introducing AJAX has some System side-effects • Seamless User experience and System Performance impacts
Agenda • Motivation • The RIA Challenge • RIA Methodology • RIA Scalability Model • Model Evaluation • Conclusion and Future Work
RIAlizing Primitives • Three Basic Primitives for RIA-enabling • Split • Split an interaction into multiple fine-grained • LiveControls: specialization of split • Merge • Merge multiple interactions into one • Fold • Coalesce with Summary • Zoom or Deep dive (with and without caching) • Combinations
Web Interaction User Action User Action User Submit User Action User Submit Web Browser Web Server
Split User Action User Action User Submit User Action User Submit Web Browser Web Server Ajax Factor: Increase in Service Invocation
Split Example Web Server http://dsinedynamics.com/training.php
Merge User Action User Action User Action User Action User Action Web Browser Web Server Ajax Factor: Increase in Service Invocation
Merge: Macro and Micro-level P1 P1 P2 P23 P2 P3 P3 P4 P4
Merge/Fold Example http://dsinedynamics.com/training.php
RIA Primitives • Basic primitives: • Iterative implementation • Helps easily model the scalability problem • The Scalability Challenge • Quantify the impact from these primitives • Predict Scalability based on the derived model
Agenda • Motivation • The RIA Challenge • RIA Methodology • RIA Scalability Model • Model Evaluation • Conclusion and Future Work
Scalability • AJAX – side effects • Smaller requests have large relative overhead [8] • Frequent requests can increase the overall network load • Implement and Checkout Performance • Fix by Trial and Error? • Costly and time-consuming • Need Predictive Scalability
AJAX done right • Identify proper mix of: • Shorter frequent requests • Larger infrequent requests HTML Page submits AJAX AJAX requests
TCP-IP Slow Start • Upfront setup time on each transfer • Three-way handshake prior to sustained transfer • HTTP Transactions are smaller and connection-less • Slow start algorithm Overhead for smaller transactions is higher [8] • Ajax Transactions are even smaller than regular HTTP requests • Overhead on N/W more pronounced
Design for AJAX Scalability • RIAlizing strategy to include Scalability upfront • Predict Scalability and Design accordingly • Disciplined approach to mitigate risk • Simple model resulting in net effect of increased AJAX factor
Model for Performance • Queuing System • Network • Web Server Simplified View for easier Illustration WebServer Network Client App Arrival rate: λ1 Arrival rate: λ2 → λ1 Service rate: μ1 Service rate: μ2
Parameters • AJAX Factor • Server Processing time • External and Internal Services (SOA) • Mostly unaltered by introducing AJAX • Network Overhead • Time taken in the network • AJAX Response Reduction Factor
AJAX Factor • Increase in arrival rate of requests: fa • Increase in service rate of requests: fb WebServer Network HTML Client App Arrival rate: λ1 Arrival rate: λ2 → λ1 Service rate: μ1 Service rate: μ2 WebServer Network AJAX Client App Arrival rate: faλ1 Arrival rate: faλ2 (where λ2 →λ1 ) Remains the same unless backend changed accordingly Service rate: fbμ1 Service rate: μ2
AJAX Factors HTML Page Get Page submits AJAX Page Get AJAX requests In this example: fa = 4 fb depends on request
Our Model • Simple Model: • Useful for prediction and estimation WebServer Network HTML Client App Arrival rate: λ Service rate: μ For AJAX performing better than HTML fa≤ μ(fb – 1) + λ λ
Estimated Values • 10 concurrent users, using 2 page requests (submits) within 12s • Comparing with various AJAX configurations • If fb=1.7 (approx), ie 70% increase in service rate) • Using λ and μ from the page-based scenarios λ = 2.328 x 10-3 reqs/ms, μ = 0.1798 reqs/ms Arrive at: fa ≤ 53
Agenda • Motivation • The RIA Challenge • RIA Methodology • RIA Scalability Model • Model Evaluation • Conclusion and Future Work
Comparison AJAX HTML Vs. http://dsinedynamics.com/training.php
Observations • Ensuring proper design to handle scalability is the key • Know how to estimate • Know what to expect • Modeling AJAX and HTML responses provides the answer • When load increase beyond calculated value the response time did not scale • Predictive Scalability better than Trial-and-Error
RIA Side-Effects • Any of the methods: merge, split and folds leads to increased arrival rate • Load overhead percentage higher on smaller requests: less useful work • Scalability affected due to increase rate and increased overhead
Workarounds or Extensions • Adding Client-side Caching • Key to eliminate network bottleneck • Cache JavaScript and CSS • AJAX requests only when necessary • Minimize server requests • Adding superfluous AJAX requests will swamp the networks (and the servers too) • Fewer the better • Compress response data
Agenda • Motivation • The RIA Challenge • RIA Methodology • RIA Scalability Model • Model Evaluation • Conclusion and Future Work
Conclusion • RIA Methodology • AJAX Scalability Issue • Model for predicting performance and scalability • Designing for Scalability • Current and Future Work
Current and Future Work • Adobe Flex Scalability Study • Model Variations: • Effect of Service time on responses • Effect of Caching • Effect of Network (congestion and errors) • Extend the model to study resource utilization • Reverse AJAX
Related Work - Methods • [1] RUX-Model Approach: Linaje, M., Preciado, J., Sanchez-Figueroa, F.: "Engineering Rich Internet Application User Interfaces over Legacy Web Models", Internet Computing, IEEE, Volume: 11, Issue: 6, pp. 53-59, Nov.-Dec. 2007. • [2] Semi-Automatic Approach: Mesbah, A., Van Deursen, A. "Migrating Multi-page Web Applications to Single-page AJAX Interfaces," csmr, pp. 181-190, 11th European Conference on Software Maintenance and Reengineering (CSMR'07), 2007. • [3] Web Model Refactoring: Garrido, A., Rossi, G., Distante, D.: Model Refactoring in Web Applications. In Proceedings of the 9th International Symposium on Web Site Evolution (WSE 2007: Oct. 05-06, 2007; Paris, France). Los Alamitos, CA: IEEE Press, 2007. • [4] Abstract Data Views: Cowan, D. Pereira de Lucena, C.: Abstract Data Views: An Interface Specification Concept to Enhance Design for Reuse. IEEE Trans. Software Eng. 21(3): 229-243 (1995).
Related Work - Performance • [5] High Performance Web Sites, Steve Souders, ACM Queue, v.6 n.6, October 2008 • [6] Implementation of asynchronous predictive fetch to improve the performance of AJAX-enabled web applications, Andy Ahmad Dahlan, Toshikazu Nishimura, iiWAS '08, November 2008 • [7] A Model of Web Server Performance, Louis P. Slothouber, June, 1995, http://www.geocities.com/webserverperformance/modelpaper.html • [8] Modeling the performance of HTTP over several transport protocols. John S. Heidemann, Katia Obraczka, Joseph D. Touch: IEEE/ACM Transactions on Networks 5(5): 616-630 (1997)
Questions Thank You