go-ego / riot

Go Open Source, Distributed, Simple and efficient Search Engine; Warning: This is V1 and beta version, because of big memory consume, and the V2 will be rewrite all code.
Apache License 2.0
6.11k stars 475 forks source link

How to achieve distributed? #62

Open carr123 opened 6 years ago

carr123 commented 6 years ago

看特征介绍里面说支持分布式。 riot哪些地方支持分布式,如何分布式的, 怎么使用分布式特性?

谢谢!

vcaesar commented 6 years ago

Please see the example, you can also implement it yourself, and please speak English.

bobheadxi commented 5 years ago

Hi @vcaesar , I've taken a few looks through the example and am still a little confused about how to proceed. For example:

import cluster "github.com/go-ego/riot/net/grpc"

// ...

        cluster.InitEngine(com.Config{
            Engine: com.Engine{
                StoreEngine: e.engineOpts.StoreEngine,
                StoreFolder: e.engineOpts.StoreFolder,
            },
            Rpc: com.Rpc{
                GrpcPort: []string{}, // ??
                DistPort: []string{}, // ??
                Port:     c.Port,
            },
        })
        go cluster.InitGrpc(c.Port)

thanks in advance!