GithubHelp home page GithubHelp logo

mbudm / fotopia-serverless Goto Github PK

View Code? Open in Web Editor NEW
21.0 1.0 5.0 24.3 MB

An API, storage and face detection for a photo archive web app using serverless framework

JavaScript 1.07% Shell 0.24% TypeScript 98.69%
serverless-framework dynamodb aws-lambda rekognition photo-archive

fotopia-serverless's People

Contributors

dependabot[bot] avatar mbudm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fotopia-serverless's Issues

Indexes updates need fan in pattern

The put indexes lambda is invoked by the streams lambda that is triggered by dynamodb creates, update and removes.

Occasionally two events occur simultaneously (within a few 100ms of each other) and they get the same existing state and write a new state. Not a big deal at small scale but will become a bigger issue (and before I'm ready to implement proper search indexes.

So the additon of an SQS resource should do the trick - force each put index to complete before the next one is tackled. And/or use a dynamodb table for faster get/put.

Separating the stack

Separate the stack currently defined in one serverless.yml file into db, s3, api and cognito.

This allows for more control over what is deployed when but it also introduces complexity with coordinating release of components.

Related to #1

Better person aggregation

Currently when bulk uploading around 300 images the person categorisation ends up with multiples of the same person - more if it's a baby/child.

I think there may be a clever way to use the face matches of all faces in person A to see if there is a certain level of similarity to the face matches of all faces in person B.

This could be a cron job lambda. It could prompt the user to merge people or if above a certain confidence level, do it automagically in the background.

Delete People

Delete a person, and:

  • remove person from associated images
  • update person indexes
  • delete faces from rekognition collection?

Database backup/migration

Sometimes you need to redeploy - eg if you tweak any of the dynamodb indexes. This means all the data in the db and S3 buckets are gone.

Need a way to handle migration when the stack is recreated.

Breaking up serverless.yml will help, as there's more control over what gets removed and re deployed - but this might still be a need

Search results pagination

Modify the query API to default to return paginated records - with some limit of say 50 or 100 results.

Or leave as is and expect the client to default to time limited (month?) search?

Probably both.

Edit person thumbnail

Choose a different thumbnail image for the person. Currently it just uses the face id of the first image found.

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.