Modern Software Architecture
Total Page:16
File Type:pdf, Size:1020Kb
Roni Jumpponen Modern Software Architecture Metropolia University of Applied Sciences Bachelor of Engineering Mobile Solutions Bachelor’s Thesis 5 May 2021 Abstract Author Roni Jumpponen Title Modern software architecture Number of Pages 54 pages Date 5 May 2021 Degree Bachelor of Engineering Degree Programme Information and Communications Technology Professional Major Mobile Solutions Instructors Mikael Lindblad, Site Project lead Peter Hjort, Senior Lecturer The aim of the thesis was to research the necessity of software architecture in modern soft- ware development. Another aim was to find out how much architecture and documentation should be done in agile development, and what should be the points of focus. The idea was to use this gathered knowledge to deliver a solid software architecture and design for the partner corporation’s internal use application. The application connected to the thesis is an experimental product utilizing modern sensor and data analysis technologies measuring fill rates based on various metrics. The current experiments include measuring the usage of restaurant, its line queues and the usage of parking lots around the corporation’s campus. The application is meant to be a living product with a long lifespan including collaboration with various third-party organizations such as universities. This thesis builds on the key principles and concepts of traditional software architecture fo- cusing on more modern agile view and considerations on how they could still be beneficial for modern software development. Incremental architecture and design were the themes of this study as the partner company wanted something that would stand the test of time and could be built piece by piece. Ease of expandability and modularity are key concepts for the thesis. The practical part focuses on the decision making which helped to reach the conclusions leading to the project team’s final version of the architecture and the connected cloud solution design. As the architecture is meant to be incremental, it will continue to change and evolve in future. As a result of this study, a cloud solution on MS Azure was built. Also, this study compares different cloud service options for certain areas and cost analysis. Additionally, throughout the thesis there are mentions of different technologies for implementing various mechanisms used for enabling certain architectures and other key implementation details. Keywords Software Architecture, Cloud, System, Design, Agile Tekijä Roni Jumpponen Otsikko Moderni ohjelmistoarkkitehtuuri Sivumäärä 54 sivua Aika 5.5.2021 Tutkinto Insinööri (AMK) Tutkinto-ohjelma Tieto- ja viestintätekniikka Ammatillinen pääaine Mobile Solutions Ohjaajat Projektipäällikkö Mikael Lindblad Lehtori Peter Hjort Insinöörityön tarkoituksena oli selvittää ohjelmistoarkkitehtuurin tarpeellisuus ja paikka mo- dernissa ohjelmistokehityksessä ja vastata kysymykseen, kuinka paljon arkkitehtuuria ja dokumentaatiota tarvitaan ketterässä ohjelmistokehityksessä. Tarkoituksena oli käyttää hankittu tietämys laadukkaan ohjelmistoarkkitehtuurin ja suunnitelman tuottamiseen työn tilaajayrityksen sisäiseen ohjelmistoprojektiin. Insinöörityössä kehitetty sovellus on kokeellinen tuote, joka hyödyntää moderneja sensori- ja data-analyysiteknologioita, jotka mittaavat käyttöasteita käyttäen erilaisia mittaustapoja. Tämänhetkiset kokeet sisältävät yrityksen kampuksen ravintolan käyttöasteen, jonotusajat ja pysäköintipaikkojen käyttöasteen. Sovelluksen tarkoituksena on olla pitkän elinkaaren tuote, jota kehitetään yhteistyössä eri tahojen kanssa, kuten yliopistojen ja ammattikorkea- koulujen. Insinöörityö rakentui perinteisen ohjelmistoarkkitehtuurin avainsääntöjen ja -konseptien va- raan tavoitellen modernimpaa ja ketterämpää näkökulmaa sekä tarjoaa ajatuksia siitä, kuinka ne voisivat vieläkin olla hyödyllisiä modernin ohjelmistokehityksen kannalta. Inkrementaalinen arkkitehtuuri ja suunnittelu olivat vahvoja teemoja työssä, koska työn ti- lannut yritys halusi pitkän aikavälin ratkaisua, jonka ympärille voisi rakentaa asioita pikkuhil- jaa. Laajennuksen helppous ja modulaarisuus olivat avainkonsepteja insinöörityössä, ja työn käytännön osuus keskittyi projektiryhmän päätöksentekoon, joka johti arkkitehtuurin viimei- seen versioon ja siihen yhdistettävään pilvipalveluratkaisuun. Arkkitehtuuri tehtiin helposti muokattavaksi ja sen on tarkoitettu muuttuvan vielä tulevaisuudessa. Työn tekninen näkökulma sisälsi pilvipalveluratkaisun rakentamisen MS Azuressa ja eri pal- veluiden välisiä vertailuja sekä hinta-analyysin. Tämän lisäksi insinöörityöraportti sisältää paljon viitteitä erilaisiin teknologioihin, joita käytetään erilaisten arkkitehtuurien mahdollista- miseen tai muihin oleellisiin toteutuksiin. Avainsanat ohjelmistoarkkitehtuuri, pilvi, järjestelmä, suunnittelu, ketterä kehitys Contents List of Abbreviations 1 Introduction 1 2 Software Architecture 2 2.1 Structures 2 2.2 The purpose of software architecture 4 3 Quality attributes 5 3.1 System requirements 6 3.2 Scenarios 6 3.3 Tactics 7 3.4 Availability 7 3.5 Interoperability 8 3.6 Modifiability 10 3.7 Performance 11 3.8 Security 13 3.9 Testability 15 3.10 Usability 18 3.11 Other quality attributes and customized quality attributes 19 4 Software architecture patterns 19 4.1 Layered architecture and monoliths 20 4.2 Microkernel architecture 23 4.3 Microservices 25 5 Agile software architecture 29 5.1 Evolutionary software architecture 31 6 Documenting and visualizing the architecture 32 6.1 Architectural views and notations 33 6.2 C4 Architecture model 33 7 Project background 35 8 Initial project requirements 36 8.1 Functional requirements for the product 36 8.2 Quality attributes 37 8.3 Constraints 37 9 Project infrastructure and early design choices 38 9.1 Toolkit 38 9.2 Early design choices and observations 39 10 Project architecture and pattern choices 40 10.1 First pattern consideration, the microservices 40 10.2 Microkernel style frontend speculations and research 42 10.3 Meet the micro frontends 43 11 Creating a cloud solution design 45 12 Further development and complications 48 13 Azure environments and Cost estimations 49 14 Conclusion for the project, but not for the product 51 References 53 List of Abbreviations C4 Model Context, Container, Component, Code IPC Inter-process communication 1 1 Introduction Software development is evolving at a rapid rate and new concepts and technologies are created on a daily basis. Software architecture follows suite and there are new patterns, methods and principles being created to match the evolution and creation of technolo- gies and methods such as Agile development, new frontend and backend frameworks, public cloud platforms and emergence of edge cloud systems. Software architecture is at the heart of every software application’s development and should never be neglected. This thesis covers how software architecture should be uti- lized in modern agile way of working and what is “just enough” of planning and designing before development can begin and how the architecture and the design evolves during the project’s lifespan. This thesis was done in collaboration with a global technology company and both the software architecture, and the system design being created and evaluated are connected to a real-world project. In the thesis we will go through the principles of software archi- tecture and analyze with examples how these design decisions impacted the develop- ment of the project team’s architecture and the actual software system. Practical work and examples will include creating the documentation and visualization of the architecture along with cloud solution design and implementation on MS Azure. Practical work will cover the key design decisions of translating the software architecture into a cloud solution architecture, process of creating the right design using the cloud native services and implementing the design in practice. The study also includes com- parisons between the different options for services and solutions to certain aspects of the system and includes detailed analysis on the reasoning why the development team chose one solution over the other options when choosing the implementation. The purpose of the thesis is to transmit the conceptual ideas behind software architec- ture, the analytical processes and how modern systems are designed using these pro- cesses and built both on the premises and on the public cloud. 2 This study aims to streamline and compress the information into easily understandable and cohesive package with more practical outlook using real-world examples and rele- vant information towards software engineers looking to start creating their own architec- ture and building their own software systems. ISO/IEC/IEEE International Standard - Systems and software engineering—Vocabulary [1] will be used as a reference for standard software engineering and architecture termi- nology. 2 Software Architecture Software architecture in essence is a set of structures comprised of software elements, their relations to each other and properties of elements and relations. These structures and their combinations are often represented as “views”. Views or viewpoints offer dif- ferent levels of abstraction for representation and visualization. This is important, be- cause stakeholders have different interests and needs that need to be represented and visualized when describing the architecture of a system to them. Stakeholders of the system can be anyone who would be interested in the architecture