Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Dubbo | 39,582 | 5,461 | 173 | 9 hours ago | 59 | December 29, 2021 | 1,056 | apache-2.0 | Java | |
The java implementation of Apache Dubbo. An RPC and microservice framework. | ||||||||||
Echo | 27,183 | 2,884 | 2 days ago | 173 | November 07, 2023 | 77 | mit | Go | ||
High performance, minimalist Go web framework | ||||||||||
Kratos | 21,787 | 328 | 18 hours ago | 546 | October 23, 2023 | 79 | mit | Go | ||
Your ultimate Go microservices framework for the cloud-native era. | ||||||||||
Chi | 15,988 | 664 | 2,558 | 2 days ago | 82 | September 07, 2023 | 65 | mit | Go | |
lightweight, idiomatic and composable router for building Go HTTP services | ||||||||||
Falcon | 9,293 | 1,521 | 188 | 2 days ago | 81 | December 05, 2023 | 163 | apache-2.0 | Python | |
The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale. | ||||||||||
Up | 8,739 | 68 | 16 | 2 months ago | 11 | March 02, 2018 | 290 | mit | Go | |
Deploy infinitely scalable serverless apps, apis, and sites in seconds to AWS. | ||||||||||
Easegress | 5,582 | 15 hours ago | 38 | December 04, 2023 | 42 | apache-2.0 | Go | |||
A Cloud Native traffic orchestration system | ||||||||||
Imaginary | 5,166 | 9 days ago | 35 | October 17, 2021 | 116 | mit | Go | |||
Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing | ||||||||||
Dubbo Go | 4,586 | 51 | 3 days ago | 160 | December 02, 2023 | 135 | apache-2.0 | Go | ||
Go Implementation For Apache Dubbo . | ||||||||||
Armeria | 4,516 | 10 | 136 | 7 hours ago | 228 | November 17, 2023 | 639 | apache-2.0 | Java | |
Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard. |
A demonstration of Golang micro-services that expose a HTTP/JSON frontend and then leverages gRPC for inter-service communication.
The example application plots Hotel locations on a Google map:
The web page makes an HTTP request to the API Endpoint which in turn spawns a number of RPC requests to the backend services.
Data for each of the services is stored in JSON flat files under the data/
directory. In reality each of the services could choose their own specialty datastore. The Geo service for example could use PostGis or any other database specializing in geospacial queries.
Docker is required for running the services https://docs.docker.com/engine/installation.
Protobuf v3 are required:
$ brew install protobuf
Install the protoc-gen libraries:
$ go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
Clone the repository:
$ git clone [email protected]:harlow/go-micro-services.git
To make the demo as straigforward as possible; Docker Compose is used to run all the services at once (In a production environment each of the services would be run (and scaled) independently).
$ make run
Vist the web page in a browser:
cURL the API endpoint and receive GeoJSON response:
$ curl "http://localhost:5000/hotels?inDate=2015-04-09&outDate=2015-04-10"
The JSON response:
{
"type": "FeatureCollection",
"features": [{
"id": "5",
"type": "Feature",
"properties": {
"name": "Phoenix Hotel",
"phone_number": "(415) 776-1380"
},
"geometry": {
"type": "Point",
"coordinates": [-122.4181, 37.7831]
}
}, {
"id": "3",
"type": "Feature",
"properties": {
"name": "Hotel Zetta",
"phone_number": "(415) 543-8555"
},
"geometry": {
"type": "Point",
"coordinates": [-122.4071, 37.7834]
}
}]
}
The Jaeger Tracing project is used for tracing inter-service requests. The tracing
package is used initialize a new service tracer:
tracer, err := tracing.Init("serviceName", jaegeraddr)
if err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(1)
}
View dashboard: http://localhost:16686/search
If changes are made to the Protocol Buffer files use the Makefile to regenerate:
$ make proto
The example app data is stored in flat files in the /data
directory. When any of
the data files are manually editied the bindata must be regenerated.
Install the go-bindata libraries:
$ go get -u github.com/go-bindata/go-bindata/...
If changes are made to any of the raw JSON data files use the Makefile to regenerate:
$ make data
Thanks to all the contributors. This codebase was heavily inspired by the following talks and repositories: