The dRuby Book

9.1 Introducing Drip

Drip is an “append-only” storage mechanism, in which you can log Ruby objects in chronological order. Drip only lets you insert new elements and doesn’t provide update or delete functionality. It also provides a localized and inexpensive browsing API that’s suitable for dRuby’s RMI. For example, you can bulk transfer objects, and you can filter and seek using simple pattern matching.

Drip is also a process coordination mechanism. You can wait for new objects to arrive. Objects never change once stored in Drip. The data in Drip is immutable. Elements retrieved from multiple processes with different timing never change. You often see this characteristic in distributed file systems, because this architecture decreases the need to exclusively access information.

You can use Drip for simple object storage, process coordination, temporary storage for batch processing, and logging your day-to-day experiences. It’s so simple that you can use it for pretty much anything—which is why it might be hard to imagine exactly what to use it for.

I’ve used Drip for the following applications:

Is this still too vague? Starting with the next section, I’ll introduce how to use Drip by comparing it with other familiar data structures: Queue as a process coordination structure and Hash as an object storage.