Skip to content

Instantly share code, notes, and snippets.

@TMaYaD
Last active April 19, 2018 11:24
Show Gist options
  • Save TMaYaD/a4070f599b3c3954a856e14c07ff6b78 to your computer and use it in GitHub Desktop.
Save TMaYaD/a4070f599b3c3954a856e14c07ff6b78 to your computer and use it in GitHub Desktop.
Lexent Bio: Coding challange

S3-Gallery

Create a web-app to display images from an AWS s3 bucket as a gallery and add ratings to the images.

Notes:

  • The gallery should reflect the same folder structure as the s3 bucket with '/' as folder separator.
  • The s3 bucket should not be modified in any way. Assume read only permissions to the bucket.
  • Any external modifications like addition or deletion of the images should be reflected in the Gallery
  • The Gallery should allow rating the images with 0-5.
  • The Gallery should be able to filter displayed images based on selected ratings.
  • The ratings filter could be of type =, > or <

Bonus points:

  • Identify moves and copies and reflect the ratings in new location.
  • Optimize network traffic by generating and using thumbnails where appropriate instead of full resolution originals.
  • Add keyboard shortcuts for mouse free operation.

Job Queue

Create a job queue. It consists of two parts: a worker and a client.

Each job consists of:

  1. a docker image
  2. an array of cmd parameters to pass to the image
  3. a dictionary of environment variables to pass to the image
  4. a dictionary of cpu and memory requirements

The client takes the above details and enqueues the job.

A worker then pops the jobs from the queue and runs them.

Notes:

  • There are no restrictions on how long a task can run; Some may finish in weeks while others may run for weeks.
  • Assume jobs are idempotent; Each job should be run at least once.
  • Each worker should take cpu and memory available as inputs when it's started.
  • A worker should simultaneously run as many jobs as possible without overrunning either the cpu or the memory available
  • We must be able to run multiple workers with different cpu and memory availability simultaneously.
  • We require that you use git and preferably github.
  • All submissions must be in the form of a git repo url.
  • You may choose any programming language and/or framework you feel comfortable with.
  • Feel free to use any off the shelf tools you are comfortable with.
  • Keep in mind that the quality of the code and best practices are more important than correctness of submission. As such we encourage you to submit your work even if it is not complete.
  • We strongly encourage TDD and testing though it's not a requirement for successful submission.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment