Skip to content

Στρεαμ is the simple distributed stream-processing system

Notifications You must be signed in to change notification settings

tariel-x/stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Στρεαμ

Στρεαμ is the simple distributed stream-processing system.

Key features:

  • 💣 No persistence;
  • 💥 No topics;
  • 🔥 No acknowledges.

Build

Requirements: go 1.12+

go build -o stream_server

Run

./stream_server run --listen=localhost:7001 --nodes=localhost:7001,localhost:7002,localhost:7003

Where:

  • listen - host to listen;
  • nodes - other stream nodes.

Usage

Go client library

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)
	}
}

Client protocol

  1. PUSH a - push value a to the cluster;
  2. PULL 0 - start reading log from the epoch 0. NB! epoch is not a value number in the values list.
  3. GET 0 - read log from the epoch o to the end of the values list.

Internal

Στρεαμ implements Paxos consensus protocol.

About

Στρεαμ is the simple distributed stream-processing system

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages