QuestionQ56

VerifiedIntegrating applications with Google Cloud services

Your team is building an ecommerce platform for your company. Users will sign in to the website and add products to their shopping cart. Users will be logged out automatically after 30 minutes of inactivity. When they sign in again, their shopping cart must be retained.

How should users’ session and shopping-cart information be stored while following Google-recommended best practices?

Explanation

Short-lived session state is well suited to the low-latency managed in-memory stores provided by Memorystore for Redis or Memorystore for Memcached. A shopping cart that must survive logout and a subsequent login requires durable persistence; Firestore is a managed, persistent, distributed, transactional document database. This separates ephemeral session data from persistent cart data while avoiding self-managed database infrastructure.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!