DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
RIAlizing Enterprise ApplicationsRIAlizing Enterprise Applications
ByBy
Sujoe BoseSujoe Bose
www.dsinedynamics.comwww.dsinedynamics.com
AJAX World 2009 Conference, USA, June ‘09 AJAX World 2009 Conference, USA, June ‘09
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
AgendaAgenda
MotivationMotivation
The RIA ChallengeThe RIA Challenge
RIA MethodologyRIA Methodology
RIA Scalability ModelRIA Scalability Model
Model EvaluationModel Evaluation
Conclusion and Future WorkConclusion and Future Work
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
AgendaAgenda
MotivationMotivation
The RIA ChallengeThe RIA Challenge
RIA MethodologyRIA Methodology
RIA Scalability ModelRIA Scalability Model
Model EvaluationModel Evaluation
Conclusion and Future WorkConclusion and Future Work
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
MotivationMotivation
RIA-Enabling Methodology for Existing RIA-Enabling Methodology for Existing
Enterprise ApplicationsEnterprise Applications
Predicting AJAX ScalabilityPredicting AJAX Scalability
Unavailability of Objective MethodUnavailability of Objective Method
Formal treatment of AJAX side-effects on Formal treatment of AJAX side-effects on
PerformancePerformance
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
ContextContext
RIA-Enabling Existing Enterprise RIA-Enabling Existing Enterprise ApplicationApplication Reuse of investment and infrastructureReuse of investment and infrastructure Seamless changes to WorkflowSeamless changes to Workflow
Refactoring Interfaces Iteratively for Richer Refactoring Interfaces Iteratively for Richer User ExperienceUser ExperienceNeed for a repeatable methodNeed for a repeatable methodImpact on ScalabilityImpact on ScalabilityPrediction better than Trial-and-ErrorPrediction better than Trial-and-Error
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
AgendaAgenda
MotivationMotivation
The RIA ChallengeThe RIA Challenge
RIA MethodologyRIA Methodology
RIA Scalability ModelRIA Scalability Model
Model EvaluationModel Evaluation
Conclusion and Future WorkConclusion and Future Work
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
The AJAX ConundrumThe AJAX Conundrum
Page-based approachPage-based approach Large ObjectsLarge Objects Lower frequency of accessLower frequency of access
AJAX-basedAJAX-based Small ObjectsSmall Objects Higher frequency of accessHigher frequency of access
Which one is better as far as scalability is Which one is better as far as scalability is concerned?concerned?
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
Scalability ConcernScalability Concern
TCP/IP – Slow Start AlgorithmTCP/IP – Slow Start Algorithm Congestion and Flow ControlCongestion and Flow Control
Round-trip overhead:Round-trip overhead: High for smaller requestsHigh for smaller requests Amortized for larger requests (pipelined Amortized for larger requests (pipelined
transfer)transfer)
Increase in Invocation Frequency and Increase in Invocation Frequency and Quantity (AJAX Factor)Quantity (AJAX Factor)
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
The RIA ChallengeThe RIA Challenge
Shorter reply/responses vs. Larger Shorter reply/responses vs. Larger reply/responsesreply/responses
Frequent reply/responses vs. InfrequentFrequent reply/responses vs. Infrequent
Page loading interspersed between AJAX Page loading interspersed between AJAX burstsbursts
Find the appropriate mix in a disciplined Find the appropriate mix in a disciplined approachapproach
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
RIA TargetsRIA Targets
Look-and-feelLook-and-feel
ResponsivenessResponsiveness
Modified workflow that is more usable and Modified workflow that is more usable and naturalnatural Moving away from page-centric behaviorMoving away from page-centric behavior
Non-functional targets: Stability and Non-functional targets: Stability and Scalability with no Infrastructural upgradesScalability with no Infrastructural upgrades
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
Advantages of Evolutionary RIAAdvantages of Evolutionary RIA
Find what works and what does notFind what works and what does not
Experiment without large impactExperiment without large impact User’s likes and dislikesUser’s likes and dislikes
System PerformanceSystem Performance Introducing AJAX has some System side-Introducing AJAX has some System side-
effectseffects
Seamless User experience and System Seamless User experience and System Performance impactsPerformance impacts
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
AgendaAgenda
MotivationMotivation
The RIA ChallengeThe RIA Challenge
RIA MethodologyRIA Methodology
RIA Scalability ModelRIA Scalability Model
Model EvaluationModel Evaluation
Conclusion and Future WorkConclusion and Future Work
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
RIAlizing PrimitivesRIAlizing Primitives
Three Basic Primitives for RIA-enablingThree Basic Primitives for RIA-enablingSplitSplit Split an interaction into multiple fine-grainedSplit an interaction into multiple fine-grained LiveControls: specialization of splitLiveControls: specialization of split
MergeMerge Merge multiple interactions into oneMerge multiple interactions into one
FoldFold Coalesce with SummaryCoalesce with Summary Zoom or Deep dive (with and without caching)Zoom or Deep dive (with and without caching)
CombinationsCombinations
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
Web InteractionWeb Interaction
User Action
User Action
User Submit
User Action
User Submit
Web BrowserWeb Browser Web ServerWeb Server
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
SplitSplit
User Action
User Action
User Submit
User Action
User Submit
Ajax Factor: Increase in Service InvocationAjax Factor: Increase in Service Invocation
Web BrowserWeb Browser Web ServerWeb Server
DSineDynamics TM
The DSine Research CompanyThe DSine Research CompanySplit ExampleSplit Example
Web ServerWeb Serverhttp://dsinedynamics.com/training.phphttp://dsinedynamics.com/training.php
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
MergeMerge
User Action
User Action
User Action
User Action
User Action
Ajax Factor: Increase in Service InvocationAjax Factor: Increase in Service Invocation
Web BrowserWeb Browser Web ServerWeb Server
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
Merge: Macro and Micro-levelMerge: Macro and Micro-level
P1
P2
P3
P4
P1
P4
P23
P2
P3
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
Merge/Fold ExampleMerge/Fold Example
http://dsinedynamics.com/training.phphttp://dsinedynamics.com/training.php
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
RIA PrimitivesRIA Primitives
Basic primitives:Basic primitives: Iterative implementation Iterative implementation Helps easily model the scalability problemHelps easily model the scalability problem
The Scalability ChallengeThe Scalability Challenge Quantify the impact from these primitivesQuantify the impact from these primitives Predict Scalability based on the derived modelPredict Scalability based on the derived model
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
AgendaAgenda
MotivationMotivation
The RIA ChallengeThe RIA Challenge
RIA MethodologyRIA Methodology
RIA Scalability ModelRIA Scalability Model
Model EvaluationModel Evaluation
Conclusion and Future WorkConclusion and Future Work
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
ScalabilityScalability
AJAX – side effectsAJAX – side effects Smaller requests have large relative overhead Smaller requests have large relative overhead
[8][8] Frequent requests can increase the overall Frequent requests can increase the overall
network loadnetwork load
Implement and Checkout PerformanceImplement and Checkout Performance Fix by Trial and Error?Fix by Trial and Error? Costly and time-consumingCostly and time-consuming
Need Predictive ScalabilityNeed Predictive Scalability
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
AJAX done rightAJAX done right
Identify proper mix of:Identify proper mix of: Shorter frequent requests Shorter frequent requests Larger infrequent requestsLarger infrequent requests
HTMLHTML
Page submitsPage submits
AJAXAJAX
AJAX requestsAJAX requests
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
TCP-IP Slow StartTCP-IP Slow Start
Upfront setup time on each transferUpfront setup time on each transfer
Three-way handshake prior to Three-way handshake prior to sustained transfersustained transfer
HTTP Transactions are smaller and HTTP Transactions are smaller and connection-lessconnection-less
Slow start algorithm Overhead for Slow start algorithm Overhead for smaller transactions is higher [8]smaller transactions is higher [8]
Ajax Transactions are even smaller Ajax Transactions are even smaller than regular HTTP requeststhan regular HTTP requests
Overhead on N/W more Overhead on N/W more pronouncedpronounced
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
Design for AJAX ScalabilityDesign for AJAX Scalability
RIAlizing strategy to include Scalability RIAlizing strategy to include Scalability upfrontupfront
Predict Scalability and Design accordinglyPredict Scalability and Design accordingly
Disciplined approach to mitigate riskDisciplined approach to mitigate risk
Simple model resulting in net effect of Simple model resulting in net effect of increased AJAX factorincreased AJAX factor
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
Model for PerformanceModel for Performance
Queuing SystemQueuing System NetworkNetwork Web ServerWeb Server
Simplified View for easier IllustrationSimplified View for easier Illustration
NetworkNetwork
AppClient
Arrival rate: Arrival rate: λλ11
Service rate: Service rate: μμ11
Arrival rate: Arrival rate: λλ2 2 → → λλ11
Service rate: Service rate: μμ22
WebServerWebServer
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
ParametersParameters
AJAX FactorAJAX Factor
Server Processing timeServer Processing time External and Internal Services (SOA)External and Internal Services (SOA) Mostly unaltered by introducing AJAX Mostly unaltered by introducing AJAX
Network OverheadNetwork Overhead Time taken in the networkTime taken in the network
AJAX Response Reduction Factor AJAX Response Reduction Factor
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
AJAX FactorAJAX FactorIncrease in arrival rate of requests: fIncrease in arrival rate of requests: faa
Increase in service rate of requests: fIncrease in service rate of requests: fbb
NetworkNetwork
AppHTMLClient
Arrival rate: Arrival rate: λλ11
Service rate: Service rate: μμ11
Arrival rate: Arrival rate: λλ2 2 → → λλ11
Service rate: Service rate: μμ22
WebServerWebServer
NetworkNetwork
AppAJAXClient
Arrival rate: fArrival rate: faa λλ11
Service rate: fService rate: fbbμμ11
Arrival rate: fArrival rate: faa λλ2 2 (where (where λλ22 → → λλ1 1 ))
Service rate: Service rate: μμ22
WebServerWebServer
Remains the same unless backend
changed accordingly
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
AJAX FactorsAJAX Factors
HTMLHTML
Page submitsPage submits
AJAXAJAX
AJAX requestsAJAX requests
In this example: fIn this example: faa = 4 = 4
ffbb depends on request depends on request
Page GetPage Get
Page GetPage Get
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
Our ModelOur Model
Simple Model:Simple Model: Useful for prediction and estimationUseful for prediction and estimation
Arrival rate: Arrival rate: λλ
Service rate: Service rate: μμ
AppHTMLClient
NetworkNetwork WebServerWebServer
For AJAX performing better than HTML
fa ≤ μ(fb – 1) + λ λ
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
Estimated ValuesEstimated Values
10 concurrent users, using 2 page 10 concurrent users, using 2 page requests (submits) within 12srequests (submits) within 12s
Comparing with various AJAX Comparing with various AJAX configurationsconfigurations If fIf fbb=1.7 (approx), ie 70% increase in service =1.7 (approx), ie 70% increase in service
rate)rate) Using Using λ and μ from the page-based scenarios
λ = 2.328 x 10-3 reqs/ms, μ = 0.1798 reqs/ms
Arrive at: fa ≤ 53
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
AgendaAgenda
MotivationMotivation
The RIA ChallengeThe RIA Challenge
RIA MethodologyRIA Methodology
RIA Scalability ModelRIA Scalability Model
Model EvaluationModel Evaluation
Conclusion and Future WorkConclusion and Future Work
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
ComparisonComparison
Vs.Vs.
AJAXAJAX HTMLHTML
http://dsinedynamics.com/training.phphttp://dsinedynamics.com/training.php
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
1010 concurrent users running for concurrent users running for 5mins 5mins ramp time of ramp time of 10s10s
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
1010 concurrent users running for concurrent users running for 5mins 5mins ramp time of ramp time of 10s10s
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
1010 concurrent users running for concurrent users running for 5mins 5mins ramp time of ramp time of 10s10s
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
1010 concurrent users running for concurrent users running for 5mins 5mins ramp time of ramp time of 10s10s
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
1010 concurrent users running for concurrent users running for 5mins 5mins ramp time of ramp time of 10s10s
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
1010 concurrent users running for concurrent users running for 5mins 5mins ramp time of ramp time of 10s10s
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
ObservationsObservations
Ensuring proper design to handle scalability is Ensuring proper design to handle scalability is the keythe key Know how to estimateKnow how to estimate Know what to expectKnow what to expect
Modeling AJAX and HTML responses provides Modeling AJAX and HTML responses provides the answerthe answerWhen load increase beyond calculated value the When load increase beyond calculated value the response time did not scaleresponse time did not scalePredictive Scalability better than Trial-and-ErrorPredictive Scalability better than Trial-and-Error
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
RIA Side-EffectsRIA Side-Effects
Any of the methods: merge, split and folds Any of the methods: merge, split and folds leads to increased arrival rateleads to increased arrival rate
Load overhead percentage higher on Load overhead percentage higher on smaller requests: less useful worksmaller requests: less useful work
Scalability affected due to increase rate Scalability affected due to increase rate and increased overheadand increased overhead
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
Workarounds or ExtensionsWorkarounds or Extensions
Adding Client-side Caching Adding Client-side Caching Key to eliminate network bottleneckKey to eliminate network bottleneck Cache JavaScript and CSSCache JavaScript and CSS
AJAX requests only when necessaryAJAX requests only when necessary Minimize server requestsMinimize server requests
Adding superfluous AJAX requests will Adding superfluous AJAX requests will swamp the networks (and the servers too)swamp the networks (and the servers too) Fewer the betterFewer the better
Compress response dataCompress response data
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
AgendaAgenda
MotivationMotivation
The RIA ChallengeThe RIA Challenge
RIA MethodologyRIA Methodology
RIA Scalability ModelRIA Scalability Model
Model EvaluationModel Evaluation
Conclusion and Future WorkConclusion and Future Work
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
ConclusionConclusion
RIA MethodologyRIA Methodology
AJAX Scalability IssueAJAX Scalability Issue
Model for predicting performance and Model for predicting performance and scalabilityscalability
Designing for ScalabilityDesigning for Scalability
Current and Future WorkCurrent and Future Work
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
Current and Future WorkCurrent and Future Work
Adobe Flex Scalability StudyAdobe Flex Scalability Study
Model Variations:Model Variations: Effect of Service time on responsesEffect of Service time on responses Effect of CachingEffect of Caching Effect of Network (congestion and errors)Effect of Network (congestion and errors)
Extend the model to study resource Extend the model to study resource utilizationutilization
Reverse AJAXReverse AJAX
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
Related Work - MethodsRelated Work - Methods
[1] RUX-Model Approach:[1] RUX-Model Approach: Linaje, M., Preciado, J., Sanchez-Figueroa, F.: Linaje, M., Preciado, J., Sanchez-Figueroa, F.: "Engineering Rich Internet Application User Interfaces over Legacy Web Models", Internet Computing, IEEE, "Engineering Rich Internet Application User Interfaces over Legacy Web Models", Internet Computing, IEEE, Volume: 11, Issue: 6, pp. 53-59, Nov.-Dec. 2007.Volume: 11, Issue: 6, pp. 53-59, Nov.-Dec. 2007.
[2] Semi-Automatic Approach:[2] Semi-Automatic Approach: Mesbah, A., Van Deursen, A. "Migrating Mesbah, A., Van Deursen, A. "Migrating Multi-page Web Applications to Single-page AJAX Interfaces," csmr, pp. 181-190, 11th European Conference on Multi-page Web Applications to Single-page AJAX Interfaces," csmr, pp. 181-190, 11th European Conference on Software Maintenance and Reengineering (CSMR'07), 2007.Software Maintenance and Reengineering (CSMR'07), 2007.
[3] Web Model Refactoring: [3] Web Model Refactoring: Garrido, A., Rossi, G., Distante, D.: Model Garrido, A., Rossi, G., Distante, D.: Model Refactoring in Web Applications. In Proceedings of the 9th International Symposium on Web Site Evolution (WSE 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.2007: Oct. 05-06, 2007; Paris, France). Los Alamitos, CA: IEEE Press, 2007.
[4] Abstract Data Views: [4] Abstract Data Views: Cowan, D. Pereira de Lucena, C.: 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 An Interface Specification Concept to Enhance Design for Reuse. IEEE Trans. Software Eng. 21(3): 229-243 (1995).(1995).
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
Related Work - PerformanceRelated Work - Performance[5] High Performance Web Sites, [5] High Performance Web Sites, Steve Souders, ACM Queue, v.6 n.6, Steve Souders, ACM Queue, v.6 n.6, October 2008October 2008
[6] Implementation of asynchronous predictive fetch [6] Implementation of asynchronous predictive fetch to to improve the performance of AJAX-enabled web applications, Andy Ahmad Dahlan, Toshikazu improve the performance of AJAX-enabled web applications, Andy Ahmad Dahlan, Toshikazu Nishimura, iiWAS '08, November 2008Nishimura, iiWAS '08, November 2008
[7] A Model of Web Server Performance, [7] A Model of Web Server Performance, Louis P. SlothouberLouis P. Slothouber, , June, June, 1995, http://www.geocities.com/webserverperformance/modelpaper.html1995, http://www.geocities.com/webserverperformance/modelpaper.html
[8] Modeling the performance of HTTP over several [8] Modeling the performance of HTTP over several transport protocols. transport protocols. John S. Heidemann, Katia Obraczka, Joseph D. Touch: John S. Heidemann, Katia Obraczka, Joseph D. Touch: IEEE/ACM Transactions on Networks 5(5): 616-630 (1997) IEEE/ACM Transactions on Networks 5(5): 616-630 (1997)
DSineDynamics TM
The DSine Research CompanyThe DSine Research Company
QuestionsQuestions
Thank YouThank You