Στρεαμ is the simple distributed stream-processing system.
Key features:
- 💣 No persistence;
- 💥 No topics;
- 🔥 No acknowledges.
Requirements: go 1.12+
go build -o stream_server
./stream_server run --listen=localhost:7001 --nodes=localhost:7001,localhost:7002,localhost:7003
Where:
listen
- host to listen;nodes
- other stream nodes.
Download library.
go get github.com/tariel-x/stream/client
Example usage:
package main
import (
"log"
"github.com/tariel-x/stream/client"
)
func main() {
c, _ := client.New("localhost:7001", nil)
conn, _ := c.Connect()
defer conn.Close()
responses, _ := conn.QueryMany(&client.Pull{N: 0})
for {
err := responses.Err()
if err != nil {
log.Println(err)
break
}
response := responses.Next()
if response == nil {
break
}
log.Print(response.Message)
}
}
PUSH a
- push valuea
to the cluster;PULL 0
- start reading log from the epoch0
. NB! epoch is not a value number in the values list.GET 0
- read log from the epocho
to the end of the values list.
Στρεαμ implements Paxos consensus protocol.