For developersData Seeding
This application leverages Redis core data structures, JSON, TimeSeries, Search and Query features. The data seeded is later used to show a searchable transaction overview with realtime updates as well as a personal finance management overview with realtime balance and biggest spenders updates.
On application startup in
app/server.js, a cron is scheduled to create random bank transactions at regular intervals and seed those transactions in to Redis.- The transaction generator creates a randomized banking debit or credit which will reflect on a (default) starting user balance of $100,000.00
- The transaction data is saved as a JSON document within Redis.
- To capture balance over time, the
balanceAftervalue is recorded in a TimeSeries with the keybalance_tsfor every transaction. - To track biggest spenders, an associated
fromAccountNamemember within the sorted setbigspendersis incremented by the transaction amount. Note that this amount can be positive or negative.
Sample
bankTransaction data view using RedisInsight

tipDownload RedisInsight to view your Redis data or to play with raw Redis commands in the workbench.