Modern App Development Team
*Updated January 23*
The move to the Cloud promises amazing benefits: near-endless on-demand scalability, push-button resilience and fault tolerance, and streamlined cost optimization. So how do Cloud adopters take advantage of such powerful benefits, while still implementing solutions that deliver their unique value proposition? One key I’ve seen is to follow a set of architecture patterns.
Why Architecture Patterns?
According to Wikipedia, an architectural pattern is a general, reusable solution to a commonly occurring problem in software architecture within a given context. Architectural patterns provide a built-in shortcut to innovation by leveraging patterns that are proven, well-documented and well-supported, instead of starting from scratch. The result – increased innovation and higher realization of those sought-after Cloud benefits.
Online is proud to be an AWS Advanced Partner as well as a Microsoft Gold Certified Partner for delivering cloud solutions. The following architectures are based on AWS, but other platforms will have similar features.
Let’s look at three software architecture patterns that can elevate your Cloud solutions:
Modern architectures are commonly made up of more processes and subcomponents than we typically see in legacy architectures. Even if you haven’t fully adopted microservices architecture, traditional solutions often use APIs between multiple clients, wrap multiple third-party vendor components, or manage multiple authorization scopes.
We know that allowing clients direct access to backend services is neither flexible nor efficient; this is a scenario where an architecture pattern can be very helpful. API Gateways establish a single endpoint, which proxies and routes requests to the variety of services registered to it. Services can be substituted and redeployed and the gateway itself is simple enough to be made redundant. This pattern also results in a natural place to implement helpful features like static responses and automated payload transformation.
Amazon API Gateway is a service that provisions API Gateways. It supports integration with backend endpoints and supports REST or WebSocket APIs. Endpoints can be public to the internet or made private and only accessible from an AWS VPC. AWS has been focused on developing integrations between various AWS services. For example, API Gateway can be integrated with AWS Lambda for serverless request handling and with Amazon Cognito to enable seamless authentication and authorization.
High availability, backwards compatibility, and fault tolerance become more difficult to implement as solutions scale and the rate of change increases. Publishing current endpoints out to service clients may require code changes, be error-prone, slow, or even infeasible. Service Registries maintain the most current availability state of all services and all versions of those services registered to it. Services can register themselves with the registry upon execution, or an orchestrator may perform the registration on the service’s behalf. The result is a utility component that allows consumers to easily discover API endpoints throughout deployment, auto-scaling, exception, or other partial platform turbulence.
AWS Cloud Map is a managed service in AWS for implementing central Service Registries. With AWS Cloud Map, clients are able to perform dynamic lookups of active, healthy endpoints that match the type of backend function they are trying to accomplish. Cloud Map also automates health monitoring so that inactive endpoints aren’t available for discovery.
Event-Driven Architecture and Event Sourcing
Modern Applications tend to distribute transaction processing amongst multiple services. If those transactions are done exclusively with REST requests, or if transaction progress is only stored at the end, platform state is at risk of falling out of sync. Event-Driven Architecture and Event Sourcing are complimentary patterns for ensuring consistency and reliability in modern distributed applications. In Event-Driven Architecture, services exchange events such as order completion or credit inquiry via message queues instead of using deeply-nested HTTP transactions.
In Event Sourcing, the events are captured in an atomic and durable event log and read by the consuming service. This allows the application state to be easily restored by replaying past events at any point in time. It is also possible to tolerate intermittent or longer service outages without impacting transaction consistency.
Amazon EventBridge is a serverless event bus service. It provides the capability to route events to destination services and integrates with a long list of commonly used SaaS products and AWS services. It allows you to build event-driven architectures at scale, and also supports event replay functionality. Utilizing its schema registry, event schemas can be centralized by one team and consumed by another, simplifying change management.
AWS also offers other event-focused services such as Kinesis Data Streams, Simple Queue Service (SQS), Amazon MQ, Managed Streaming for Kafka (MSK), and Simple Notification Service (SNS) which may meet your needs. Composing these services together with the rest of your platform can provide the communication backbone necessary to deliver your services at scale.
If you’re not sure where to start, consider investigating this list of patterns optimized for modern cloud services. These are proven patterns that will set you up for success and future development. If you have questions about adopting these architecture patterns in your organization, don’t hesitate to contact us. We’re here to help.
If you haven’t already done so, make sure to download our free eBook, the 6 Best Practices of Modern Application Development, that identifies and breaks down key practices we have identified from our experience as an AWS Advanced Consulting Partner.
Online Business Systems and AWS are available to help our clients with their transformation initiatives by continuously guiding, sharing best practices, and partnering with our valued customers in achieving successful transformations.
Submit a Comment