Skip to content

a Python 3.7 & Falcon REST API, running on AWS Lambda, which provides managed CRUD operations and a queuing service for an online waiting room app.

License

Notifications You must be signed in to change notification settings

smartadvising/smartadvising-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartAdvising API

The REST API backend which provides typical CRUD functionality for our data models, as well as built-in queuing (enqueue/dequeue) functionality for students in an online waiting room.

Web Language and Framework

The API is written in Python 3.7 within the Falcon, the bare-metal web API framework for Python 3. As an alternative to Flask, Falcon has a reduced feature set specifically targeted towards building fast, REST APIs where all client data is JSON and where throughput is prioritized.

Database

Our database is provided as a service by AWS RDS, in which there's a t2.micro instance running MySQL 5.6 (which is within free tier usage restrictions).

Data Model

SQLAlchemy

a Python SQL toolkit and Object Relational Mapper (ORM) "[which] provides the data mapper pattern, where classes can be mapped to the database in open ended, multiple ways - allowing the object model and database schema to develop in a cleanly decoupled way from the beginning"

SQLService

an interface layer to SQLAlchemy's session manager and ORM layer which provides a single point to: 1. manage your database connection and sessions, and 2. create, reflect, or drop your database/SQLAlchemy Model objects

PyMySQL

a pure MySQL client in Python with connection pooling, which is optimal in AWS Lambda because of "lifecycle" and in-memory caching of data

Hosting

The core services, primarily the API, are provided by AWS Lambda, a "serverless" architectural pattern which "allows you to build and run applications and services without thinking about servers", removing manual infrastructure management tasks such as server or cluster provisioning (or when scaling: capacity provisioning), patching, or OS maintenance".

API Endpoints:

The API endpoints are provided as a service by AWS API Gateway, acting a reverse proxy for incoming API requests, making possible building an API with the setup of a single API method. "The Lambda proxy integration allows the client to call a single Lambda function in the backend. The function accesses many resources or features of other AWS services, including calling other Lambda functions."

See below for the registered resources and their associated methods.

/
    /advisors: GET
    /colleges: GET
        /{college_id}: GET
            /majors: GET
                /{major_id}: GET
    /faqs: GET
    /queuers: POST, DELETE
    /queues: GET
    /students: GET, POST, DELETE
        /{student_id}: GET, DELETE, PATCH

About

a Python 3.7 & Falcon REST API, running on AWS Lambda, which provides managed CRUD operations and a queuing service for an online waiting room app.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages