Skip to content

adi-kmt/brew-scylla

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BrewScylla

This is a coffee house backend for the frontend app.

Design Choices

  • Using CassandraDB as a proof of concept (PoC) to explore its capabilities and performance.
  • Levenshtein is used for search capabilities, allowing users to perform fast and flexible searches on product names, which is in-memory instead of using a specific service like ElasticSearch or Lucene.
  • The web application is built with Go and the Fiber framework to handle requests.

DB schema

Although CassandraDB is a NoSQL database, it operates as a wide-column store. In this model, the schema requires that columns be pre-defined. This means that, unlike some other NoSQL databases that offer flexible or dynamic schemas, the structure of each table in ScyllaDB is fixed and must be defined at creation time.

The schema used in this project is:

db schema image

Some important considerations while designing wide-column NoSQL DBs

  1. Filtering can only be done on Primary columns or Clustering columns.

  2. Primary keys are always cumpolsary while querying, but clustering keys can be optional.

    1. If any clustering columns are used in a query, you must specify all previous clustering columns (from left to right) with equality comparisons (=) before using any inequality comparisons (<, >, <=, >=, IN).
    2. Clustering columns can be skipped from right to left. This means you can use fewer clustering columns than defined, but you must start from the leftmost clustering column and cannot skip columns in between.

Credits to DataStax Data Modelling documentation for helping with data modelling best practices.

TODOs

  1. Handling UUIDs
  2. User update, coupons. Handling search products.
  3. Make retries work with gocql link
  4. Admin APIs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published