2. Works Cited
Agustin, J. L., & Barco, P. C. (2013). A model-driven approach to develop high performance web applications. Journal of Systems and
Software,86(12), 3013-3023. doi:10.1016/j.jss.2013.07.028
Arcelli, D., & Pompeo, D. D. (2017). Applying Design Patterns to Remove Software Performance Antipatterns: A Preliminary
Approach. Procedia Computer Science,109, 521-528. doi:10.1016/j.procs.2017.05.330
Arcelli, D., Cortellessa, V., & Pompeo, D. D. (2018). Performance-driven software model refactoring. Information and Software Technology,95,
366-397. doi:10.1016/j.infsof.2017.09.006
Baillie, G., Allan, D., Armour, B., Milne, R., Connolly, T. M., & Beeby, R. (2012). Performance Analysis of a Model-View Dynamic View Model
Design Pattern.
Basili, V. R., Carver, J. C., Cruzes, D., Hochstein, L. M., Hollingsworth, J. K., Shull, F., & Zelkowitz, M. V. (2008). Understanding the High-
Performance-Computing Community: A Software Engineers Perspective. IEEE Software,25(4), 29-36. doi:10.1109/ms.2008.103
Khan, U., & Rao, T. (2014). XWADF: Architectural Pattern for Improving Performance of Web Applications. IJCSI International Journal of
Computer Science Issues,11(2).
Rudzki, J. (2005). How Design Patterns Affect Application Performance – A Case of a Multi-tier J2EE Application. Lecture Notes in Computer
Science Scientific Engineering of Distributed Java Applications,12-23. doi:10.1007/978-3-540-31869-9_2
Rudzki, J., & Systä, T. (2006). Performance implications of design pattern usage in distributed applications. Proceedings of the ISSTA 2006
Workshop on Role of Software Architecture for Testing and Analysis - ROSATEA 06. doi:10.1145/1147249.1147250
Serbanescu, V., Azadbakht, K., Boer, F. D., Nagarajagowda, C., & Nobakht, B. (2015). A design pattern for optimizations in data intensive
applications using ABS and JAVA 8. Concurrency and Computation: Practice and Experience,28(2), 374-385. doi:10.1002/cpe.3480
Thung, P. L., Ng, C. J., Thung, S. J., & Sulaiman, S. (2010). Improving a web application using design patterns: A case study. 2010 International
Symposium on Information Technology. doi:10.1109/itsim.2010.5561301
Verma, C. S. (n.d.). Re-engineering Legacy Code with Design Patterns: A Case Study in Mesh Generation Software. doi:10.1.1.104.6232
2
3. Applying Design Patterns to Remove
Software Performance Antipatterns: A
Preliminary Approach
2017
Davide Arcelli, Daniele Di Pompeo
3
4. Applying Design Patterns to Remove
Software Performance Antipatterns
Motivation:
People don’t like to pay for designers up front
This leads to anti patterns in code
Devs can apply known patterns to avoid them
Improves code quality and performance
Empty Semi-Trucks
Excessive number of requests required for a task
Inefficient interface and use of bandwidth
Solutions
Batching
Session Façade
Convert to a different type, replay messages on the other side
4
6. Performance-driven software model
refactoring
Refactoring for Functional and Non-Functional Requirements
Automated UML analysis for anti-pattern detection
Number of connected components
Number of usages
Interface realizations
Formulas to determine issues: 2 x usage >= realization -> …
Code, System Diagrams, Interaction Diagrams
For huge systems
6
7. Performance-driven software model
refactoring
Anti-Patterns
Blob
Single component does most of the work or holds most of the data
Causes excessive message traffic
Solution
Refactor design, distribute intelligence uniformly over top level classes.
Keep related data and behavior together
Increase cohesion, decrease coupling
Unbalanced Processing
Unbalanced assignment of tasks to CPUs
Solution
Change scheduling algorithm
Restructure code
7
8. Performance-driven software model
refactoring
Anti-Patterns
Pipe and Filter
Slowest filter in the pipe causes unacceptable throughput
Move heaviest filter to a new component
Extensive Processing
One long running job holds up overall response time
Solution
Move long job out of response path
8
9. Performance-driven software model
refactoring
Anti-Patterns
Empty Semi-Trucks
Excessive number of requests required to finish a task
Solution
Batching performance pattern
Session Façade design pattern
Combine light messages into heavier ones
Coupling performance pattern
Aggregate entity
9
10. Performance-driven software model
refactoring
Anti-Patterns
Tower of Babel (Hanoi?)
Processes data in different formats
Constantly converting data back and forth
Solution
Adopt the most common format
Fast path performance pattern
Identifies paths that should be streamlined
Use coupling to minimize parsing and translation
10
11. A design pattern for optimizations in data
intensive applications using ABS and JAVA
8
2015
V. Serbanescu K. Azadbakht F. de Boer C. Nagarajagowda B. Nobakht
11
12. A design pattern for optimizations in data
intensive applications
Created a language, Abstract Behavioral Specification Language ABS
Concurrent actor framework
Compiles to Java
Case study is Sieve of Eratosthenes
Find Primes
Find a prime
Remove all multiples from the list
“Local aware” vs distributed actors
Use a shared queue vs network
12
13. How Design Patterns Affect Application
Performance – A Case of a Multi-tier J2EE
Application
2004
Jakub Rudzki
13
14. How Design Patterns Affect Application
Performance
Let’s see how patterns affect performance
Throughput – requests/sec
Response time
Reliability – number of successful requests
Number of requests above response time threshold
Case study – Document Version Control System (DVC)
Design pattern for presentation layer –> business layer interface
Façade
Command
Command Combined – command + batch
14
15. How Design Patterns Affect Application
Performance
3 layers
Presentation Layer – JSP Web app
Deployed both locally and remotely
Business logic
Data Layer
Real DB
Hardware
2 Pentium4 2.4GHz
1GB Ram
80GB Disk space
100Mbps network card
Windows XP Professional
15
16. How Design Patterns Affect Application
Performance
Procedure
Login, List Docs, Download doc, Create users…
5 to 220 concurrent users, step by 10s
Run for 18,000 requests
Repeat 4 times
Results
1. Façade
2. Command Combined
3. Command
Graphs are all really blurry
Remote deployment shows the most difference
Network packets
Local very noisy
16
Remote Deployment
Response Time
17. How Design Patterns Affect Application
Performance
17
Local Deployment Throughput Remote Deployment Throughput
18. How Design Patterns Affect Application
Performance
Recommendations
Façade is faster for remote
Command is more flexible
Future research
Test more patterns
Try different technologies, .NET
Create a recommendation list based on scenario and technology
18
19. Performance Implications of Design
Pattern Usage in Distributed Applications -
Case Studies in J2EE and .NET
2006
Jakub Rudzki, Tarja Systa
19
20. Performance Implications of Design
Pattern Usage
Same as previous, just J2EE v .NET
.NET “remote execution” with SOAP and binary
Remote Method Invocation was used in Java
Hardware
DB Server
Windows XP Professional
Pentium 4 2.4GHz
1GB RAM
80GB HDD
100Mb network card
Application Server
Windows Server 2003
Pentium 4 2.8 GHz
2GB RAM
110GB SCSI disk array
20
22. Performance Implications of Design
Pattern Usage
Results
“The number of remote calls as well as object serialization cost had the biggest impact
on overall application performance.”
22
23. Performance Implications of Design
Pattern Usage
Results
“in the case of local deployment, in contrast to J2EE containers, IIS did not perform any
call optimization to replace the remote call with a normal method call”
.NET serialized objects were 50% larger than Java versions
Looked at different parsers
23
25. XWADF: Architectural Pattern for Improving
Performance of Web Applications
Purpose
Need simple solution for model layer to reduce communication cost
Connection Pooling
Caching
Data Transfer Objects (DTO)
SQL mapper can map to these generically
Database Access Objects (DAO)
Separates low level access from high
level business services
Delegation Design
Divide work into helper classes
Decorator Design
Add new features into runtime objects
25
26. XWADF: Architectural Pattern for Improving
Performance of Web Applications
Tests
4GB Ram
Core2 duo
Windows 7
Tomcat 7 JSP
“XWADF is novel”
26
27. Re-engineering Legacy Code with Design
Patterns: A Case Study in Mesh Generation
Software
2019
Chaman Singh Verma, Ling Liu
27
30. A model-driven approach to develop high
performance web applications
2013
José Luis Herrero Agustin, Pablo Carmona del Barco
30
31. A model-driven approach to develop high
performance web applications
Use UML and model driven development for web development
Web dev doesn’t typically have a design phase
TypeScript
Decrease dev cost and complexity
Modular design allows for prefetching
Using prefetching and caching saw a 46% reduction in latency
A lot of client-side UML
31
32. Improving a Web Application Using
Design Patterns
2010
Phek Lan Thung, Chu Jian Ng, Swee Jing Thung, Shahida Sulaiman
32
33. Improving a Web Application Using Design
Patterns
Patterns
Model View Controller (MVC)
Presentation Abstraction Control (PAC)
Navigation Patterns
Navigation observer
Good for when history is important, can backtrack
Navigation Strategy
Decouples activation of links with computation endpoints
Good for memory constraints, lazy loading
News
Pagination
Set-Based Navigation
No performance mentioned
33
34. Improving a Web Application Using Design
Patterns
MVC
UI can be updated without effecting
business logic
Better for large interactive systems
Requires a lot of experience
PAC
Separate agents do each part
Agents can be switched
Good for multi process things
Long chains of communication slow things
down
34
35. Performance Analysis of a Model-View
Dynamic View Model Design Pattern
2012
Graeme Baillie, Dave Allan, Brian Armour, Robert Milne Thomas M Connolly, Richard Beeby
35
36. Performance Analysis of a Model-View
Dynamic View Model Design Pattern
Grant Tracking forum web app
ASP.NET MVC vs ASP.NET Web Forms
MVC
Decouples components
Developers write real HTML
Easily testable
Web Forms
Tightly Coupled
Only one <form> per page
Uses a global view state, 10s of KB
36
37. Performance Analysis of a Model-View
Dynamic View Model Design Pattern
MVC is much faster
Not a surprise, it’s the newer replacement
HTML runs better, written by humans
JS packages are smaller and more optimized
37
38. Understanding the High-Performance-
Computing Community: A Software
Engineer's Perspective
2008
Victor R. Basili, Daniela Cruzes, Jeffrey C. Carver, Lorin M. Hochstein, Jeffrey K.
Hollingsworth, Marvin V. Zelkowitz, Forrest Shull
38
39. Understanding the High-Performance-
Computing Community
HPC -> large research clusters
Hundreds of thousands of processors
Performance: time to solution: dev time + execution time
Performance vs Portability vs Maintainability
20% speedup at cost of maintainability isn’t worth it
200% speedup maybe is worth it
Many devs lack formal training
C developers stuck in their ways
No IDEs
CVS & Subversion
No Frameworks
39