Hazelcast cluster: serialization and replication issue

955 views Asked by At

Our application consists of several micro services. Each microservice has a configuration for its own hazelcast instance. All hazelcast instances form a cluster with distributed data. Hazelcast replicated map is used as a way to replicate data objects (DTOs include several fields) between those micro services. Microservices are hosted on AWS.

There was a problem with data object serialization that's why we created a separated project with custom serialization config. All data objects (java classes) we want to replicate are listed in this config code. Artifact built from this very configuration project is included in each micro service as a maven dependency. This helps to solve serialization problem.

This solution led us to the new problem what appear if it's needed to add new data object. Firstly we should add this very data object to config project, then rebuild this project. After that, we should rebuild all micro services with updated dependency and redeploy. And if at least one of micro services wasn't rebuilt there will be a serialization error because of this very micro service hazelcast instance doesn't know how to serialize new data object. The process of rebuilding and redeploying all application isn't so convenient for us.

Please, share your experience! Is there any way to make it easier?

1

There are 1 answers

0
tom.bujok On

There's a couple of ways how you could solve your issue: