web applications
play

Web Applications Software Engineering 2017 Alessio Gambi - Saarland - PowerPoint PPT Presentation

Web Applications Software Engineering 2017 Alessio Gambi - Saarland University Based on the work of Cesare Pautasso, Christoph Dorn, Andrea Arcuri, and others ReCap Software Architecture A software systems architecture is the set of


  1. Qualities • “Basic” implementation - Limited scalability - Single point of failure - Limited Security

  2. Performance Tactics • Control Resource Demand Increase the resource efficiency (caching) - Reduce overhead (pre-generate HTML from PHP) - • Manage Resources Schedule resources (load balancer) - https://www.digitalocean.com/community/tutorials/5-common-server-setups-for-your-web-application

  3. Load Balancing deploy many replicated instances of the server on multiple machines

  4. Caching + Load Balancing FrontEnd (Apache)

  5. Caching + Load Balancing Squid Apache (Caching)

  6. Caching + Load Balancing Squid Apache (Caching)

  7. Caching + Load Balancing LoadBalancer Squid LoadBalancer Apache (Squid)

  8. Caching + Load Balancing LoadBalancer Squid LoadBalancer Apache (Squid) Squid Apache Squid LoadBalancer Apache LoadBalancer Squid Apache

  9. UI Page Static Submit Logic ArticleView Resources Skinning Localization ArticleEdit Parser Writes Reads Backend

  10. UI Page Cache Cache Loader Submit Logic ArticleView Skinning Localization Static Cache Resources Cache ArticleEdit Parser Writes Reads Backend

  11. Performance Tactics • Control Resource Demand Prioritize events (deferred article updates) - • Manage Resources Introduce concurrency (distributed database) - Schedule resources (load balancer) - Multiple copies of data and computations - https://www.digitalocean.com/community/tutorials/5-common-server-setups-for-your-web-application

  12. Master/Slave split a large job into smaller independent partitions which can be processed in parallel

  13. Distribution + Replication Database More reads than writes Near-live updates (no strict consistency requirements)

  14. Distribution + Replication Load Balancer Writes Reads DB Master DB Slave More reads than writes Near-live updates (no strict consistency requirements)

  15. Distribution + Replication Data Sharding Clear data separation (Article Name: A-B, C-D, etc..)

  16. Distribution + Replication Load Balancer Writes Reads DB Master DB Slave

  17. Distribution + Replication Partition Logic Load Balancer (Sharding, (Master) Relication Reads Writes DB Master DB Slave (Shard)

  18. Visualization

  19. UI Page Cache Cache Loader Submit Logic ArticleView Skinning Localization Static Cache Resources Cache ArticleEdit Parser Writes Reads Backend

  20. UI Page Cached Cached Loader Submit Logic HTML File Skinning Localization Cache Static Resources ArticleView Cached Parser ArticleEdit Cache Job Queue Parser Writes Job Runner Reads Backend Writes Precompile/Recompile Regenerate/Invalidate

  21. Security/Availability Tactics • Prevent Attacks • Challenge Tokens (CSRF) • Validation (User) and Sanitization (SQL Injection, XSS) • Resist Attacks • Maintain multiple copies of computations • Maintain multiple copies of data • Recover from Attacks • DB Versioning (Recovery from data loss)

  22. UI Page Cache Cache Loader Submit Logic ArticleView Skinning Localization Static Cache Resources Cache ArticleEdit Parser Writes Reads Backend

  23. UI Page Cache Cache Submit Logic Loader ArticleView Skinning Localization Static Resources Sanitizer Cache Pipeline Cache Parser ArticleEdit Reads Writes User Access Backend

  24. UI Page Cache Cache Submit Logic Loader ArticleView Skinning Localization Static Resources Cache Cache Sanitizer Parser ArticleEdit Reads Writes Backend

  25. Additional Qualities

  26. Extensibility UI Page Cache Cache Submit Logic Loader ArticleView Skinning Localization Static Resources Cache Cache Sanitizer Parser ArticleEdit Reads Writes Backend

  27. Extensibility UI Page Cache Cache Submit Logic Loader ArticleView Localization Skinning Static Resources Notify Cache Cache Sanitizer Notify Notify ArticleEdit Parser Notify Notify Reads Writes Register Callback External Hook Engine Backend Module

Recommend


More recommend