Use cases

Use cases #

Pipet is an un-database. Databases are all use streams too, only they’re called write-ahead logs. When you insert into a table, the database translates that into an operation that is appended to the write-ahead log and then the database applies the operation to the table. Pipet exposes its “write ahead log” to the developer as a stream. Then, instead of declaratively defining a table schema, the developer imperatively defines state with reduce functions.

1. Dumb forms #

A dead simple <form action="endpoint">. Capture first, process later. Submissions are stored in a stream and can later be fed into whatever service you want.

2. Analytics without the knobs #

Post events to a stream and process them with JavaScript. Then push that data where you want: a database, a spreadsheet, whatever.

3. Bots and internal apps #

Pipet lets you capture events from multiple sources (Stripe, Zendesk, frontend) and build up context over time. You might have a larger customer in the trial period and based on how they’re bouncing around your settings and docs pages, are struggling configure their account. You want to be notified and proactively reach out in seconds. You need a Slack notification to the right sales channel at the right time. And then being able to mark the customer as “reached out to” via a Slack emoji reaction.

The durability of streams over triggers and accessibility of Javascript reducers makes Pipet uniquely good for integrations. Third party systems are opaque and flaky. Building a consistent view of the customer means synchronizing state between your product, your SaaS tools and internal apps (like /admin).

There’s not too much difference between Slackbots and internal apps. Mostly, you just need to be able to create “state cursors” and alert internal users. In these cases, the load is not product-level (millions of events per second), but usually a few events a second at most.

4. Network of event streams #

Event streams should be easily shareable both within and between organizations. Pipet users should be able to splice events (like creation of new streams or removal of members from an org) from pipet.io/pipet/events into their own streams.

Example: Reactivation alerts #

You want a Slack notification when a customer reactivates (churns and then re-subscribes).

  1. Send Stripe webhook to stripe_webhooks.
  2. stripe_webhooks function parses the event body and pushes well-formed events to the stripe stream.
  3. stripe.notify reducer keeps track of which customers have previously subscribed and POST’s to slack.com/api/chat.postMessage when someone reactivates.