{"id":5740,"date":"2023-06-26T15:07:31","date_gmt":"2023-06-26T12:07:31","guid":{"rendered":"https:\/\/www.roweb.ro\/blog\/?p=5740"},"modified":"2023-06-27T11:02:47","modified_gmt":"2023-06-27T08:02:47","slug":"microservices-architecture","status":"publish","type":"post","link":"https:\/\/www.roweb.ro\/blog\/microservices-architecture\/","title":{"rendered":"<b>Moving from monolith architecture to microservices <\/b>| How did this decision influence the digital transformation of our client (nGage &#8211; UK)"},"content":{"rendered":"\n<div class=\"suits\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"576\" src=\"https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2023\/06\/featured-img-en-2-1024x576.png\" alt=\"\" class=\"wp-image-8005 simple-no-border\" srcset=\"https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2023\/06\/featured-img-en-2-1024x576.png 1024w, https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2023\/06\/featured-img-en-2-300x169.png 300w, https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2023\/06\/featured-img-en-2-1536x864.png 1536w, https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2023\/06\/featured-img-en-2-2048x1152.png 2048w, https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2023\/06\/featured-img-en-2-624x351.png 624w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n  <p>\n    \u201cThe more complex a solution is. the more difficult it will be to develop\n    it.\u201d\n  <\/p>\n\n  <p>This sounds like a perfectly logical statement, right?<\/p>\n\n  <p>\n    Microservices architectural approach was created to defuse this logic. As a\n    result of an evolutionary approach that is based on development experience,\n    microservices architectural development is the next step in creating\n    <a href=\"\/portfolio\">complex and flexible solutions<\/a>.\n  <\/p>\n\n  <p>\n    To provide a clear example, let&#8217;s look at a case study recently published by\n    Roweb. Our client, a UK-based human resources company, decided to switch to\n    a microservices-based architecture and prioritize a mobile-first approach.\n  <\/p>\n  <p>\n    nGAGE decided to make this transition because they wanted an application\n    that would always be easily accessible and manageable for all types of\n    users. Additionally, they needed the ability to quickly develop new features\n    that would streamline daily activities.\n  <\/p>\n  <p>\n    It is a modular approach that allows applications to be broken down into\n    smaller pieces that work perfectly both together and independently.\n  <\/p>\n\n  <p>\n    Each service is developed separately, the final solution being, practically,\n    the sum of its allocated services. For providing a logical and\n    disruption-free environment, these independent services are containerized\n    and hosted on a server and communicate with each other using\n    language-agnostic protocols.\n  <\/p>\n\n  <p>\n    The microservices approach has become the first option for both development\n    teams and clients, especially because of easy code updates, fast scalability\n    of each service, and the reduced costs associated with the development and\n    deployment of the application.\n  <\/p>\n  <h2 class=\"header-with-badget\">\n    What the transition from monolithic architecture to microservices meant for\n    nGAGE\n  <\/h2>\n  <p>\n    nGAGE is a UK-based recruitment and human resources company focusing on\n    maintaining a competitive advantage and continuously developing its services\n    to offer better solutions.\n  <\/p>\n  <p>\n    As time passed, the company&#8217;s efforts were recognized through multiple\n    certifications and awards, highlighting the importance of maintaining a\n    high-quality standard for its clients.\n  <\/p>\n  <p>\n    Our collaboration with nGAGE began in 2014 by developing a platform that\n    streamlines HR processes, automates tasks, and enables ongoing improvements.\n  <\/p>\n  <p>\n    As nGAGE became more successful, the database grew and there was a greater\n    need to improve processes even further.\n  <\/p>\n  <p>\n    Recently, in collaboration with the nGAGE team, we developed a new version\n    of the application hosted in the cloud and designed specifically for mobile\n    devices. This solution aims to be user-friendly and accessible to all types\n    of company users, including the nGaGE team, suppliers, candidates, and\n    employers.\n  <\/p>\n  <p>\n    The project, referred to as VMS 435, has gone through four versions, with\n    the most recent being named Bridge. This iteration acts as a connection\n    between the company and its users, as the name implies.\n  <\/p>\n  <h2 class=\"header-with-badget\">\n    How the migration from a monolithic architecture to microservices helped\n    nGAGE\n  <\/h2>\n  <p>\n    To automate the processes, we developed for nGAGE a solution that runs on a\n    single page, adapted for Mobile devices, and whose main trigger was the need\n    for users to have instant access to nGAGE products directly from\n    smartphones.\n  <\/p>\n  <p>\n    Once with the fourth version of the application, users could benefit from\n    advantages such as:\n  <\/p>\n  <ul class=\"blue-checkbox\">\n    <li>\n      the possibility of obtaining reports and statistics, and easy to access,\n      from a single dashboard,\n    <\/li>\n    <li>quick access to information through the iOS and Android platforms,<\/li>\n    <li>\n      instant notifications regarding the activity on the platform (and the\n      possibility of customizing them effectively),\n    <\/li>\n    <li>document management and archiving, using the application,<\/li>\n    <li>monitoring data about activities, candidates and the company,<\/li>\n    <li>scheduling recruitment meetings.<\/li>\n  <\/ul>\n  <p>\n    The transition from the monolithic architecture to microservices has\n    simplified the development process of new functionalities without any\n    limitations.\n  <\/p>\n  <p>\n    In addition, the application underwent design updates that significantly\n    improved its performance. The migration process also proved to be beneficial\n    for nGAGE as it allowed for faster development of new features in line with\n    the company&#8217;s digital transformation goals.\n  <\/p>\n  <h2 class=\"header-with-badget\">\n    For what types of projects is this approach suitable?\n  <\/h2>\n\n  <p>\n    Even if microservice architectural development is a great choice for\n    building scalable and robust solutions, this approach is not suitable for\n    any project and any business type.\n  <\/p>\n\n  <p>So, you must rely on this approach only if:<\/p>\n  <ul class=\"blue-checkbox\">\n    <li>\n      <b>you want to develop complex solutions<\/b> (e.g., large monolithic\n      applications, big software, convert complex legacy systems);\n    <\/li>\n    <li>\n      <b>work with\n        <a href=\"\/services\/dedicated-team\">dedicated development teams<\/a><\/b>\n      for boosting scalability and speed up the development process;\n    <\/li>\n    <li>\n      <b>your business has the resources<\/b> and capabilities to manage it: can\n      deploy new services or applications fast, can track down issues when they\n      arise, relies on DevOps practices and culture, has skilled testing teams\n      for keeping things on track (add new dependencies, handle database errors,\n      network latency, caching issues, or service unavailability, etc.), has\n      designed the solution together with bottlenecks and errors scenarios, etc.\n    <\/li>\n  <\/ul>\n\n  <div class=\"blue-info image-pc\" style=\"width: 100% !important\">\n    <div class=\"col-lg-12\">\n      <p class=\"white-block\">\n        <b>Need support for choosing the right developing approach for your\n          projects? Get our experts\u2019 advice!<\/b>\n      <\/p>\n      <p>\n        <a class=\"contact-us\" href=\"\/contact\"> Book a consultancy session <\/a>\n      <\/p>\n    <\/div>\n  <\/div>\n\n  <h2 class=\"header-with-badget\">Microservices vs SOA?<\/h2>\n\n  <figure class=\"wp-block-image\">\n    <img decoding=\"async\" loading=\"lazy\" width=\"750\" height=\"941\" src=\"https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2021\/09\/table1.png\" alt=\"Microservices vs SOA\" class=\"wp-image-5744 simple-no-border\" srcset=\"https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2021\/09\/table1.png 750w, https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2021\/09\/table1-239x300.png 239w, https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2021\/09\/table1-624x783.png 624w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/>\n  <\/figure>\n\n  <h2 class=\"header-with-badget\">Microservices and APIs<\/h2>\n\n  <p>\n    Designed as doorways, APIs allow developers to accomplish access to an\n    application\u2019s data or use an application\u2019s functionality.\n  <\/p>\n\n  <p>\n    Practically, APIs are the communications frameworks that facilitate the\n    interactions between developers and web apps and the way a microservice can\n    be distributed to users.\n  <\/p>\n\n  <p>\n    Microservices rely on private APIs for being functional (APIs being\n    responsible for both the usability and the exposure of a service), these\n    usually sending data by means of HTTP requests. The types of API design\n    styles include REST, SOAP, GraphQL, gRPC, and many use specification formats\n    like OpenAPI, RAML, or AsyncAPI.\n  <\/p>\n\n  <p>\n    Resuming the relation between APIs and microservices, we can say that they\n    are made to work together. Each microservice has a decentralized nature\n    imposing the need for a framework specialized communications.\n  <\/p>\n\n  <h2 class=\"header-with-badget\">Microservices architecture challenges<\/h2>\n\n  <ul class=\"blue-checkbox\">\n    <li>\n      requires product management capabilities (microservices are rather\n      products than projects);\n    <\/li>\n    <li>\n      being an un-traditional model that relies on decentralized items requires\n      greater attention to management and synchronizations;\n    <\/li>\n    <li>\n      requires automation for scaling the infrastructure for avoiding system\n      failure;\n    <\/li>\n    <li>\n      each microservice must be designed for a specific responsibility,\n      resulting in increased complexity;\n    <\/li>\n    <li>\n      being deployed across multi-cloud environments, microservices architecture\n      can generate an increased risk in terms of security;\n    <\/li>\n    <li>complex testing for microservices-based applications.<\/li>\n  <\/ul>\n\n  <h2 class=\"header-with-badget\">\n    &#8230;still, why you should rely on the microservices approach for developing\n    your projects\n  <\/h2>\n\n  <ul class=\"blue-checkbox\">\n    <li>help companies to be more agile;<\/li>\n    <li>allow developers to build more scalable applications;<\/li>\n    <li>faster development cycles;<\/li>\n    <li>can be developed multiple microservices simultaneously;<\/li>\n    <li>a shorter time spent in development;<\/li>\n    <li>small services &#8211; code easier to understand and take over;<\/li>\n    <li>each service can be scaled independently;<\/li>\n    <li>no limitations in choosing languages and frameworks;<\/li>\n    <li>better fault isolation &#8211; less impact over the complete solution;<\/li>\n    <li>easy maintenance.<\/li>\n  <\/ul>\n\n  <h2 class=\"header-with-badget\">\n    Example of a microservices architecture-based project (developed by our\n    teams)\n  <\/h2>\n  <p>\n    We developed a modular waste management solution based on the\n    \u201cpay-as-you-throw\u201d concept that integrates:\n  <\/p>\n\n  <ul class=\"blue-checkbox\">\n    <li>a dedicated mobile app for waste collectors.<\/li>\n    <li>\n      a management web cloud app with several modules (CRM, Operations,\n      Financial, etc.).\n    <\/li>\n    <li>a dedicated mobile app for the final client.<\/li>\n  <\/ul>\n\n  <p>\n    Based on MSA (Microservices Architecture), SmartSanitation contains several\n    microservices:\n  <\/p>\n  <ul class=\"blue-checkbox\">\n    <li>\n      <b>Presentation<\/b> &#8211; written as well using SOLID principles to be\n      reactive to events using RabbitMq, store its own data in separate\n      databases, communicate with other microservices over HTTP using Consul to\n      get IP and port using DNS, be resilient to failure using Polly, segregate\n      business logic implementing Command pattern using MediatR, expose itself\n      at runtime to Consul.\n    <\/li>\n\n    <li>\n      <b>CRMService<\/b> &#8211; that contains the following technologies: C#, Asp.Net\n      5, PostgreSQL, EntityFramework Core as ORM, OpenAPI, Steeltoe as client\n      for Consul, MediatR to segregate the business logic.\n    <\/li>\n\n    <li>\n      <b>TmService<\/b> &#8211; contains contracts, products, services with management\n      options and stores the flow activities. TmService receives events through\n      RabbitMq to mark products when emitting automated invoices and stores its\n      data in PostgreSQL. TmService contains the following technologies: C#,\n      Asp.Net 5, PostgreSQL, MassTransit for RabbitMq client and implementing\n      pub\/sub pattern, EntityFramework Core as ORM, OpenAPI, Steeltoe as a\n      client for Consul, MediatR to segregate the business logic.\n    <\/li>\n\n    <li>\n      <b>FinancialService<\/b> &#8211; a microservice that tracks all invoices and\n      transactions and allows the creation of an invoice manually or automated.\n      FinancialService communicates with PdfService, CrmService, TmService, and\n      ApiOrchestrator directly through HTTP and sends events to TmService\n      through RabbitMq. It also stores its data in PostgreSQL. FinancialService\n      contains the following technologies: C#, Asp.Net 5, PostgreSQL,\n      MassTransit for RabbitMq client and implementing pub\/sub pattern,\n      EntityFramework Core as ORM, OpenAPI, Polly for circuit breaker, Hangfire\n      for scheduled jobs, Refit to make it easier to communicate with other\n      services over HTTP, Steeltoe as a client for Consul, MediatR to segregate\n      the business logic.\n    <\/li>\n\n    <li>\n      <b>PdfService<\/b> &#8211; an agnostic service that communicates with an FTP\n      server with the possibility to store, read and generate PDFs. PdfService\n      contains the following technologies: C#, Asp.Net 5, IronPdf library to\n      generate Pdfs from .cshtml templates, OpenAPI, Steeltoe as a client for\n      Consul, MediatR to segregate the business logic.\n    <\/li>\n\n    <li>\n      <b>EmailService<\/b> &#8211; an agnostic microservice that sends emails to\n      specific email accounts using Sendgrid client. EmailService contains the\n      following technologies: C#, Asp.Net 5, OpenAPI, MassTransit for RabbitMq\n      client and implementing pub\/sub pattern, SendGrid client, MediatR to\n      segregate the business logic.\n    <\/li>\n\n    <li>\n      <b>Authentication<\/b> &#8211; the service that creates accounts, generates\n      tokens and keeps the logic for authentication. It also stores its data in\n      PostgreSQL. Contains the following technologies: C#, Asp.Net 5,\n      PostgreSQL, OpenAPI, MediatR to segregate the business logic, MailKit to\n      implement custom smtp logic, Steeltoe as client for Consul, JWT for\n      authorization.\n    <\/li>\n\n    <li>\n      <b>ApiGateway<\/b> &#8211; a gateway service with the role of exposing\n      microservices endpoints and authorization logic. It is the only service\n      that communicates directly with client apps. ApiGateway contains the\n      following technologies: C#, Asp.Net 5, Ocelot library to implement API\n      Gateway using microservices DNS stored in Consul, JWT for authorization.\n    <\/li>\n\n    <li>\n      <b>ApiOrchestrator<\/b> &#8211; implements custom business logic by aggregating\n      data for mobile and invoices. ApiOrchestrator contains the following\n      technologies: C#, Asp.Net 5, MediatR to segregate the business logic,\n      OpenAPI, Polly for circuit breaker.\n    <\/li>\n\n    <li>\n      <b>Common projects<\/b> (ApiKernel, DataAccessKernel, ErpCommons) &#8211; are\n      used to implement DRY (Do not Repeat Yourself) principle, adding more\n      stability to the solution by having a common place to store DTOs (Data\n      Transfer Objects) and generic abstraction of the logic.\n    <\/li>\n  <\/ul>\n\n  <figure class=\"wp-block-image\">\n    <img decoding=\"async\" loading=\"lazy\" width=\"750\" height=\"412\" src=\"https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2021\/10\/Group-17.png\" alt=\"proiect cu arhitectura de microservicii\" class=\"wp-image-5784 simple-no-border\" srcset=\"https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2021\/10\/Group-17.png 750w, https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2021\/10\/Group-17-300x165.png 300w, https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2021\/10\/Group-17-624x343.png 624w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/>\n  <\/figure>\n\n  <p>\n    Each microservice is written using SOLID principles to be reactive to events\n    using RabbitMq, store its own data in separate databases, communicate with\n    other microservices over HTTP using Consul to get IP and port using DNS, be\n    resilient to failure using Polly, segregate business logic implementing\n    Command pattern using MediatR, and expose itself at runtime to Consul.\n    Detached from these microservices, the solution uses separate processes in\n    the same context, with the responsibility to automate some flows using\n    BackgroundServices and Hangfire.\n  <\/p>\n\n  <p>\n    The entire solution is containerized using Docker, keeping each service\n    image on Docker Hub and deploying everything to the host machine using\n    docker-compose.\n  <\/p>\n\n  <div class=\"blue-info image-pc\" style=\"width: 100% !important\">\n    <div class=\"col-lg-12\">\n      <p class=\"white-block\">\n        <b>Interested in building a microservices-based solution for your\n          company\/clients with Roweb\u2019s teams?<\/b>\n      <\/p>\n      <p>\n        <a class=\"contact-us\" href=\"\/estimation\">\n          Get a free estimate for your project\n        <\/a>\n      <\/p>\n    <\/div>\n  <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u201cThe more complex a solution is. the more difficult it will be to develop it.\u201d This sounds like a perfectly logical statement, right? Microservices architectural approach was created to defuse this logic. As a result of an evolutionary approach that is based on development experience, microservices architectural development is the next step in creating complex [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8005,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[166,171,174],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/posts\/5740"}],"collection":[{"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/comments?post=5740"}],"version-history":[{"count":13,"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/posts\/5740\/revisions"}],"predecessor-version":[{"id":8010,"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/posts\/5740\/revisions\/8010"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/media\/8005"}],"wp:attachment":[{"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/media?parent=5740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/categories?post=5740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/tags?post=5740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}