-
-
-
-
URL copied!
Technological advancements are moving at a rapid pace, especially in architecture where practices are constantly evolving. Modern digital transformation requires the latest architectural practices to cater to the growing demands of businesses and for the scaling of software. In this article, we discuss the most important next-gen architectural practices and their benefits:
- Token-Based Authentication
- Enhanced DevOps Pipeline
- Containerization based code build model
- Service-Based Architecture
- Limit Stored Procedures
Architecture Best Practices
1. Token-Based Authentication
There are multiple types of authentication techniques, the most common of which is cookie-based. A cookie-based authentication server keeps a record of all database connections on the client side of the cookie, which is stored as a session identifier in the browser.
However, cookie-based authentication has limitations:
- Cookie-based authentication is stateful and impacts scalability.
- Cookies work on a single domain only.
- Tight coupling between client and server.
We recommend the Token-based authentication technique for the next-gen architecture because it is stateless. There are multiple token-based authentication techniques, including the best known and most used JWT (Json web token). The server does not keep a record of users who are logged in or of which JWTs have been issued. Instead, every request on the server is accompanied by a token which the server uses to verify the authenticity of the request.
The token is generally sent as an additional Authorization header in the form of Bearer {JWT}. It can also be sent in either the body or as a query parameter of a POST request. The benefits of using token-based authentication include:
- Stateless authentication mechanism.
- Improved scalability and performance.
2. Enhanced DevOps Pipeline
Next, we have an automated CI/CD (Continuous Integration/Continuous Deployment) pipeline for the codebase. This pipeline should deploy the code to different environments; for example, Dev, QA, Product, etc.
Below is a sample of a CI/CD pipeline for .NET projects. As seen in the pipeline, the code repositories are an AzureDevOps code, which is built through the .NET Nuget package manager tool and tested using NUnit.
The Static code analysis of the code is completed initially using a SonarQube or Resharper tool. It then uses dynamic and security testing performed by the Veracode. This is then deployed using the Octopus tool, which can be further tested via a Functional or a Performance test.
Here are the benefits of using an automated CI/CD pipeline:
- Auto code deployment to various environments, e.g. QA, Pre-Prod, Product.
- Frequent releases.
- Integrated Unit testing in CI/CD Pipeline.
- Integrated Static Code analysis.
- Integrated Security scan.
- Improves code quality and consistent code maintenance process.
3. Containerization-based code to This runtime Docker application build model
Code building and deployment should be done using a containerization-based approach. Docker is the leading containerization technology. The basic container wraps the application and its dependencies to create a runtime environment for the application.
This runtime Docker application contains work that is seamlessly applied to any environment Dev, QA, Prod, etc. Below is a reference to an architecture diagram for the running code of Docker containers.
Benefits:
- All Application codes (API/Service) and their dependencies are packaged as a Docker image and run as a Docker container.
- Push Docker images to different environments (QA, CERT, Pre prod, Prod), maintain different Docker versions for images.
- Less time and less operational cost in setting up a new environment.
- This container-based service can be further scaled to be used independently through a container orchestrator service like Kubernetes.
4. Service-Based Architecture
Following a service-based architecture around different business domains enables everything to be serviced as a Rest API or GraphQL, which is easily consumed and reused by other applications. Entire businesses can be approached as a set of independent and accessible APIs.
The following is a reference service-based architecture diagram. The entire business can be seen as a set of Rest API services, which can be easily consumed by business functionalities. This will help to avoid version conflict, remove application compatibility issues, and bring uniformity to the business functionality.
5. Limit Stored Procedures
During the application, stored procedures should be limited as much as possible to avoid:
- SPROCs on a database, which will create a monolithic system that cannot be easily scaled.
- Limitations in automated testing, debugging, error handling, and maintainability.
Apply these steps to reduce stored procedures while moving to the business (API) layer:
- Move the logic of the stored procedure to the business layer of the Rest API/GraphQL handlers. ORM tools like NHibernate/Entity framework can also be used.
- Call relevant SQL scripts through DAPR (Micro ORM) in Rest API.
The benefits of using this approach include easier code maintenance and debugging, error handling, and writing automated unit testing as well as improvements in scalability.
Conclusion
The next-gen architecture practices above can be adapted to any project at any scale, offering several benefits to the project’s maintenance. Adopting these architecture best practices will lead to loosely coupled, stateless applications that are easier to build, maintain, test, and deploy.
Top Insights
Best practices for selecting a software engineering partner
SecurityDigital TransformationDevOpsCloudMediaMy Intro to the Amazing Partnership Between the...
Experience DesignPerspectiveCommunicationsMediaTechnologyAdaptive and Intuitive Design: Disrupting Sports Broadcasting
Experience DesignSecurityMobilityDigital TransformationCloudBig Data & AnalyticsMediaLet’s Work Together
Related Content
Enterprise GenAI: The Time to Focus on High-ROI Use Cases is Now
In the relentless pursuit of digital transformation, enterprises are constantly seeking innovative avenues to maintain a competitive edge. Generative Artificial Intelligence (GenAI) stands out as one of the most promising frontiers in this quest. Unlike traditional AI, which primarily focuses on data analysis and interpretation, GenAI has the unique ability to generate new, original content, ideas, and solutions, making it an indispensable tool for businesses across various sectors.
Learn More
DevOps for Customer First Strategy
In the healthcare industry where medical insurance providers are competing with each other to acquire more and more customers, evaluating customers' application to assign a risk level is of prime importance. This helps in formulating the policies and the premium that a customer needs to pay. In order to work on this the insurance companies must share their data which is highly susceptible of being stolen and misused against them by their corporate rivals.
Learn More
Master the skills of QAOps
Recently, the IT world has been experiencing an explosion of different terms related to operations. The good old days—when the global order was defined around a rule of thumb and IT as separate from business—are gone, never to return. Dozens of ‘Ops’ crowded the sphere of software testing: starting with trendy DevOps.
Learn More
The rise of digital cognitive behavioral therapy
In today’s world, more and more people are struggling with depression, anxiety, addiction and a whole range of similar mental health problems. In most of the cases, people are not even aware of the fact that they are fighting with some kind of mental illness. Managing these problems is not an easy task and ignoring these problems calls for unwanted actions and severe consequences, but fortunately we have Cognitive behavioral therapy (CBT) to help people manage their problems by making simple changes in the way they think and behave.
Learn More
Virtual Health Assistant – Transforming Value Based Care
Digital virtual health assistant, also known as virtual health care assistants, are digital platforms that use artificial intelligence (AI) technology to assist individuals manage their health and wellness. These virtual assistants use natural language processing, machine learning and other AI powered technologies to provide a wide range of services.
Learn More
ML – federated learning – Application in life insurance industry
In the healthcare industry where medical insurance providers are competing with each other to acquire more and more customers, evaluating customers' application to assign a risk level is of prime importance. This helps in formulating the policies and the premium that a customer needs to pay. In order to work on this the insurance companies must share their data which is highly susceptible of being stolen and misused against them by their corporate rivals.
Learn More
FinGreen 2.0 : Exploring the role of climate fintech in creating a more sustainable future
There are a number of similar sounding terminologies that a user would come across when exploring a data catalog. In this section we look at the important terms and how they are related to each other.
Learn More
The future of frontend development: Emerging trends and technologies
Let’s start with the history of the Web. It was 1991 when the first web page went live and our lives were changed drastically. Today, millions of people spend hours surfing the internet, making money and investing money, gaining university degrees, listening to music, and watching movies, educational theories, videos, and more.
Learn More
Share this page:
-
-
-
-
URL copied!