Skip to content

Instantly share code, notes, and snippets.

@xirdneh
Last active October 4, 2016 16:54
Show Gist options
  • Save xirdneh/bdd0493e2fc59d8547c1cfa04e42c08e to your computer and use it in GitHub Desktop.
Save xirdneh/bdd0493e2fc59d8547c1cfa04e42c08e to your computer and use it in GitHub Desktop.

Design Document

Environment

VMs

Django

Celery

  • Rabbit AMQP
  • Flower

Django-Channels

  • Redis
  • Webhook callbacks
  • Websockets
  • Data Binding from the backend

ElasticSearch

  • Analyzers
  • Data Structure
  • Processing before indexing:
    • Domain Lemmatisation
    • Topic extraction
    • Tagging

Permissions

  • Different types of users
  • Are we gonna have different access levels for the API?
  • Portal permissions vs Agave permissions.

Notifications

  • Single application to handle notifications.
    • When bootstrapping AngularJS form elements must have an action attribute or handled by some JS code.
  • (Front-end) Handle any kind of notification. e.g. Agave notifications or notifications sent to users.
  • Rely on Django-Channels to process external notifications.
  • Should act only as a service layer and then hand out the processing to different apps, libs, utils, etc...
  • Front-end and back-end should work similarly. As in just acting as a service layer.
  • Format:
    • Type (for mapping to the correct module/service. e.g. data, jobs, projects)
    • Operation (for user configuration, logging and mapping. e.g. file_sharing, job_submit, data_publication)
    • Message (for user display)
    • Content (unmodified object resultant of the operation)
  • How to display notifications list?
    • API call to draw insight from different contents?

Overall Structure

  • Framework agnostic library
    • Converts agavepy into a friendly object oriented library (agavepy_dsl)
    • Gives plenty of room for extensibility.
  • Django-app
    • Views and models necessary to work with django
    • Extensibility is paramount.
  • Front-end

Testing

  • Backend tests (without calling any external service)
  • Front end tests (without calling any backend service)
  • Functionality tests (backend and frontend without calling any external service)
  • Integration tests (careful with this ones)

Logging

  • A logging format should be defined.
  • When running localhost should log to a local logfile.
  • Format:
    • Username
    • SessionID
    • IP
    • Operation pertaining to the request
    • Extra data of each step.
  • DEBUG for actual debugging, INFO for metrics?

Development workflow

  • Each module should be developed following the Overall Structure points.
  • Each structure point should be develope with its corresponding test suite.
  • Logging features for each structure point should be evaluated before marked as finished.
  • Documentation should for each structure point should be revise before marked as finished.
  • Corresponding Splunk reports might be created before marked as finished.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment