Beats By Redis Live Workshop
Introductions
Beats By Redis Overview
Bandcamp Overview
Redis Data Structures Used
Sorted Sets
Streams
JSON
Search
Time Series
Code/architecture Overview
Live Coding
Search for purchases
Top earners
Purchase history
RedisInsight
Keys browser
Index browser
Workbench tutorials
Expanding the app
Triggers and Functions
Personalization
Artist-specific dashboard
Bandcamp rep dashboard
Regional dashboard
Different time series by month, quarter, year, etc.
RedisInsight Tutorial
Q&A
Uncomment in app/static/assets/js/purchases.js
, line 216-232
Show the code in app/components/purchases/purchase-repository.js
In app/components/purchases/purchase-queries.js
build out the search
function:
async function search ( term ) { }
Add the /search
API endpoint in app/components/purchases/purchase-router.js
View on frontend
Uncomment in app/static/assets/js/purchases.js
, line 146-161, 201-211
Create createPurchaseAmount
function in app/components/purchases/purchase-generator.js
:
async function createPurchaseAmount ( artist_name , amount_paid_usd ) { }
Add call to createPurchaseAmount
to the bottom of createAlbumPurchase
In app/components/purchases/purchase-queries.js
build out the topSellers
function:
async function topSellers ( ) { }
Add the /top-sellers
API endpoint in app/components/purchases/purchase-router.js
Add the cron job in app/components/purchases/purchase-stream.js
in initialize
to send the top sellers data down to the UI every 60 seconds.
View on frontend
Uncomment in app/static/assets/js/purchases.js
, line 127-144, 187-199
In app/app.js
conditionally create the sales_ts
in the setupData
function
In app/components/purchases/purchase-stream.js
add the purchases to the SALES_TS time series in the streamPurchases
function
In app/components/purchases/purchase-queries.js
build out the purchaseHistory
function:
async function purchaseHistory ( ) { }
Add the /history
API endpoint in app/components/purchases/purchase-router.js
In the cron job in app/components/purchases/purchase-stream.js
in initialize
, send the purchase history data down to the UI every 60 seconds.
View on frontend