Home » Archives for Parker Selbert

Author Archives: Parker Selbert

Parker is one half of Soren, a partnership that helps businesses make their production Rails apps better.

Counting Distinct Values With HyperLogLog

Counting distinct values is a trivial matter with small datasets, but it gets dramatically harder for streams with millions of distinct points. Absolute counting accuracy can be attained through a set, but then you have the undesirable tradeoff of linear memory growth. What you really want when dealing with enormous datasets is something with predictable storage and performance characteristics. That ...

Read More »

Surrogate WebSockets Alongside Rails

ActionCable is coming to Rails 5 and brings with it the promise of using WebSockets directly in Rails. Ruby has a notoriously bad concurrency story, and that certainly extends into the realm of WebSockets and pubsub. ActionCable may be suitable for a small number of authenticated sessions, but scaling persistent connections to thousands or tens-of-thousands won’t be easy. That’s all ...

Read More »

Kafka, Logs, and the Policy of Truth

Kafka is a distributed, partitioned, replicated commit log service. It provides the functionality of a messaging system, but with a unique design. (Source: Kafka) Apache Kafka is a message queue implemented as a distributed commit log. From the producer’s point of view, it logs events into channels, and Kafka holds on to those messages while consumers process them. Unlike a ...

Read More »

7 Tips for Continuously Deploying Single Page Apps

Single page apps deliver fantastically rich user experiences, and they open up an entirely different avenue for continuous deployment. Separating out a front-end application from the server is a sound strategy for breaking up the responsibilities of the team. Maintaining a separate front-end code base allows teams to iterate on features quickly and interact through formalized contracts in the form ...

Read More »

Alternative Service Communication Using Pub/Sub

The HTTP protocol was designed for synchronous communication between two entities — for instance, a browser requesting a stylesheet or a server charging with a payment processor. Those are synchronous operations where nothing can proceed without an immediate response. Often communication can be asynchronous, like when queueing up work to be performed in the background. It is possible to use ...

Read More »

Folding Postgres Window Functions into Rails

You’ve heard of window functions in PostgreSQL, but you aren’t quite sure what they are or how to use them. On the surface they seem esoteric, and their use cases are ambiguous. Something concrete would really help cement when window functions are the right tool for the job. We have our work cut out for us! Through this post we’ll ...

Read More »