The nuts and bolts of our Ruby-based realtime charts solution
So, how did we go about it?
The Scout agent runs a process on your server(s), sending metrics to Pusher's
So the essence of
- Scout-managed process on your server
- HTTP posts from your server to Pusher
Websocketconnections between Pusher and browser(s)
Diagrams are for project managers, right? Here's how it looks in simplified Ruby code:
The Scout Agent (Ruby)
So far so good – but what about session control and security?
Realtime Session Control
You initiate a
Under normal operation, the Scout agent sends data directly to scoutapm.com. Only when viewing a
We need to be careful that only members of the originating Scout account have access to
Why didn't we roll our own?
We don't stream metrics unless you initiate a
- The Scout agent's
Scout::Streamerclass (handles sending data to Pusher)
- Smoothie (for our
- Use Pusher. Rolling your own
realtimeinfrastructure isn’t trivial. Using a PaaS like Pusher lets you start focusing on the experience faster.
- Don’t be intimidated by
realtime. Is there anything in your product that can be enhanced by realtimecommunication?