Real-Dev-Squad / feature-flag-backend

This is the repository for Feature flag service.
MIT License
4 stars 6 forks source link

[Design Doc] Feature flag backend #7

Closed vikhyat187 closed 11 months ago

vikhyat187 commented 1 year ago
Problem Context Requirements API endpoints Data model Tech choices Assumptions Scale being supported

Problem:

Context:

Requirements

API Endpoints:

API contracts: https://github.com/Real-Dev-Squad/feature-flag-backend/blob/develop/openapi.yaml

Data Model

ER diagram: https://github.com/Real-Dev-Squad/feature-flag-backend/blob/develop/ER%20diagram.jpg

The database being choosed is DynamoDB

FeatureFlag

Partition Key = Id

Sort Key = createdAt (to sort based on creation time)

FeatureFlag-UserMapping


[RFC] The primary and sort key for FF-User mapping table to be finalised

Partition Key = flagId

Sort key = userId

Technology choices:

Assumptions

Scale being supported

AWS Lambda allows you to configure the invocation rate of a Lambda function, which is the rate at which events are sent to the Lambda function for processing. The default invocation rate limit is 1000 requests per second (RPS) per region per AWS account.

Project board: https://github.com/orgs/Real-Dev-Squad/projects/23

Listing all the tasks which have to be done for feature flag implementation.

Have given the timings considering the average time (around 1.5 to 2hrs every day in RDS) The rough ETA considering the tasks would be around 8th may for all coding tasks and 12th may for go live date.

gauravv-dev commented 1 year ago

The purpose of the design doc is to document all the decision decisions. So ideally I feel there should be these sections

gauravv-dev commented 1 year ago

good job breaking down the tasks though. 👍

vikhyat187 commented 1 year ago

The purpose of the design doc is to document all the decision decisions. So ideally I feel there should be these sections

  • Problem/Context of the design doc
  • Requirements (link the PRD if that exists)
  • API Endpoints
  • Data model
  • Technology choices - All options we considered with pros and cons and why we chose what we chose
  • A design diagram that shows all the components and their interactions.

Have made the changes to the doc @dev-gv.

gauravv-dev commented 1 year ago

Also list

vikhyat187 commented 1 year ago

done added @dev-gv.

iamitprakash commented 1 year ago

Why updatedAt and createdAt both are numbers datatype, i think you are trying to store datetime stamp

iamitprakash commented 1 year ago

don't we have string length (max char capacity) defined, if you are thinking to keep max, this will lead issues in future while you will have huge data and you will try to do some kind of optimisation

vikhyat187 commented 1 year ago

Why updatedAt and createdAt both are numbers datatype, i think you are trying to store datetime stamp

We have use epoch timestamp at other places, so using the same here.

vikhyat187 commented 1 year ago

don't we have string length (max char capacity) defined, if you are thinking to keep max, this will lead issues in future while you will have huge data and you will try to do some kind of optimisation

We have checked Dynamodb doesn't allow to set a max size for the attribute.