DEV Community

Discussion on: Tips for Succeeding with Microservices?

Collapse
 
jeastham1993 profile image
James Eastham

This may cause some stirs, but I have found an extremely small amount of shared code between services to be a huge help.

I tend to use an EventBus for almost all of my inter-service communications (I'm writing an article on this right now). Having a shared 'EventContracts' library that contains a set of interfaces for implementing a certain event has saved me a lot of headaches when it comes to communication.

I sway between one 'Shared' library that all services use to each service having it's own 'Contracts' library. I switch based on the size/complexity of the project.