OTP Process Abstractions with proc lib | Mitchell Hanberg | Code BEAM America 2022

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 พ.ย. 2024

ความคิดเห็น • 2

  • @ewildgoose
    @ewildgoose ปีที่แล้ว +1

    I think cowboy is probably one of the few libraries I know where you need to be aware of proclib. Yet alternatives like "thousand Island" remain competitive on speed. So clearly you want to be thoughtful before reaching down below the genserver level!

    • @mitchhanberg
      @mitchhanberg ปีที่แล้ว +1

      I believe ranch is the equivalent library, not cowboy, to thousand_island (ranch does use proc_lib).
      Really, it's just about message passing semantics and not performance. Once case is that with a genserver, it always consumes a message from the mailbox, but if you build using proc_lib, since you are calling receive yourself, you can use selective receive.