Giter Site home page Giter Site logo

sangco-helicopter-money's Introduction

카카오페이 뿌리기 기능 구현하기

뿌리기 API

  • 사용자의 식별값 "X-USER-ID"는 자바 Random 클래스를 활용해서 시간을 Seed로 해서 난수를 생성.

  • 대화방의 식별값 "X-ROOM-ID"도 시간을 기반으로 UUID를 생성.

  • 뿌리기 요청건에 대한 고유 token은 아스키 코드의 문자 3개를 골라 랜덤하게 생성.

받기 API

  • 뿌린지 10분이 지난 요청에 대한 처리는 LocalDateTime의 now(), isAfter(), plusMinutes() 등을 사용해 처리함.

  • @Lock(LockModeType.PESSIMISTIC_WRITE)을 이용해서 테이블 로우에 락을 걸어서 다수의 서버에 다수의 인스턴스로 동작하더라도 문제가 없도록 구현.

조회 API

  • Spring Data JPA 쿼리 메서드를 활용해서 뿌린건에 대한 조회가 7일 동안만 가능 하도록 구현.

sangco-helicopter-money's People

Contributors

sangco avatar

Watchers

James Cloos 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.