Giter Site home page Giter Site logo

jeffreywangzhi / aws_multithread-statemachine Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 157 KB

A fast, scalable, multithreaded download statemachine based on AWS, supporting .mkv, .mov, .mp4, .jpg, and others.

License: MIT License

Python 97.87% JavaScript 2.13%
aws lambda stepfunctions

aws_multithread-statemachine's Introduction

AWS_Multithread-Statemachine

A fast, scalable, multithreaded download statemachine based on AWS.

  1. 10+ respective threads (lambda functions) download files from target file URL.
  2. 10+ threads upload each chunk to the target S3 bucket.
  3. Chunk merged and job finished.
  • System Efficiency: 300+ GB/ minute
  • Scalability: scalable with additional threads (AWS Lambda Functions) statemachine_graph.png

Prerequisites

CloudFormation Template Configuration

  • Replace each aws-account in template.yaml with your own AWS account number. (Ctrl + F, aws-account)
  • Config each Role in StepFunctions and Lambda Functions and grant corresponding permissions. (Ctrl + F, Role)

Building

  • Build and deploy the sam application to AWS cloud.
$ sam build
$ sam deploy --guided
  • Enter your target S3 name for storing the downloaded file.
$ Parameter TargetS3 [targetS3]: your-target-storage-s3-name

Usage & Input Format

{
  "src": [
    {
      "filePath": "https://download-file-1.ext"
    },
    {
      "filePath": "https://download-file-2.ext"
    },
    {
      "filePath": "{other-file-paths.ext}"
    }
  ]
}

Scalability

With the above solution, the system efficiency achieved 300+ GB per minute. The scalable system could also be further refined by thresholding the lambda functions (threads).

Who do I talk to

aws_multithread-statemachine's People

Contributors

jeffreywangzhi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  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.