Code Monkey home page Code Monkey logo

shopcarddemo's Introduction

Assumption

this assumptions done to speed up test task development

  1. better to split the Reservation model into Reservation and Task. Tasks should be a separate general-purpose service that handles tasks in an async way
  2. should be implemented auth
  3. implement backoffice to administrate available items/users
  4. omit implementing a scheduler which should free up items not in the FINISHED state
  5. run configs are done only for development/demo, added possibility to refactor configs to use the application in production

Testing

There are only 2 tests implemented for demo purposes. You can find them /reservation/tests/

Local demo run

Since there is no auth implemented anyone can add items. Upon launch will be added 3 demo items to DB. The application does not support adding items via UI.

Business logic

when anyone adds an item to the card, the item becomes locked so no one else can reserve the item while waiting for external service to respond. After the external service responds item becomes reserved. In case of an external server error item will be released. NOTE: it is not implemented features to release locked items in case a background worker dies and/or fails to update the reservation status

Possible improvements:

  1. add auth(JWT) module
  2. add backoffice for administrators
  3. add clear up scheduler
  4. handle user errors
  5. increase test coverage

Requirements:

Run command

Cloud Resources needed

To deploy this application to production, there is a need for the following resources:

  1. redis DB instance
  2. SQL DB instance
  3. one instance of celery workers/queue
  4. one instance to run the BE application

shopcarddemo's People

Contributors

yevgenys avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.