Home

Awesome

Rankings-Backend

Server-side client of isa-rankings.org

Technical Overview:


Why serverless?


Architecture Overview

Architecture


DynamoDB - (Database Design)

DynamoDB is designed in such a way (primary keys and sort keys) so that it supports all the query patterns this application needs. It has only a single table with aggregated GSIs, hierarchical SKs.

In short, it is customized for application's access patterns.

Overview of the table:

Main Table

PKSK_GSILSIGSI_SK...Attributes
Athlete:{id}AthleteDetails{normalizedName}...
Athlete:{id}Contest:{discipline}:{id}Contest:{date}{points}...
Athlete:{id}Rankings:{type}:{year}:{discipline}:{gender}:{ageCategory}{points}...
ContestsContest:{discipline}:{id}Contest:{date}...

Possible Query Patterns:

GSI Table

GSISKPK...Attributes
AthleteDetails{normalizedName}Athlete:{id}...
Contest:{discipline}:{id}{points}Athlete:{id}...
Rankings:{year}:{discipline}:{gender}:{ageCategory}{points}Athlete:{id}...

Possible Query Patterns:


Getting Started

To start with, serverless installation must be completed on your local comptuter.

How to: Installation Guide

There are 2 environment stages, therefore you should have valid credentials for them. Checkout the secrets.example.yml under serverless folder. Replace the values with real ones

For deployment aws-cli should be installed and configured with Profiles needed in the serverless.yml file. To get your credentials contact to ISA.

Running on local

First, credentials are obtained from .env file. Replace the values in .env.example file with real ones depending on the stage you want to run (in secrets.yml you can see the stages)

Install dependencies

npm install

Start serverless-offline

npm start

API is served at localhost:3000/

Project Folder Overview

Gource output

GourceImage