Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Performance Rating: Low Analysis: While you can create applications implemented from this pattern that perform very well, overall this pattern does not naturally lend itself to high-performance applications due to the distributed nature of the microservices architecture pattern.

Space-Based Architecture

The space-based pattern (also sometimes referred to as the cloud architecture pattern) minimizes the factors that limit application scaling. This pattern gets its name from the concept of tuple space, the idea of distributed shared memory. High scalability is achieved by removing the central database constraint and using replicated in-memory data grids instead. Application data is kept in memory and replicated among all the active processing units. Processing units can be dynamically started up and shut down as user load increases and decreases, thereby addressing variable scalability. Because there is no central database, the database bottleneck is removed, providing near-infinite scalability within the application.

A tuple space is an implementation of the associative memory paradigm for parallel/distributed computing. It provides a repository of tuples that can be accessed concurrently.


The processing unit typically contains the application modules, along with an in-memory data grid and an optional asynchronous persistent store for failover. It also contains a replication engine that is used by the virtualized mid‐ dleware to replicate data changes made by one processing unit to other active processing units. 

Image Added


Image Added


The virtualized-middleware component handles housekeeping and communications. It contains components that control various aspects of data synchronization and request handling. Included in the virtualized middleware are the messaging grid, data grid, processing grid, and deployment manager. These components, which are described in detail in the next section, can be custom written or purchased as third-party products.


There are four main architecture components in the virtualized middleware: the messaging grid, the data grid, the processing grid, and the deployment manager. 

Messaging Grid

The messaging grid manages input request and session information. When a request comes into the virtualized middleware component, the messaging-grid component determines

  • which active processing components are available to receive the request
  • forwards the request to one of those processing units.

The complexity of the messaging grid can range from a simple round-robin algorithm to a more complex next-available algorithm that keeps track of which request is being processed by which processing unit.

Image Added

Data Grid

The data-grid component is perhaps the most important and crucial component in this pattern.

The data grid

  • interacts with the data replication engine in each processing unit to manage the data replication between processing units when data updates occur.

Since the messaging grid can forward a request to any of the processing units available, it is essential that each processing unit contains exactly the same data in its in-memory data grid. Although the diagram below shows a synchronous data replication between processing units, in reality this is done in parallel asynchronously and very quickly, sometimes completing the data synchronization in a matter of microseconds (one millionth of a second).

Image Added

Processing Grid

The processing grid is an optional component within the virtualized middleware that manages distributed request processing when there are multiple processing units, each handling a portion of the application.

If a request comes in that requires coordination between processing unit types (e.g., an order processing unit and a customer processing unit), it is the processing grid that mediates and orchestrates the request between those two processing units.

Image Added

Deployment Manager

The deployment-manager component

  • manages the dynamic startup and shutdown of processing units based on load conditions.
  • continually monitors response times and user loads, and starts up new processing units when load increases
  • shuts down processing units when the load decreases.

It is a critical component to achieving variable scalability needs within an application.


Considerations

The space-based architecture pattern is a complex and expensive pattern to implement.

It is:

  • a good architecture choice for smaller web-based applications with variable load (e.g., social media sites, bidding and auction sites). 
  • not well suited for traditional large-scale relational database applications with large amounts of operational data.


Testability Rating: Low Analysis: Achieving very high user loads in a test environment is both expensive and time consuming, making it difficult to test the scalability aspects of the application.

Ease of development Rating: Low Analysis: Sophisticated caching and in-memory data grid prod‐ ucts make this pattern relatively complex to develop, mostly because of the lack of familiarity with the tools and products used to create this type of architecture. Furthermore, special care must be taken while developing these types of architectures to make sure nothing in the source code impacts performance and scalability.

Pattern Analysis Summary

Image Added


References

...