

Show HN: Goatee – Redis, WebSocket notifications in Go - johnernaut
https://github.com/johnernaut/goatee
Hey guys and gals!  I&#x27;m learning Go at the moment and LOVING it.  I was hoping to get constructive feedback on a project I&#x27;m working on - goatee - which is a notification server that utilizes Redis pub&#x2F;sub and WebSockets.  It&#x27;s fairly bare-bones at the moment but I&#x27;m hoping to add in a lot more features as time goes on such as queueing and WebSocket channel subscriptions (via Go Socketio possibly).
======
johnernaut
Hey guys and gals! This is a project I'm undertaking to help myself learn Go -
which I think is AWESOME so far. Any suggestions or criticisms would be
appreciated. I hope to add more features as time goes on (and possibly swap
out the generic WebSocket implementation with go-socketio).

------
zimbatm
I while ago I wrote something similar with a friend for fun. Redis,
ServerSentEvents and Go:
[https://github.com/vivienschilis/eddy/](https://github.com/vivienschilis/eddy/)

It's not so well documented but it's practically the same except that it uses
ServerSentEvents on the client and has buffers so no message is ever dropped.
Each messages contains the payload, a TTL and a channel size. The TTL is used
to expire a channel automatically and the channel size can be used for example
to create 1-deep channels for updating values like progress.

~~~
johnernaut
This is really great - thanks for sharing! I'll definitely check it out more
when I have some time.

~~~
zimbatm
Feel free to PM me if you want to discuss the architecture/code/... @zimbatm
on twitter

------
jonpaul
Shameless plug, but I also have a Go module named Goatee. However, it's a
testing package: [https://github.com/jprichardson/goatee-
go](https://github.com/jprichardson/goatee-go) It's too bad that
discoverability of modules in Go sucks.

~~~
malandrew
I'm not a Go developer (...yet), so I was wondering what about the
discoverability of it sucks. I ask because I'm working on package management
tooling for JavaScript and it's always interesting to see what is done well
and poorly in other ecosystems.

------
pornel
If you're only pushing data realtime to down the client and don't need
realtime _upload_ , then consider Server-Sent Events
([http://www.w3.org/TR/eventsource/](http://www.w3.org/TR/eventsource/)) as an
option.

SSE is HTTP-compatible, so for example works on mobile networks that force
port 80 to go through "transparent" WebSocket-disconnecting HTTP proxy.

Additionally you get Flash-free polyfills for IE7+ and automatic reconnection
on error built into browsers.

------
sauerbraten
What a coincidence, I see you use JSON config files: I wrote a tiny package to
parse commented JSON files not long ago, maybe it would be a good fit for
Goatee?

[https://github.com/sauerbraten/jsonconf](https://github.com/sauerbraten/jsonconf)

~~~
johnernaut
Awesome! I'll check it out.

------
rch
Where's the license?

~~~
johnernaut
Updated with MIT.

~~~
rch
Well done. Thanks!

------
ukd1
Why does this have zero tests?

~~~
johnernaut
Thanks for checking out the repo! I'm hoping to have tests up in the next
couple of days. This started out as a fool-around project and I wasn't
actually anticipating it getting any attention. Tests are the top priority at
the moment.

~~~
AYBABTME
I don't understand, you've submitted the project here yourself?

------
almosnow
That name almost made me not click on the link...

~~~
gyepi
It's hard to come up with good names for software projects. I agree, some are
silly, but goatee seems pretty OK.

I have an unreleased template system, also written in Go, named goatee.

I choose it because I thought it was a nice riff on moustache.

~~~
TeMPOraL
English is not my first language, so it might be because of that, but... I
can't see any connection between "goatee" and "moustache", neither in spelling
nor pronunciation. With "goatse", on the other hand...

~~~
dec0dedab0de
_I can 't see any connection between "goatee" and "moustache"_

A goatee is a style of facial hair.

~~~
TeMPOraL
Ah, ok, now I got it, thanks :).

