Code Monkey home page Code Monkey logo

platform_video_upload's Introduction

구현 이유

data chunk를 연속적으로 처리해 비디오를 업로드하는 대부분의 상황에서 사용가능하다. Node.js만을 사용하여 최대한 low하게 구현 해볼 기회라고 생각했다. SDK를 NPM에서 사용할 수 있지만, 사용하지 않았다. 의존성을 최대한 배제하고자 했다.

서버

혹시라도 사용해볼 사람이 있다면 서버로서 구동시키기 위하여 Nest.js를 사용했지만 사실 로직 구현과 Nest.js는 전혀 관계가 없다. facebook.service.ts만 따로 떼어내 사용해도 상관없다.

Get Page ID -> Start -> Transfer -> Finish

모든 과정은 stream과 buffer를 사용하여 처리된다.

Conclusion

Node 내장 라이브러리는 알아두면 패키지 의존성 없이 개발하는데 정말 많은 도움이 된다. 범용성 측면에서도 뛰어나다. 일례로, 대부분의 미디어 플랫폼은 chunk data를 통한 미디어 업로드를 지원하는데, 이 repo에서 구현하는 방식을 그냥 함수 이름만 바꿔서 갈아끼울 수 있다.

서버 구동을 제외한 모든 코드는 facebook.serivce.ts에 있습니다.

platform_video_upload's People

Contributors

bjs-kr 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.