taining temporal order</li>
<li>The <strong>productId</strong> (optionally with metadata) was the <strong>value</strong></li>
</ul>
<p>This allowed us to efficiently retrieve the interactions with HTTP-based API server with two query modes:</p>
<ul>
<li>Fetch the <strong>last k interactions</strong> of a specific type for a given user with  <code>ZREVRANGE(userId_eventType, count)</code></li>
<li>Retrieve <strong>all interactions within a time range</strong> (e.g., last 24 hours) with <code>ZREVRANGEBYSCORE