/emojitrack-gostreamer

Experimental Go version of emojitrack-streamer

Primary LanguageGo

emojitrack-gostreamer

Implementation of an API compatible server for the emojitrack-streamer-spec in Go.

Caveats

noidea

This is my first Go project, so there will potentially be some dumb stuff here. Please feel encouraged to send pull requests or line comments even for idiomatic syntax issues when accompanied with an explanation that will help me learn.

Pipeline Flow

Goroutines and channels make it just too much fun to think about things as flow diagrams. This is the essential pipeline for information flow in the main() function for the program.

diagram

Package sseserver

This program doesn't actually do too much beyond the pipeline flow above, as all of the SSE/HTTP server logic has been extracted into a handy modular package that should be usable for any generic SSE broadcasting. For that stuff, delve into the sseserver repo.

Is it any fast?

Yes.:racehorse: Benchmarks coming eventually.

TODO

  • move scorepacker and connectionpool into their own packages
  • possibly add tests for them even!
  • handle redis server reconnects
  • parse standard single REDIS_URL env var
  • dont emit empty msgs (but lets wait until done benchmarking)