Git Product home page Git Product logo

extension-block-front's Introduction

πŸš€ 아킀텍쳐

전체 아킀텍쳐

πŸ“‹ API 흐름도

ν™•μž₯자 μΆ”κ°€ API

ν™•μž₯자 μΆ”κ°€ API

ν™•μž₯자 쑰회 API

ν™•μž₯자 쑰회

ν™•μž₯자 μ‚­μ œ API

ν™•μž₯자 μ‚­μ œ

πŸ“œ μ˜ˆμ™Έ 처리

λ™μ‹œμ„± 문제

문제 상황

  • ex) 두λͺ…μ˜ ν΄λΌμ΄μ–ΈνŠΈκ°€ λ™μ‹œμ— ν™•μž₯자λ₯Ό μΆ”κ°€ν•  경우 쀑볡 μΆ”κ°€ λ¬Έμ œκ°€ λ°œμƒν•  수 μžˆμŠ΅λ‹ˆλ‹€.

ν•΄κ²°

  • Redisson 뢄산락을 μ μš©ν•΄ Lock을 νšλ“ν–ˆμ„ λ•Œλ§Œ ν™•μž₯자λ₯Ό μΆ”κ°€ν•  수 μžˆλ„λ‘ κ΅¬ν˜„ν•΄ ν•΄κ²°ν–ˆμŠ΅λ‹ˆλ‹€.
  • Lock을 νšλ“ν•˜λŠ” μ½”λ“œλ₯Ό AOPλ₯Ό μ΄μš©ν•΄ μ–΄λ…Έν…Œμ΄μ…˜ν™” μ‹œμΌœ μ½”λ“œμ˜ μœ μ§€λ³΄μˆ˜μ„±μ„ ν–₯μƒμ‹œμΌ°μŠ΅λ‹ˆλ‹€.

κ³ μ • ν™•μž₯μžμ— μ‘΄μž¬ν•˜λŠ” ν™•μž₯자λ₯Ό μ»€μŠ€ν…€ν™•μž₯μžμ— μΆ”κ°€ν•  경우

문제 상황

  • ex) κ³ μ • ν™•μž₯μžμ— μ‘΄μž¬ν•˜λŠ” com을 μ‚¬μš©μžκ°€ μž„μ˜λ‘œ μ»€μŠ€ν…€ ν™•μž₯μžμ—μ„œ μΆ”κ°€ν•˜λ €κ³  ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

ν•΄κ²°

  • μ»€μŠ€ν…€ ν™•μž₯자λ₯Ό μΆ”κ°€ν•˜κΈ° μ „, κ³ μ • ν™•μž₯μžμ— μ‘΄μž¬ν•˜λŠ” ν™•μž₯μžμΈμ§€ ν™•μΈν•˜κ³  μ‘΄μž¬ν•  경우 μ•Œλ¦Ό 창을 λ„μ›Œ ν•΄κ²°ν–ˆμŠ΅λ‹ˆλ‹€. image

μ»€μŠ€ν…€ ν™•μž₯μžμ— λ™μΌν•œ ν™•μž₯자λ₯Ό μΆ”κ°€ν•  경우

문제 상황

  • ex) μ»€μŠ€ν…€ ν™•μž₯μžμ— μ‘΄μž¬ν•˜λŠ” jpgλ₯Ό μ‚¬μš©μžκ°€ μ€‘λ³΅μœΌλ‘œ μΆ”κ°€ν•˜λ €κ³  ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

ν•΄κ²°

  • μ»€μŠ€ν…€ ν™•μž₯자λ₯Ό μΆ”κ°€ν•˜κΈ° μ „, ν˜„μž¬ μ»€μŠ€ν…€ ν™•μž₯μžμ— μ‘΄μž¬ν•˜λŠ” ν™•μž₯μžμΈμ§€ ν™•μΈν•˜κ³  μ‘΄μž¬ν•  경우 μ•Œλ¦Ό 창을 λ„μ›Œ ν•΄κ²°ν–ˆμŠ΅λ‹ˆλ‹€. image

μ»€μŠ€ν…€ ν™•μž₯자λ₯Ό 200개 μ΄ˆκ³Όν•΄μ„œ μΆ”κ°€ν•˜λŠ” 경우

ν•΄κ²°

  • μ»€μŠ€ν…€ ν™•μž₯자λ₯Ό μΆ”κ°€ν•˜κΈ° μ „, (전체 ν™•μž₯자 - κ³ μ • ν™•μž₯자) >= 200 일 경우 μ˜ˆμ™Έ λ°œμƒ
private void validateExtensionCount(InsertExtensionDto dto) {
    List<String> list = findExtension(dto.getKey());
    List<String> customExtensions = list.stream()
            .filter(ext -> !ExtensionBlockService.FIXED_ITEMS.contains(ext))
            .toList();

    if (customExtensions.size() >= 200) {
        throw new RuntimeException("μ»€μŠ€ν…€ ν™•μž₯μžλŠ” 200개 κΉŒμ§€λ§Œ μΆ”κ°€ν•  수 μžˆμ–΄μš”.");
    }
}

extension-block-front's People

Contributors

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