Microservices Architecture and RESTful Service Deployment at NTPU Spring 2024

software engineering n.w
1 / 89
Embed
Share

Join the course on Microservices Architecture and RESTful service deployment at National Taipei University in Spring 2024. Explore software engineering principles, Agile methodologies, cloud-based software, security practices, industry standards, and project management. Enhance your skills in designing, testing, implementing, and maintaining software systems. Dive into the world of microservices and learn about RESTful services for efficient service deployment. Don't miss this opportunity to expand your knowledge in software engineering and project management.

  • Microservices
  • RESTful Services
  • Software Engineering
  • NTPU
  • Project Management

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Software Engineering Microservices Architecture: RESTful services, Service deployment 1122SE07 MBA, IM, NTPU (M5010) (Spring 2024) Wed 2, 3, 4 (9:10-12:00) (B3F17) Min-Yuh Day, Ph.D, Professor https://meet.google.com/ ish-gzmy-pmo Institute of Information Management, National Taipei University https://web.ntpu.edu.tw/~myday 1 2024-05-08

  2. Syllabus Week Date Subject/Topics 1 2024/02/21 Introduction to Software Engineering 2 2024/02/28 Peace Memorial Day (Day Off) 3 2024/03/06 Software Products and Project Management: Software product management and prototyping 4 2024/03/13 Agile Software Engineering: Agile methods, Scrum, and Extreme Programming 5 2024/03/20 Case Study on Software Engineering I 6 2024/03/27 Features, Scenarios, and Stories 7 2024/04/03 Make-up holiday for NTPU Sports Day (No Classes) 8 2024/04/10 Midterm Project Report 2

  3. Syllabus Week Date Subject/Topics 9 2024/04/17 Software Architecture: Architectural design, System decomposition, and Distribution architecture 10 2024/04/24 Cloud-Based Software: Virtualization and containers, Everything as a service, Software as a service; Cloud Computing and Cloud Software Architecture 11 2024/05/01 Case Study on Software Engineering II 12 2024/05/08 Microservices Architecture: RESTful services, Service deployment 3

  4. Syllabus Week Date Subject/Topics 13 2024/05/15 Security and Privacy; Reliable Programming; Testing: Functional testing, Test automation, Test-driven development, and Code reviews; DevOps and Code Management: Code management and DevOps automation 14 2024/05/22 Industry Practices of Software Engineering 15 2024/05/29 Final Project Report I 16 2024/06/05 Final Project Report II 4

  5. Microservices Architecture: RESTful services, Service deployment 5

  6. Software Engineering and Project Management Design Test Deliver Build Analyze System and Software design Integration and system testing Operation and maintenance Implementation and unit testing Requirements definition Project Management 6

  7. Information Management (MIS) Information Systems Organizations Technology Information Systems Management 7 Source: Kenneth C. Laudon & Jane P. Laudon (2014), Management Information Systems: Managing the Digital Firm, Thirteenth Edition, Pearson.

  8. Fundamental MIS Concepts Business Challenges Management Information System Business Solutions Organization Technology 8 Source: Kenneth C. Laudon & Jane P. Laudon (2014), Management Information Systems: Managing the Digital Firm, Thirteenth Edition, Pearson.

  9. Project-based software engineering CUSTOMER Problem generates helps-with implemented-by 1 Software Requirements CUSTOMER and DEVELOPER Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson. DEVELOPER 9

  10. Product software engineering DEVELOPER 1 Opportunity inspires realizes implemented-by Product features Software DEVELOPER DEVELOPER 10 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  11. Software execution models Stand-alone execution Hybrid execution Software as a service User s computer User s computer User s computer User interface Product functionality User data User interface Partial functionality User data User interface (browser or app) Additional functionality User data backups Product updates Product functionality User data Product updates Vendor s servers Vendor s servers Vendor s servers Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  12. Product management concerns Business needs Product manager Technology constraints Customer experience 12 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  13. Technical interactions of product managers Product vision management Product backlog management User stories and scenarios Product manager Acceptance testing Customer testing User interface design 13 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  14. Software Development Life Cycle (SDLC) The waterfall model Requirements definition System and Software design Implementation and unit testing Integration and system testing Operation and maintenance 14 Source: Ian Sommerville (2015), Software Engineering, 10th Edition, Pearson.

  15. Plan-based and Agile development Plan-based development Requirements engineering Requirements specification Design and implementation Requirements change requests Agile development Requirements engineering Design and implementation 15 Source: Ian Sommerville (2015), Software Engineering, 10th Edition, Pearson.

  16. The Continuum of Life Cycles High Incremental Agile Frequency of Delivery Predictive Iterative Low Low High Degree of Change 16 Source: Project Management Institute (2017), Agile Practice Guide, Project Management Institute

  17. Predictive Life Cycle Analyze Design Build Test Deliver 17 Source: Project Management Institute (2017), Agile Practice Guide, Project Management Institute

  18. Iterative Life Cycle Refine Prototype Analyze Design Build Test Analyze Deliver 18 Source: Project Management Institute (2017), Agile Practice Guide, Project Management Institute

  19. A Life Cycle of Varying-Sized Increments Analyze Design Build Test Deliver Analyze Design Build Test Deliver Analyze Design Build Test Deliver 19 Source: Project Management Institute (2017), Agile Practice Guide, Project Management Institute

  20. Iteration-Based and Flow-Based Agile Life Cycles Iteration-Based Agile Requirements Analysis Design Build Test Requirements Analysis Design Build Test Requirements Analysis Design Build Test Requirements Analysis Design Build Test Requirements Analysis Design Build Test Requirements Analysis Design Build Test Repeat as needed Flow-Based Agile Requirements Analysis Design Build Test the number of features in the WIP limit Requirements Analysis Design Build Test the number of features in the WIP limit Requirements Analysis Design Build Test the number of features in the WIP limit Requirements Analysis Design Build Test the number of features in the WIP limit Requirements Analysis Design Build Test the number of features in the WIP limit Repeat as needed 20 Source: Project Management Institute (2017), Agile Practice Guide, Project Management Institute

  21. From personas to features 1 Personas A way of representing users inspire Natural language descriptions of a user interacting with a software product are-developed-into Scenarios 2 3 inspire Natural language descriptions of something that is needed or wanted by users Stories 4 Features define Fragments of product functionality 21 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  22. Multi-tier client-server architecture Client 1 Client 2 Web Server Application Server Database Server Client 3 Client 22 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  23. Service-oriented Architecture Client 1 S1 S2 Client 2 S3 Web Server Service gateway S4 Client 3 S5 S6 Client Services 23 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  24. VM Container Virtual web server Virtual mail server User 1 Container 1 User 2 Container 2 Server software Application software Application software Server software Guest OS Server software Server software Guest OS Hypervisor Container manager Host OS Host OS Server Hardware Server Hardware 24 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  25. Everything as a service Logistics management Software as a service (SaaS) Photo editing Database Software development Cloud Platform as a service (PaaS) management Monitoring Storage Network Infrastructure as a service (IaaS) Computing Virtualization Cloud data center 25 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  26. Software as a service Software customers Software provider Software services Cloud provider Cloud Infrastructure 26 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  27. Microservices architecture key design questions What are the microservices that make up the system? How should microservices communicate with each other? How should data be distributed and shared? Microservices architecture design How should the microservices in the system be coordinated? How should service failure be detected, reported and managed? 27 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  28. Types of security threat An attacker attempts to deny access to the system for legitimate users An attacker attempts to damage the system or its data Integrity threats Availability threats SOFTWARE PRODUCT PROGRAM Distributed denial of service (DDoS) attack Virus DATA Ransomware Data theft Confidentiality threats An attacker tries to gain access to private information held by the system 28 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  29. Software product quality attributes 1 2 Reliability Availability 7 3 Software product quality attributes Security Resilience 6 4 5 Usability Maintainability Responsiveness 29 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  30. A refactoring process 1 2 Start Identify refactoring strategy Identify code smell 4 3 Make small improvement until strategy completed Run automated code tests 30 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  31. Functional testing Start 1 Unit Testing 2 4 Release Testing Feature Testing 3 System Testing 31 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  32. Test-driven development (TDD) 1 Start Identify new functionality 2 Identify partial implementation of functionality 3 Write code stub that will fail test Functionality complete Functionality incomplete 4 Run all automated test 7 Refactor code if required 5 Implement code that should cause failing test to pass Test failure 6 Run all All tests pass automated test 32 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  33. DevOps Development Deployment Support Multi-skilled DevOps team 33 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  34. Code management and DevOps DevOps automation Continuous integration Continuous deployment Continuous delivery Infrastructure as code Code management system Branching and merging Save and retrieve versions Recover version information Code repository Transfer code to/from developer s filestore DevOps measurement Data collection Data analysis Report generation 34 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  35. Microservices Architecture: RESTful services, Service deployment 35

  36. Outline Microservices Architecture RESTful services Service deployment 36

  37. Microservices Architecture 37 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  38. Software services A software service is a software component that can be accessed from remote computers over the Internet. Given an input, a service produces a corresponding output, without side effects. The service is accessed through its published interface and all details of the service implementation are hidden. Services do not maintain any internal state. State information is either stored in a database or is maintained by the service requestor. 38 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  39. Software services When a service request is made, the state information may be included as part of the request and the updated state information is returned as part of the service result. As there is no local state, services can be dynamically reallocated from one virtual server to another and replicated across several servers. 39 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  40. Modern web services After various experiments in the 1990s with service-oriented computing, the idea of big Web Services emerged in the early 2000s. These were based on XML-based protocols and standards such as Simple Object Access Protocol (SOAP) for service interaction and Web Service Definition Language (WSDL) for interface description. Most software services don t need the generality that s inherent in the design of web service protocols. Consequently, modern service-oriented systems, use simpler, lighter weight service-interaction protocols that have lower overheads and, consequently, faster execution. 40 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  41. Microservices Microservices are small-scale, stateless, services that have a single responsibility. They are combined to create applications. They are completely independent with their own database and UI management code. Software products that use microservices have a microservices architecture. Create cloud-based software products that are adaptable, scaleable and resilient. 41 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  42. A microservice example System authentication User registration, where users provide information about their identity, security information, mobile (cell) phone number and email address. Authentication using UID/password. Two-factor authentication using code sent to mobile phone. User information management e.g. change password or mobile phone number. Reset forgotten password. 42 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  43. A microservice example System authentication Each of these features could be implemented as a separate service that uses a central shared database to hold authentication information. However, these features are too large to be microservices. To identify the microservices that might be used in the authentication system, you need to break down the coarse-grain features into more detailed functions. 43 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  44. Functional breakdown of authentication features User registration Authentication using UID/Password Setup new login ID Get login ID Setup new Password Get Password Setup Password recovery information Check Credentials Setup Two-factor authentication Confirm authentication Confirm registration 44 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  45. Authentication microservices UID UID data management Password management Password data Authentication User Info management User data 45 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  46. Characteristics of microservices Self-contained Microservices do not have external dependencies. They manage their own data and implement their own user interface. Lightweight Microservices communicate using lightweight protocols. Implementation-independent Microservices may be implemented using different programming languages and may use different technologies in their implementation. Independently deployable Each microservice runs in its own process and is independently deployable, using automated systems. Business-oriented Microservices should implement business capabilities and needs, rather than simply provide a technical service. Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson. 46

  47. Microservice communication Microservices communicate by exchanging messages. A message that is sent between services includes some administrative information, a service request and the data required to deliver the requested service. Services return a response to service request messages. An authentication service may send a message to a login service that includes the name input by the user. The response may be a token associated with a valid user name or might be an error saying that there is no registered user. 47 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  48. Microservice characteristics A well-designed microservice should have high cohesion and low coupling. Cohesion is a measure of the number of relationships that parts of a component have with each other. High cohesion means that all of the parts that are needed to deliver the component s functionality are included in the component. Coupling is a measure of the number of relationships that one component has with other components in the system. Low coupling means that components do not have many relationships with other components. 48 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  49. Microservice characteristics Each microservice should have a single responsibility i.e. it should do one thing only and it should do it well. However, one thing only is difficult to define in a way that s applicable to all services. Responsibility does not always mean a single, functional activity. 49 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

  50. Password management functionality User functions Supporting functions Create password Check password validity Change password Delete password Check password Backup password database Recover password Recover password database Check database integrity Repair database DB 50 Source: Ian Sommerville (2019), Engineering Software Products: An Introduction to Modern Software Engineering, Pearson.

More Related Content