https://github.com/emojitracker/emojitrack-gostreamer
:dizzy: Emojitracker Streaming API (Server implementation)
https://github.com/emojitracker/emojitrack-gostreamer
api emojitracker streaming-api
Last synced: 5 months ago
JSON representation
:dizzy: Emojitracker Streaming API (Server implementation)
- Host: GitHub
- URL: https://github.com/emojitracker/emojitrack-gostreamer
- Owner: emojitracker
- Created: 2014-04-20T04:51:01.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2021-05-01T16:49:43.000Z (about 5 years ago)
- Last Synced: 2026-01-14T10:40:39.372Z (5 months ago)
- Topics: api, emojitracker, streaming-api
- Language: Go
- Homepage:
- Size: 348 KB
- Stars: 17
- Watchers: 4
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
emojitrack-gostreamer
=====================
Implementation of an API compatible server for
the [Emojitracker Streaming API Specification][1] in Go.
[](https://hub.docker.com/r/emojitracker/gostreamer/)
Caveats
-------
This was originally my first major Go project, so there may potentially still
be some silly stuff left in the code here.
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.

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 (freely licensed!) [sseserver](https://github.com/mroth/sseserver/)
repo.
Development
-----------
A sandbox environment is provided to test via Docker Compose, using
[emojitrack/fakefeeder](https://github.com/emojitracker/emojitrack-fakefeeder)
to simulate production traffic.
Simply run `docker compose up` and you'll have a local environment to test
against, with the streamer exposed on port 8001. Try `curl
http://localhost:8001/subscribe/eps` for example.
Production
----------
Currently handled on Heroku, to add remotes manually after cloning the repository:
heroku git:remote --remote production emojitrack-gostreamer
heroku git:remote --remote staging emojitrack-gostreamer-staging
Simply git pushing to either will build and update.
Is it any fast?
---------------
Yes.:racehorse:
[1]: http://github.com/mroth/emojitrack-streamer-spec