Skip to content

Instantly share code, notes, and snippets.

@dtoma
Created February 15, 2019 08:44
Show Gist options
  • Save dtoma/af27c8f4e977f3509722b4eaae77fcf9 to your computer and use it in GitHub Desktop.
Save dtoma/af27c8f4e977f3509722b4eaae77fcf9 to your computer and use it in GitHub Desktop.
Problems with microservices

Problems with microservices

Dependencies

We have Projects A, B, and C. We have Team 1 and Team 2.

  • Project A (Team 1) depends on a library, version==1.1.0
  • Project B (Team 2) dependes on the same library, 1.0.0 < version < v1.2.0.
  • Project C (Team 2) depends on the same library, 1.0.0 < version < v1.2.0.
  • Project A depends on Project C. One day, Team 2 updates projects B and C's dependencies, making their version requirements version==1.3.0, in order to benefit from a bug fix. Now Team 1 has to update Project A to handle a new version of one of its dependencies. Sometimes this can be quick and painless, sometimes it can be painful. The more scattered projects there are, the more dependencies between these projects, the more likely version clashes can happen.

Refactoring

  • Team 1 maintains an REST API and a client to that API.
  • Teams 2 and 3 each maintain a client for the API.

One day, Team 1 changes an endpoint from /users/<signed_on_before_date> to /users?signed_on_before=<date>. Now Teams 2 and 3 both need to update their clients and do some integration testing. Both teams would probably rather be working on their own tasks instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment