Microservices use distributed computing to isolate and scale application service components, and this is the hot trend for application development. SingleStore sees this trend continuing because of the prolific increase of real-time applications. These applications require deep analytics and a strategy for manageable components delivering speed and scale.
Each application service component has its own independent service deployment and flexible data model. The goal is to allow developers to focus on building business logic rather than coordinating with corporate models and infrastructure constraints.
Microservices has promise for improving developer productivity but also has known drawbacks that need to be addressed. Decisions and struggles with Microservices include distributed transactions, eventual consistency and high performance analytics. One approach to addressing these challenges is to define the most appropriate data repository for your services, which also provides the flexibility to modify the data model at a service level while also delivering high performance joins to other objects. In addition the repository will also need to provide high performance analytics across all the data within a domain.
By making a few base decisions and leveraging SingleStore as the data repository a highly flexible, scalable and performant solution can be delivered. The first choice is to leverage a single database table per service. The second choice is to leverage JSON as the model for your service data.
SingleStore and Microservices Architecture
How the components work together
SingleStore has extended its SQL to support the traversing of JSON objects as well as the extraction of data from a JSON object so it can be fully indexed. Additionally once indexed it can also deliver fast, distributed join performance across SingleStore tables. Microservices addresses performance and scale of independent services; by adding SingleStore you also get high speed analytics, transactions and SQL queries across a distributed platform without having to restructure or move your data.
One complexity of Microservices is the need to perform transactions across JSON objects (i.e. Customer orders have to update customer spend, place the order, and reserve inventory). While spending time on application development for committing complex transactions is possible, it adds great an entire new set of programming challenges for a developer’. SingleStore supports distributed transactions across the SingleStore nodes so the developer simply submits the required SQL transaction and SingleStore handles the rest.
SingleStore supports flexible service definitions by using a JSON model. Developers can add data attributes without impacting SingleStore database queries or requiring ETL modifications. Additionally, SingleStore supports the streaming of JSON data directly into tables without having to build out a table schema. Streaming of JSON data allows developers to take advantage of event driven models as well as immediately consistent transactional models.
The ability to deliver real time analytics within a Microservices Architecture is uniquely enabled by SingleStore. Combining SingleStore into your Microservices Architecture supports the goals of independent scaling and flexible development while also reducing the challenges of Microservices Architectures.
SingleStore helps eliminate the struggles with Microservices. SingleStore includes a distributed transaction capability so developers are not burdened with distributed transaction complexity. Using SingleStore means there is no need to settle for eventual consistency as SingleStore provides immediate consistency within its read commit model. Additionally, SingleStore provides rich analytics capabilities for today’s analytics tools to interact and deliver real time information to your business.
Visit www.singlestore.com/free to try SingleStore today!