Coder Social home page Coder Social logo

redislocker-pubsub's Introduction

Anurag's GitHub stats

My Discord

Who is Lutica CANARD?

  • Country : South Korea ๐Ÿ‡ฐ๐Ÿ‡ท

Languages that can contact with me

  • ํ•œ๊ตญ์–ด / Korean
    Primary
  • ๆ—ฅๆœฌ่ชž / Japanese
    (ๆ—ฅๆœฌ่ชžใฎๆ–นใŒ่‹ฑ่ชžใ‚ˆใ‚Šๅˆ†ใ‹ใ‚Šใ‚„ใ™ใ„ใฎใง่‹ฑ่ชžใ‚ˆใ‚Šๆ—ฅๆœฌ่ชžใง้€ใฃใฆใใ ใ•ใ‚Œใฐๆ„Ÿ่ฌใ—ใพใ™)
  • English

Profile

  • studying Electric engineering and Data science both in university.
  • Main major : Electric engineering On Railway.
  • I have intersting about signal systems on railway.
  • ์ฒ ๋„๊ณตํ•™ ์ค‘ ์ฒ ๋„์‹ ํ˜ธ๋ถ„์•ผ์— ๊ด€์‹ฌ์„ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค!

Used Stacks

WEB

Base

HTML5 CSS3 JS TS

Back-End

Express HONO PHP

Cloude-Back-End

AWSEC2 cloudflarepages

  • Elysia.js

Front-End

SASS Jquery Svelte React

Runtime

Node Bun

DB

PostgreSQL MySQL REDIS

GAME or APP

Unity BLENDER .NET/WPF .NET/MAUI

DevOps

Docker GITHUBCICD

ETC

Python Kotlin C C#

Learning

KAFKA MongoDB

  • OpenCV

Projects with Lutica canard

Group Study Leader : KNUT Web Study Leader

ETC

  • VCAP (VRChat Connections API) : Data Science Team.

Contacts

[email protected]

ETC

Programmers Profile.

https://career.programmers.co.kr/pr/presan100_7665
IS NOT PUBLISHED YET

Works

more...
Name Link ์„ค๋ช…
pick-of-pig [https://github.com/KNUT-webstudygroup/pick-of-pig] google placeAPI๊ธฐ๋ฐ˜ ๋ง›์ง‘์ถ”์ฒœ web App
CanaRinLab_BackEnd [https://github.com/LuticaCANARD/CanaRinLab_BackEnd] Elysia.js๋กœ ๋งŒ๋“  ๊ฐœ์ธ์šฉ web server
out of maintenance. Private web backend server that made with Elysia.js

Blog

Velog

[https://velog.io/@presan100/posts]

redislocker-pubsub's People

Contributors

luticacanard avatar

Stargazers

 avatar

Watchers

 avatar

redislocker-pubsub's Issues

Redisson๊ณผ์˜ ๋ณ‘์šฉ์„ ์œ„ํ•œ ์•„ํ‚คํ…์ณ์„ค๊ณ„

์ฃผ์š”๋‚ด์šฉ

  • red-lock์„ ๋Œ€์ฒดํ•˜์—ฌ java์ง„์˜์˜ Redisson๊ณผ ๊ฐ™์ด ์“ธ ์ˆ˜ ์žˆ๊ฒŒ ํ•˜๋Š” ์•„ํ‚คํ…์ณ๋ฅผ ์„ค๊ณ„ํ•ด์•ผํ•จ.
  • ๊ตฌํ˜„ Spec๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์—†์–ด์„œ ์ดํ•˜์˜ Task๋ฅผ ์ˆ˜ํ–‰ํ•ด์•ผํ•จ.

์˜คํ”ˆ ์†Œ์Šคํ™”๋ฅผ ์œ„ํ•œ ๋ฌธ์„œ ์ˆ˜์ •

์ฃผ์š” ๋‚ด์šฉ

  • ์˜คํ”ˆ ์†Œ์Šคํ™”๋ฅผ ์œ„ํ•ด์„œ ๊ฐœ๋ฐœ์ž๋“ค์ด ์ฐธ์—ฌ ๊ฐ€๋Šฅํ•œ ๋ฌธ์„œํ™” ์–‘์‹, ํ˜น์€ ๊ฐ€๋…์„ฑ ์ข‹์€ ๋ฌธ์„œ๋ฅผ ์„ค๊ณ„ํ•˜์—ฌ์•ผํ•จ.

Task.

  • ์ฐธ๊ณ ์ž๋ฃŒ ์ˆ˜์ง‘
  • README
  • ISSUE
  • Pull Request

์˜คํ”ˆ ์†Œ์Šคํ™”๋ฅผ ์œ„ํ•œ ๊ฐœ๋ฐœ์ž ์‚ฌ์šฉ ๊ฒฝํ—˜ ๊ฐœ์„ 

์ฃผ์š” ๋‚ด์šฉ

  • Redisson ๊ณผ์˜ ๋ณ‘์šฉ์„ ์œ„ํ•ด ๊ฐœ๋ฐœ์ž ๊ฒฝํ—˜๋ฉด์—์„œ์˜ ๋ถ„์„์„ ์ง„ํ–‰ํ•˜์˜€์Œ.
  • ๊ทธ ๊ณผ์ •์—์„œ, Redisson๊ณผ์˜ ์‚ฌ์šฉ์„ฑ์ด ๋‹ค๋ฅด๋‹ค๋Š” ๊ฒฐ๋ก ์ด ๋‚˜์™”๊ณ , ์ด์— ๊ด€ํ•œ ํ•ด๊ฒฐ์ด ํ•„์š”ํ•จ.

Spec

  • Redisson์€ ์ดํ•˜์˜ ๋ฐฉ์‹์œผ๋กœ ์ง„ํ–‰๋จ.
private final RedissonClient redissonClient;
//...
        RLock lock = redissonClient.getLock("NAME")
       try{
        // 
         boolean isLocked = lock.tryLock(/*์ตœ๋Œ€ ์‹œ๊ฐ„*/, /*ํš๋“์‹œ ์ ์œ ํ•  ์˜ˆ์ •์ธ ์‹œ๊ฐ„*/, /*๋‹จ์œ„*/);
        }
        catch(InterruptedException  e)
        {
           // error
        }
        finally 
        {
            lock.unlock();
        }
//...
  • DX์˜ ๊ฐœ์„ ์„ ์œ„ํ•ด์„œ, Redisson์˜ ์‚ฌ์šฉ ๋ฐฉ์‹์„ ์ตœ๋Œ€ํ•œ ๋”ฐ๋ฅด๋Š” ๋ฐฉ์‹์œผ๋กœ ๊ฐ€๋ คํ•จ.

๋ชฉํ‘œ ์˜ˆ์‹œ

ํ›„๋ณด ์•ˆ

import redisLockClient from 'RedisLocker-pubsub';
// await๋Š” pending๋˜์–ด์žˆ์Œ. 
const pool = new redisLockClient({/*Settings*/});
const lock = await pool.getLock('key');
try {
    const isLocked= await lock.tryLock(/*maxTime*/,/*planTime*/,/*second?*/); // boolean
    if(!isLocked) {
    // revert.
    }
    const data = await lock.getData(DataType.JSON /*JSON, plain ...*/)
    // do something....
   // commit
   lock.commit(value)
}catch (e){
 // Error handler
}finally{
    // include revert
    lock.release();
}

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.