Go Glow 分布式计算系统 Go Glow

xuanbao2015-10-27 16:00:00 • 6271 次点击    
这是一个分享于 2015-10-27 16:00:00 的项目,其中的信息可能已经有所发展或是发生改变。

Glow 是使用 Go 编写的易用分布式计算系统,是 Hadoop Map ReduceSpark,Flint,Samza 等等的替代品。

Glow 的目标是提供一个库,可以在并行线程或者分布式集群机器中进行更简单计算。

安装:

go get github.com/chrislusf/glow
go get github.com/chrislusf/glow/flow

简单示例:

package main
import (
    "flag"
    "strings"
    "github.com/chrislusf/glow/flow"
)
func main() {
    flag.Parse()
    flow.New().TextFile(
        "/etc/passwd", 3,
    ).Filter(func(line string) bool {
        return !strings.HasPrefix(line, "#")
    }).Map(func(line string, ch chan string) {
        for _, token := range strings.Split(line, ":") {
            ch <- token
        }
    }).Map(func(key string) int {
        return 1
    }).Reduce(func(x int, y int) int {
        return x + y
    }).Map(func(x int) {
        println("count:", x)
    }).Run()
}

image

Glow is an easy-to-use distributed computation system written in Go, similar to Hadoop Map Reduce, Spark, Flink, Storm, etc. I am also working on another similar pure Go system, https://github.com/chrislusf/gleam , which is more flexible and more performant.Read More

Latest commit to the master branch on 11-2-2018
Download as zip
授权协议:
Apache
开发语言:
Google Go 查看源码»
操作系统:
Linux
6271 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传