5 years ago

Microservices and its Related Data Management Challenges

Share in:
Share in:

Oracle Microservices with hierarchy of profile, frontend, and order services.


It’s a great time to be a programmer or software developer. Some resources allow you to copy a snippet of code for your use. This way, you do not have to write the whole thing from scratch. Looking at it on a broader scale, you also have resources that allow you to use smaller modules and come up with a bigger application.

These smaller modules are called microservices. If you are creating a large application, chances are, some of its features and functionalities have been done before. You can just use a microservice module for these features. For instance, if you are coming up with a mobile app and you need a chat feature, you can find a microservice that can do exactly what you need. You just have to link that module to your application.

Benefits of Microservices

That means you no longer have to do all the work for that particular feature, and chances are, that microservice is now bug-free because it has been used before. This scenario leaves you with more time to focus on other more unique facets of your app.

Not only that, if you have a team of developers working on the same application, each one will be able to work on their own assigned feature in the language they are most familiar with. You get to save more time by not having a learning curve.

Microservices give businesses more functionality at a fraction of the time that it used to take to bring it to market.

The Downsides

Microservices, however, does differ from the way we are used to working. Before, business applications use databases to share information. Microservices are best used with APIs, message passing, and events. This means that we might have a problem with data management.

Ideally, microservices should be able to do some data encapsulation or being able to isolate its data from outsiders. It will only share data with an API. Furthermore, you should make sure to avoid data coupling. If one microservice changes the way it presents or processes data, then that change should be communicated with other developers.

Issues with data encapsulation

There are a lot of problems when it comes to data isolation. If you insist on having a pure microservices design, then you will be storing a single type of data plus all the associated data elements. These will be updated only by using an API that is owned by the microservice.

If you need to add a requirement, it would mean that you would need to update the microservice. This can effectively slow down your productivity and affect the release of new features.

Moreover, if you want application-wide data analytics, then it would mean that you would have to work with multiple modules. Each of these microservices would have to retain and then produce the data you need for analysis, and then the analytics components will have to source data from several modules. That means that your analytics component will have to extract, transform, and then bring together all related data you need.

Also, there is a problem in backing out transactions that work with multiple components. For instance, if you have an order with five items, but one of the items is out of stock. In this scenario, it’s either the transaction for the five items succeeds or none of the five succeeds.

Lastly, it will also be very complex to manage data with microservices. This is because each module will need to have its own set of database software tools, and these will need to be installed, monitored, configured, updated, and patched. These databases will need to be reliable and available, and if disaster strikes, they should also be recoverable. More than that, each of these databases will need to be secured.

Oracle Has Good News

Fortunately, Oracle has a more straightforward way that makes more sense than earlier solutions proposed to solve these problems. They suggest using Oracle Database to help you fly with microservices and avoid the complexity of managing data store.

You can use Oracle Database to create pluggable databases. These databases can work with any data model you have, such as key/value, relational, object, JSON, and XML, among others. Pluggable databases are lightweight, small, and isolated by nature. These are connected to a bigger container database.

Pluggable databases can be scaled according to your needs via sharding or in-memory techniques. You can also duplicate and relocate these databases. Each pluggable database will have the features of Oracle Database, so you can add or modify microservices without needing to coordinate too much with other developers.

More features

What’s more, Oracle also has a feature it calls edition-based redefinition. EBR is a great way to minimize data coupling. This feature allows you to change logic and views as necessary. Legacy views and logic will still be accessible for those who need these. You can update any edition and then propagate the changes across other databases.

With these features, you can directly update or access data used in a microservice, even when the module itself is unaware of the changes. Changing the way you represent information on your database will also not affect other modules. These modules can just access the legacy information they need. The legacy data can now be erased once the old data is updated.

This means that developers can now make changes as needed without having to worry about changing the microservices involved and letting other developers know about the changes.

Oracle Database can also make application-wide data analytics easier. The analytics module will directly access the data owned by microservices. You will only be working with data transformations on each pluggable database. You do not need to change the underlying data.

More than that, the microservices now have a simpler operational environment. With container databases, you only have to install, configure, set up, monitor, update, and patch one set of data management tools.

For a more agile development teams

Most development teams like microservices because it makes it faster for them to do their jobs. Developers can work independently. New functionality and features may be added at a fraction of the time it used to take to add them before. With Oracle Database, you can work faster as it lets you avoid all known problems that come with data and how microservices handle them.

In short, by cutting down the complexity and cost, as well as making data easier to manage, Oracle Database makes it easier for you to enjoy the full benefits of microservices.

Photo courtesy of Oracle.

Scroll to Top