Why I give up the go-micro framework?

UULU
1 min readMay 10, 2019

For develop micro-services in GoLang, I begin with a popular framework — go-micro. But until it make me became unbearable.

It Says:

  • Service Discovery — Automatic service registration and name resolution. We can connect other services just by name without IP:PORT any more.
  • Load Balancing — Random hashed load balancing to the same service nodes.
  • Pluggable Interfaces — Makes use of Go interfaces for each distributed system abstraction.

But My Experience:

  • For unifying distributed system interface, it sacrifice their characteristics sometimes. And the unify Option abstract is non-semantic what make me confused.
  • Every Topic need to create a new Broker, that it is terrible. Why we don’t define Topics as enum type, Just one Broker instance to send them.
  • The micro-api expose APIs converted from all GRPC methods. And can’t do any privilege control. But my lot’s of APIs just for internal services, not for users. Such as the sending mail methods.
  • I found that the grpc-gateway is what I wanted exactly. I can expose certain API to users according the real need. To my disappointment, the micro provides very poor compatibility. We have to define twice for every RPC, one for service, another for gate way. (Example)

In a word:

The micro only suit to experience for beginner. You will be bound hands and feet if you use it in a big project.

:(

Now I recreate my project just with GRPC and add plugins as needed. It’s like getting a rebirth.

:)

--

--