Spring Tips: Distributed Locks with Spring Integration

Sdílet
Vložit
  • čas přidán 28. 07. 2024
  • Hi Spring fans! In this installment we look at distributed locks in Spring Integration to ensure exclusive access to a shared resource in a cluster.
    speaker: Josh Long
  • Věda a technologie

Komentáře • 26

  • @al.sargent
    @al.sargent Před 4 lety

    Great job as always Josh! I just today highlighted this video to one of my colleagues as an example of an excellent developer-oriented video.

  • @JimzZel
    @JimzZel Před 2 lety

    Thank you for this video, I learned something today.

  • @Prim12398
    @Prim12398 Před 5 lety +5

    "Using my second favorite place.. start.....stackoverflow..." 0:55, haha , we know what You are made of :> (Good tutorial)

  • @hannesvideo
    @hannesvideo Před 5 lety +2

    Ok, not much spring-integration here, I thought. But it is the LockRegistry that is used!

  • @khalildureidy
    @khalildureidy Před 5 lety +9

    is it supposed to create the db tables automatically for the lock? or you created them manually?

    • @aniyt10
      @aniyt10 Před 3 lety +4

      Good point.
      I had to create this table
      CREATE TABLE INT_LOCK (
      LOCK_KEY CHAR(36) NOT NULL,
      REGION VARCHAR(100) NOT NULL,
      CLIENT_ID CHAR(36),
      CREATED_DATE TIMESTAMP NOT NULL,
      constraint INT_LOCK_PK primary key (LOCK_KEY, REGION)
      );

  • @rajpraveenbhiwani9176
    @rajpraveenbhiwani9176 Před 3 lety

    With differenct JVMs will that solution work. And if not how can we handle?

  • @shubhamna1192
    @shubhamna1192 Před 4 lety +1

    getting initialization error for the final field ,private final LockRegistry registry;

  • @vishalsundararajan1228
    @vishalsundararajan1228 Před 5 lety +2

    I want a queuing approach instead of locking it, i want all the request to be processed but only one at a time

    • @WasifTanveer
      @WasifTanveer Před 3 lety

      You can use some broker i.e. publisher consumer mechanism to achieve your requirement

  • @smithdragon6477
    @smithdragon6477 Před 2 lety +1

    Good demo .but no transaction controls ...

  • @valix85
    @valix85 Před 5 lety +3

    Please in future increase font zoom in IDE and browser... Good video

  • @arvindgurav9911
    @arvindgurav9911 Před 3 lety

    Can you share github repo link.

  • @andreslascano
    @andreslascano Před 5 lety

    How can I do this with mongodb?

    • @srvmojo9190
      @srvmojo9190 Před 4 lety

      Theres good support for the same in spring data , using @Version annontation & optimistic locking or pessimistic locking even for clustered environment .

    • @waqasrana7891
      @waqasrana7891 Před 2 lety

      @@srvmojo9190 that will throw exception so you have to retry again

  • @himanshurawal7223
    @himanshurawal7223 Před 3 lety

    Please increase the font

  • @hongxing7259
    @hongxing7259 Před 2 lety

    do NOT use verb in api uri, like "update", and do use correct http method PUT for update

  • @janbodnar7815
    @janbodnar7815 Před 5 lety +2

    Arrgh, dark theme please.

    • @zapl80
      @zapl80 Před 5 lety +6

      No, please stay with the light theme. Stupid pseudo pro dark look doesn't make your code better nor is it easier to read.

    • @janbodnar7815
      @janbodnar7815 Před 5 lety +2

      @@zapl80 How old are you? Because the older you are, the more you appreciate the dark theme; it is easier on the eyes.

    • @lisafox9026
      @lisafox9026 Před 5 lety +1

      NO dark theme !!!! bad video!!!!! beeeee

    • @ladahofmann451
      @ladahofmann451 Před 4 lety +1

      J

    • @ladahofmann451
      @ladahofmann451 Před 4 lety +1

      3