Microbus
is a holistic open source framework for the development, testing, deployment and operation of microservices at scale. It combines best-in-class OSS, tooling and best practices into a dramatically-simplified engineering experience.
Build entire cloud-enabled, enterprise-class and web-scalable solutions comprising a multitude of microservices, all on your local development machine. Deploy to suit your needs, as a standalone executable or individual containers.
Start by defining the various properties of the microservice in a YAML file
general:
host: hello.world
configs:
signature: Greeting() (hello string)
default: Hello
validation: str ^[A-Z][a-z]*$
functions:
signature: Add(x int, y int) (sum int)
webs:
signature: Hello()
method: GET
events:
signature: OnDouble(x int)
Use the powerful code generator to create boilerplate and skeleton code
func (svc *Service) Add(ctx context.Context, x int, y int) (sum int, err error) {
// TO DO: Implement Add
return nil
}
func (svc *Service) Hello(w http.ResponseWriter, r *http.Request) (err error) {
// TO DO: Implement Hello
return nil
}
Fill in the gaps with the business logic of the particular microservice
func (svc *Service) Add(ctx context.Context, x int, y int) (sum int, err error) {
if x == y {
// Publish an event
helloworldapi.NewTrigger(svc).OnDouble(ctx, x)
}
// Marshaling to JSON is done automatically
return x+y, nil
}
func (svc *Service) Hello(w http.ResponseWriter, r *http.Request) (err error) {
// Access the config
greeting := svc.Greeting()
// Call another microservice via its client stub
user, err := userstoreapi.NewClient(svc).Me(r.Context())
if err != nil {
// Just return the error
return errors.Trace(err)
}
message := fmt.Sprintf("%s, %s!", greeting, user.FullName())
w.Write([]byte(message))
return nil
}
Add the microservice to the application that manages its lifecycle
func main() {
app := application.New()
app.Add(
configurator.NewService(),
)
app.Add(
httpegress.NewService(),
openapiportal.NewService(),
metrics.NewService(),
)
app.Add(
// Add solution microservices here
helloworld.NewService(),
)
app.Add(
httpingress.NewService(),
)
app.Run()
}
Deploy your apps across machines or availability zones. Microservices communicate via a messaging bus at up to 10X the speed of HTTP/1.1
Distributed tracing, metrics and structured logging provide precision observability of system internals
👉 Follow the quick start guide to set up your system and run the example app
👉 Go through the various examples
👉 Follow the step-by-step guide and build your first microservice
👉 Discover the power of code generation. It’s totally RAD, dude
👉 Learn how to write thorough integration tests and achieve high code coverage
👉 Venture out and explore more on your own
👉 Ready? Build your own solution from scratch
Build your microservices on top of a Connector
construct and use its simple API to communicate with other microservices using familiar HTTP semantics. Under the hood, communication happens over a real-time messaging bus.
Microbus
brings together the patterns and best practices that get it right from the get-go, all in a developer-friendly holistic framework that throws complexity under the bus:
Dig deeper into the technology of Microbus
and its philosophy.
Microbus
and how they stack upMicrobus
’s powerful RAD toolMicrobus
:888
PROD
, LAB
, LOCAL
and TESTING
stderr
strings.yaml
Microbus
stays out ofMicrobus
is maintained in a separate branch for archival purposes and to demonstrate the development process and evolution of the code.A microservice architecture is best suited for addressing the technical and organizational scalability challenges of a business as it grows. Without microservices, the complexity of a monolithic codebase often grows to a point where the engineering team can no longer innovate and collaborate efficiently. In most likelihood the entire solution has to be rewritten at a critical point of the business - when it is growing rapidly - and at prohibitive cost. Investing in microservices from the get-go is a wise investment that mitigates this upside risk.
Building and operating microservices at scale, however, is quite difficult and beyond the skills of most engineering teams. It’s easy to spin up one web server and call it a microservice but things get exponentially more complicated the more microservices are added to the mix. Many teams at some point either call it quits and stop adding microservices, or introduce complex tooling such as service meshes to help manage the complexity. Adding complexity to solve complexity is a self-defeating strategy: the chickens eventually come home to roost.
Microbus
takes a novel approach to the development, testing, deployment and troubleshooting of microservices, and eliminates much of the complexity of the conventional practice. Microbus
is a holistic open source framework that combines best-in-class OSS, tooling and best practices into a dramatically-simplified engineering experience that boosts productivity 4x.
Microbus
is the culmination of a decade of research and has been successfully battle-tested in production settings running SaaS solutions comprising many dozens of microservices.
Microbus
is a holistic open source framework for the development, testing, deployment and operation of microservices at scale.
Microbus
combines best-in-class OSS, tooling and best practices into an elevated engineering experience that eliminates much of the complexity of the conventional practice.
Microbus
’s runtime substrate is highly performant, strongly reliable and horizontally scalable.
Microbus
conforms to industry standards and interoperates smoothly with existing systems.
We want your feedback. Clone the repo, try things out and let us know what worked for you, what didn’t and what you’d like to see improved.
Help us spread the word. Let your peers and the Go community know about Microbus
.
Give us a Github ⭐. And ask your friends to give us one too!
Reach out if you’d like to contribute code.
Corporation? Contact us for sponsorship opportunities.
Find us at any of the following channels. We’re looking forward to hearing from you so don’t hesitate to drop us a line.
Website | www.microbus.io |
info@microbus.io | |
Github | github.com/microbus-io |
linkedin.com/company/microbus-io | |
Slack | microbus-io.slack.com |
Discord | discord.gg/FAJHnGkNqJ |
r/microbus | |
YouTube | @microbus-io |
The Microbus
framework is the copyrighted work of various contributors. It is licensed to you free of charge by Microbus LLC
- a Delaware limited liability company formed to hold rights to the combined intellectual property of all contributors - under the Apache License 2.0.
Refer to the list of third-party open source software for licensing information of components used by the Microbus
framework.