Git Product home page Git Product logo

plot-server's Introduction

PLOT

S.O.P.T 25기 서버 파트 앱잼 프로젝트

KakaoTalk_20191228_220853327

node_badge npm_bedge

  • 프로젝트 기간: 2019.12.22 ~ 2019.01.04
  • API 문서

프로젝트 설명

'Plot'입니다.

영화 친구 찾기로 가장한 소개팅 어플

Workflow

workflow

핵심 기능

매칭 알고리즘

최다 매칭을 위하여 이분 매칭 알고리즘을 이용하였습니다

이분 매칭 알고리즘에 이용하기 위해 DFS를 이용하는 과정에서 랜덤 순서 & 필터링을 적용하여 최다 매칭이 여러 케이스 일 경우 다양한 경우의 수가 도출 됩니다

간선을 연결 할 때는 완전 탐색을 이용하였습니다.

필터링은 병렬로 계산하기 때문에 매칭은 O(E * V) / 간선 연결에 인원 수 만큼 걸리기 때문에 O(n^2)

따라서 탐색 시간은 O (E * V * n^2) 가 나옵니다.

algorithm

채팅 서비스

클라이언트와의 원활한 소통을 위해 Firebase RealTime Database를 이용한 채팅 서비스를 합니다

사용할 쓰는 user의 아이디와 번호를 encryption을 통해 고유한 아이디를 전달합니다

채팅방에 쓰이는 고유 번호는 timestamp + 각 유저의 해싱값을 통해 본인만 접근이 가능하도록 암호화 하였습니다.

크롤링

영화 정보를 KOBIS에서 제공하는 실시간 api와 영화 정보를 제공하는 api와 cheerio를 이용해 크롤링합니다.

해당 크롤링 코드는 의존성을 줄이기 위해 Google Cloud Function을 이용하여 Google Cron 서비스로 매일 23시에 DB를 업데이트 합니다.

해당 서버 리스 언어는 node 언어로 작성하였습니다.

Architecture

architecture

DB ERD

DB ERD

Depenedncy Module

사용 패키지(모듈)은 다음과 같습니다.

"dependencies": {
    "aws-sdk": "^2.596.0",
    "cookie-parser": "~1.4.4",
    "crypto": "^1.0.1",
    "debug": "~2.6.9",
    "express": "^4.16.4",
    "express-generator": "^4.16.1",
    "firebase-admin": "^8.9.0",
    "http-errors": "~1.6.3",
    "jade": "^1.11.0",
    "jsonwebtoken": "^8.5.1",
    "moment": "^2.24.0",
    "morgan": "~1.9.1",
    "multer": "^1.4.2",
    "multer-s3": "^2.9.0",
    "promise-mysql": "^4.1.1",
    "pug": "^2.0.4"
  }

시작하기

소스 코드는 Windows10 64bit + Visiau Studio Code + Node v10.16.0 + NPM v6.13.4 + Express 4.16.1 환경에서 제작되었습니다.

  • Node.js의 Async/Await 도구를 사용해 (Promise) 비동기 제어를 하고 있습니다.

설치하기

  • nodejsnpm을 을치합니다. (설치 방법 : nodejs.org 를 참고)
  • Node.js 10 LTS 버전을 설치합니다.
  • 실행에 필요한 의존성을 설치합니다.
npm install

실행하기

npm start

13.125.48.35:7935 으로 접속 가능합니다.

배포

  • AWS EC2 - 클라우드 환경 컴퓨팅 시스템
  • AWS RDS - 클라우드 환경 데이터베이스 관리 시스템
  • AWS S3 - 클라우드 환경 데이터 저장소

사용된 도구

  • Node.js - Chrome V8 자바스크립트 엔진으로 빌드된 자바스크립트 런타임
  • Express.js - Node.js 웹 애플리케이션 프레임워크
  • NPM - 자바 스크립트 패키지 관리자
  • PM2 - Express 앱용 프로세스 관리자
  • vscode - 편집기
  • Mysql - DataBase

개발자

  • 이상윤 - 채팅 + 매칭 관련 서비스 전반
  • 양희연 - 메인 + 영화 선택 + 크롤링
  • 이다현 - 개인 정보 관리 + 결제 페이지
  • 이재용 - 로그인 / 회원가입 및 데이터 수집

기여자 목록을 확인하여 이 프로젝트에 참가하신 분들을 보실 수 있습니다.

PLOT의 연관 프로젝트

plot-server's People

Contributors

syndersonlee avatar samsung-ga avatar hhiyeon avatar leeda66 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.