Thanks for digging through the code and coming up with improvements. We
really appreciate that.
That WebSocket implementation looks interesting and powerful. Indeed, we
could rip out some code from the loggregator and the CLI by switching over
to that implementation. BTW, it looks like this library got merged into the
Gorilla project and is now available here:https://github.com/gorilla/websocket
Switching to that implementation, though, comes at the cost of increasing
the number of our third party dependencies. Considering we already wrote
our keep-alive logic, we don't get an immediate benefit from switching
right now. The other difficulty comes from the coupling between loggregator
an CLI. If we use a new WebSocket implementation on the server, we have to
update the CLI at the same time and we would need to handle both, the
ping-pong frames and the old implementation for backwards compatibility
with existing clients.
Nevertheless, we see the benefit for the community in switching over to a
more standard conform implementation. I will put in a story in our Pivotal
Tracker Icebox and talk to our Product Owner about it.
Thanks again for coming up with all these suggestions,
On Tuesday, January 21, 2014 6:04:16 PM UTC-7, Mike Heath wrote:
Has the loggregator team considered using Gary's Burd's WebSocket
Go's built-in WebSocket library? Go's built-in library doesn't appear to
support ping/pong frames (which seems weird that a Google invented protocol
would have a half-baked implementation in a Google runtime...)
It seems kind of silly to do stuff like thishttps://github.com/cloudfoundry/cli/blob/master/src/cf/api/logs.go#L125-L130rather
than using the WebSocket protocol's built-in mechanism for detecting
Forgive me if I sound like a whiner. I love Loggregator. I just keep
finding things in Loggregator that are done in a way that's easy with Go
but non-standard which causes more effort for those of us on more
On Friday, January 17, 2014 6:21:24 PM UTC-7, Mike Heath wrote:
I'm really close to having a fully functional Loggregator client in Java
for both emitting logs as well as reading logs over Web Sockets.
There a few things that are bugging me so I thought I'd provide some
- I'm not very fond of the DIY padding. PKCS#7 is really really easy to
implement (since Go doesn't appear to support it.) Why not go with this
standard padding mechanism? Regardless, it works but it was a pain to
figure out and reimplement.
- The signature in the LogEnvelope only covers the LogMessage's message
field and not the entire LogMessage. This probably isn't a huge problem
since it would still be rather difficult to intercept a LogEnvelope but if
you did, you could emit the same message to any application masquerading as
coming from any source. It seems more secure, to apply the digital
signature to the entire LogMessage but again, not a big deal.
- The nonsecond time resolution in the timestamp seems a little over the
top but I don't anticipate being around on April 11, 2262 when it overflows
so I'm not too concerned. :)
I'll post a link to my client once it's ready.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.