• Stars
    star
    1,539
  • Rank 30,183 (Top 0.6 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 7 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Go channels at horizontal scale (powered by message queues)

Go channels at horizontal scale Build Status

  • Use Go channels transparently over a messaging queue technology of your choice (Currently NATS, Redis or NSQ, Amazon SQS)
  • Swap vice.Transport to change underlying queueing technologies transparently
  • Write idiomatic Go code instead of learning queue specific APIs
  • Develop against in-memory implementation before putting it into the wild
  • Independent unit tests (no need for running queue technology)

PROJECT STATUS: v1 released

Usage

This code receives names on the |names| queue, and sends greetings on the |greetings| queue:

// get a Go channel that will receive messages on the
// |names| queue
names := transport.Receive("names")

// get a Go channel that will send messages on the
// |greetings| queue
greetings := transport.Send("greetings")

// respond to |names| messages with |greetings|
for name := range names {
	greetings <- []byte("Hello " + string(name))
}
  • The code above is illustrative, be sure to read the design patterns
  • Always stop the Transport, some technologies register and deregister their interest in the queues (this means trapping signals and gracefully shutting down services before exiting)
  • Use Send and Receive methods to get channels, which you can then use as normal
  • Be sure to always handle the ErrChan() error channel to make sure the underlying queue technology is healthy

Quick start guide

  • Write your services with unit tests using normal Go channels (see our design patterns)
  • Install Vice with go get github.com/matryer/vice/...
  • Select a messaging queue technology
  • Build a command to run your service

Read the blog post: Introducing vice: Go channels across many machines

Acknowledgements

Special thanks go to David Hernandez, Jason Hancock and Piotr Rojek for their support on this project.

More Repositories

1

xbar

Put the output from any script or program into your macOS Menu Bar (the BitBar reboot)
Go
17,483
star
2

xbar-plugins

Plugin repository for xbar (the BitBar reboot)
Shell
2,441
star
3

moq

Interface mocking tool for go generate
Go
1,884
star
4

is

Professional lightweight testing mini-framework for Go.
Go
1,731
star
5

goblueprints

Source code for Go Programming Blueprints
Go
1,346
star
6

silk

Markdown based document-driven RESTful API testing.
Go
939
star
7

gopherize.me

Gopherize.me app
JavaScript
649
star
8

try

Simple idiomatic retry package for Go
Go
332
star
9

way

HTTP routing for Go 1.7
Go
194
star
10

drop

Dependency-less dependencies for Go.
Go
120
star
11

goscript

Goscript: Runtime execution of Go code.
Go
103
star
12

runner

Interruptable goroutines
Go
99
star
13

respond

Idiomatic API responses for Go.
Go
84
star
14

resync

sync.Once with Reset()
Go
71
star
15

anno

Go package for text annotation.
Go
70
star
16

crunchcrunchcrunchstack

This repo is a starting point for a Go + Svelte.js + TailwindCSS project.
Go
63
star
17

golanguk

Source code for Golang UK talk - August 21st 2015, London.
Go
42
star
18

httperr

HTTP error wrapper
Go
35
star
19

articles

Source code repository for articles on https://medium.com/@matryer
Go
34
star
20

m

Get and Set using JavaScript notation
Go
31
star
21

pangaea

Powerful pre-processor for any kind of text file - powered by JavaScript
Go
29
star
22

version

Command line tool for versioning projects
Go
28
star
23

gae-records

Active Record like wrapper for Google App Engine Datasource in Go
Go
28
star
24

present

Presentations repository
Go
26
star
25

codeform

Easy Go code generation using templates
Go
25
star
26

filedb

File based storage and querying package
Go
23
star
27

mix

Go http.Handler that mixes many files into one request.
Go
13
star
28

captainslog

Logging package for Go
Go
12
star
29

persist

Persist loads and saves Go objects to files
Go
11
star
30

appengine

Example application for Google App Engine (As of November 2018)
Go
10
star
31

gocmds

Template for Go commands
Go
7
star
32

flower

In-process task flow management
Go
6
star
33

PathKit

Path tools for iOS and SpriteKit
Objective-C
6
star
34

oo

oo is the worlds simplest JavaScript OO implementation; for when you need classes and nothing else.
JavaScript
4
star
35

github-downloads

Tool (and Go package) for counting GitHub downloads
Go
4
star
36

str

String parsing package for Go. Converts strings to best guess value type.
Go
4
star
37

isvalid

Ultra simple data parsing and validation in Go
Go
3
star
38

codeform-templates

Repository of Codeform templates
Smarty
3
star
39

funkjs

A sweet selection of JavaScript funktion extensions
JavaScript
2
star
40

tailwindcss-github-theme

TailwindCSS GitHub theme for building GitHub styled apps using Tailwind.
2
star
41

rapid-api

Code for 3.5 hour workshop project at infoShare 2016
1
star
42

testing-in-go

Tutorial repo for Testing in Go talk
1
star
43

berlin-devfest-workshop

Code created during Berlin DevFest Workshop
Go
1
star
44

gimme

old location for github.com/matryer/drop
1
star