micro / services

Real World Micro Services
Apache License 2.0
1.27k stars 139 forks source link
micro services

Micro Services Go.Dev reference License

Real world Micro services

Overview

Micro services provide the fundamental building blocks for any products, apps or services. They can be used in isolation or combined to create powerful distributed systems. The services are intended to be consumed by each other using RPC and externally through the Micro API.

Rationale

Read more about the reason for Micro Services in this blog post.

Interfaces

Every service starts with a protobuf interface definition, which is a standard used by Google and everyone else now that gRPC is so dominant. The idea is to define the API in protobuf, code generate and implement the handlers for it. The services can be called by other services on the platform using those code generated clients or an API Gateway, which Micro provides. External calls via the API use the same format but with HTTP/JSON endpoints.

Services

Services available thus far:

Usage

Micro Services depend on Micro

Run Micro

Install and run the server first

micro server

Run a Service

Run a service from source

micro run github.com/micro/services/helloworld

Call a Service

To call a service from another

import "github.com/micro/services/helloworld/proto"

Call it through the API

curl "http://localhost:8080/helloworld/Call?name=Alice"

From the command line

micro helloworld call --name=Alice

Browse to

http://localhost:8082/helloworld/Call

Contribute

We welcome contributions of additional services:

Config

Config for each service should be stored under the service key by name

E.g db postgres host address db.address