GithubHelp home page GithubHelp logo

maniacs-sfa / micro Goto Github PK

View Code? Open in Web Editor NEW

This project forked from micro/micro

0.0 3.0 0.0 2.92 MB

A microservice toolkit

Home Page: https://blog.micro.mu/2016/03/20/micro.html

License: Apache License 2.0

Go 99.66% Protocol Buffer 0.34%

micro's Introduction

Micro License GoDoc Travis CI Roadmap Go Report Card

Micro is a microservice toolkit. It simplifies writing and running distributed systems.

Check out go-micro if you want to start writing services in Go now. Examples of how to write services in other languages can be found in examples/greeter.

Learn more about Micro in the introductory blog post https://blog.micro.mu/2016/03/20/micro.html or watch the talk from the Golang UK Conf 2016.

Follow us on Twitter at @MicroHQ, join the Slack community here or check out the Mailing List.

Overview

The goal of Micro is to provide a toolkit for microservice development and management. At the core, micro is simple and accessible enough that anyone can easily get started writing microservices. As you scale to hundreds of services, micro will provide the fundamental tools required to manage a microservice environment.

The toolkit is composed of the following components:

Go Micro - A pluggable RPC framework for writing microservices in Go. It provides libraries for service discovery, client side load balancing, encoding, synchronous and asynchronous communication.

API - An API Gateway that serves HTTP and routes requests to appropriate micro services. It acts as a single entry point and can either be used as a reverse proxy or translate HTTP requests to RPC.

Web - A web dashboard and reverse proxy for micro web applications. We believe that web apps should be built as microservices and therefore treated as a first class citizen in a microservice world. It behaves much the like the API reverse proxy but also includes support for web sockets.

Sidecar - The Sidecar is a language agnostic RPC Proxy which provides all the features of go-micro as a HTTP endpoints. While we love Go and believe it's a great language to build microservices, you may also want to use other languages, so the Sidecar provides a way to integrate your other apps into the Micro world. It can be used as a standalone way to build fault tolerant microservices.

CLI - A straight forward command line interface to interact with your micro services. It also allows you to leverage the Sidecar as a proxy where you may not want to directly connect to the service registry.

Bot A Hubot style bot that sits inside your microservices platform and can be interacted with via Slack, HipChat, XMPP, etc. It provides the features of the CLI via messaging. Additional commands can be added to automate common ops tasks.

Getting Started

Writing a service

Learn how to write and run a microservice using go-micro.

Read the Getting Started guide or the blog post on Writing microservices with Go-Micro.

Install Micro

$ go get github.com/micro/micro

Or via Docker

$ docker pull microhq/micro

Quick start

We need service discovery, so let's spin up Consul (default discovery mechanism; checkout go-plugins to switch it out).

$ go get github.com/hashicorp/consul
$ consul agent -dev -advertise=127.0.0.1

Alternatively we can use multicast DNS with the built in MDNS registry for a zero dependency configuration. Just pass --registry=mdns to the below commands e.g. server --registry=mdns or micro --registry=mdns list services.

Run the greeter example app

$ go get github.com/micro/micro/examples/greeter/server
$ server
2016/06/20 03:03:39 Listening on [::]:62525
2016/06/20 03:03:39 Broker Listening on [::]:62526
2016/06/20 03:03:39 Registering node: go.micro.srv.greeter-34c55534-368b-11e6-b732-68a86d0d36b6

List services

$ micro list services
consul
go.micro.srv.greeter

Get Service

$ micro get service go.micro.srv.greeter
service  go.micro.srv.greeter

version 1.0.0

Id	Address	Port	Metadata
go.micro.srv.greeter-34c55534-368b-11e6-b732-68a86d0d36b6	192.168.1.66	62525	server=rpc,registry=consul,transport=http,broker=http

Endpoint: Say.Hello
Metadata: stream=false

Request: {
	name string
}

Response: {
	msg string
}

Query service

$ micro query go.micro.srv.greeter Say.Hello '{"name": "John"}'
{
	"msg": "Hello John"
}

Read more on how to use the Micro CLI

Community Contributions

Project Description
Micro Dashboard Dashboard for microservices toolchain micro

Sponsors

Roadmap

Roadmap

License

Apache 2.0

Contributing

  1. Join the Slack to discuss
  2. Look at existing coding style
  3. Submit PR
  4. ?
  5. Profit

We're looking for implementations equivalent to go-micro in different languages. Come join the Slack to discuss.

micro's People

Contributors

s8sg avatar arbarlow avatar burdiyan avatar margatroid avatar iheitlager avatar rakanixu avatar rogerso avatar srounce avatar warrickcustomhomes avatar

Watchers

James Cloos avatar Mhd Sami Al Mouhtaseb avatar satnami-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.