Rony lets you create a clustered aware service easily. Checkout Wiki
Rony is very fast and with very low overhead. In a non-raft environment it adds < 25us latency, and in raft-enabled scenario around 1ms latency.
Rony has negligible memory footprint by reusing buffers and pooling.
BenchmarkEdgeServerMessageSerial
BenchmarkEdgeServerMessageSerial-16 901370 1195 ns/op 87 B/op 2 allocs/op
BenchmarkEdgeServerMessageParallel
BenchmarkEdgeServerMessageParallel-16 4521645 272 ns/op 83 B/op 2 allocs/op
BenchmarkEdgeServerWithRaftMessageSerial
BenchmarkEdgeServerWithRaftMessageSerial-16 9541 132065 ns/op 5034 B/op 116 allocs/op
BenchmarkEdgeServerWithRaftMessageParallel
BenchmarkEdgeServerWithRaftMessageParallel-16 124658 8438 ns/op 4462 B/op 51 allocs/op
BenchmarkServerWithWebsocket-16 46514 25138 ns/op 691 B/op 19 allocs/op
package main
import (
"github.com/ronaksoft/rony"
"github.com/ronaksoft/rony/edge"
"os"
)
func main() {
serverID := "UniqueServerID"
edgeServer := edge.NewServer(serverID,
edge.WithTcpGateway(edge.TcpGatewayConfig{
Concurrency: 1000,
MaxIdleTime: 0,
ListenAddress: "0.0.0.0:80",
ExternalAddrs: []string{"127.0.0.1:80"}, // ExternalAddr could be used when the server is behind proxy or nats
}),
edge.WithUdpTunnel(edge.UdpTunnelConfig{
ListenAddress: "0.0.0.0:8080",
MaxBodySize: 0,
ExternalAddrs: nil,
}),
edge.WithGossipCluster(edge.GossipClusterConfig{
Bootstrap: true,
ReplicaSet: 1,
GossipPort: 7091,
}),
)
service.RegisterSampleService(&service.SampleService{}, edgeServer)
edgeServer.Start()
edgeServer.ShutdownWithSignal(os.Kill)
}
This code does not run, please check example directory for working examples
Rony is made of big and popular packages. Without these great libraries building Rony was not possible.
- Hashicorp MemberList
- SPF13 Cobra
- SPF13 Viper
- Valyala FastHttp
- Uber Zap
- Uber Dig
- Gobwas Websocket
- Allegro BigCache
- GoBuffalo Genny
- GoBuffalo Plush
We need to make a clear and understandable documentation for Rony, so any help would be appreciated. We also appreciate benchmarking Rony against other platforms for common scenarios and will be cited.
- Auto-generate REST handlers
- Auto-generate test units
- Implement scenario tests using
edgetest
framework - Write Examples and Tutorials
- Helper functions for dependency injection
- Update constructors to use full name (breaks backward compatibility)
- implement RAFT enabled store