Real-time Billing
A typical billing system will collect billable events from a variety of sources such as online purchases, server usage metrics, network usage metrics, electrical meters, and much more. Traditional billing systems process these events once a month to provide monthly bills. In contrast, a real-time billing system is able to continuously provide billing information that is accurate up to the day (or better). This avoids surprising differences between an estimated bill based on inaccurate data and the actual bill.
Benefits that Pravega Offers
- Transactions to guarantee that events are never duplicated, lost, or out of order
- Watermark functionality to ensure accurate windowed aggregations
- Durable and low latency storage
- Same API for reading both real-time and historical data
- Connectors to stream (and batch) processing engines such as Flink and Spark
- Scalable data ingestion to efficiently handle varying loads over time
- High availability design
Example Solution Architecture
- Data collectors collect billable events from various devices such as electrical meters and network routers.
- Web sites or other applications generate billable events such as when a user purchases a book or on-demand movie.
- A Flink streaming job aggregates all events from all streams and outputs the following:
- A summary of all billable events for the billing period will be updated in the database.
- An estimate of the monthly bill, based on historical patterns, will be updated in the database.
- At the end of the billing period, the actual bill will be generated, stored in the database for electronic billing, and permanently stored in the Monthly Bill stream
- The database can be PostgreSQL, Elastic Search, Pravega Search, or anything else supported by Flink.
- A web server provides a UI to view a billing dashboard. If using Elasticsearch or Pravega Search, this can be Kibana.
- Additional event-driven applications can respond to new bills in the Monthly Bill stream, for instance, by printing and mailing paper bills.