mirror of
https://github.com/penpot/penpot.git
synced 2025-07-25 17:17:23 +02:00
🎉 Add version 4 of blob encoding.
The version 4 starts using the hight performance fressian binary encoding with very lightweight compression layer.
This commit is contained in:
parent
a9904c6ada
commit
219f9c478d
12 changed files with 338 additions and 24 deletions
|
@ -179,18 +179,18 @@
|
|||
;; Add a unique listener to connection
|
||||
(.addListener sub-conn
|
||||
(reify RedisPubSubListener
|
||||
(message [it pattern topic message])
|
||||
(message [it topic message]
|
||||
(message [_it _pattern _topic _message])
|
||||
(message [_it topic message]
|
||||
;; There are no back pressure, so we use a sliding
|
||||
;; buffer for cases when the pubsub broker sends
|
||||
;; more messages that we can process.
|
||||
(let [val {:topic topic :message (blob/decode message)}]
|
||||
(when-not (a/offer! rcv-ch val)
|
||||
(l/warn :msg "dropping message on subscription loop"))))
|
||||
(psubscribed [it pattern count])
|
||||
(punsubscribed [it pattern count])
|
||||
(subscribed [it topic count])
|
||||
(unsubscribed [it topic count])))
|
||||
(psubscribed [_it _pattern _count])
|
||||
(punsubscribed [_it _pattern _count])
|
||||
(subscribed [_it _topic _count])
|
||||
(unsubscribed [_it _topic _count])))
|
||||
|
||||
(letfn [(subscribe-to-single-topic [nsubs topic chan]
|
||||
(let [nsubs (if (nil? nsubs) #{chan} (conj nsubs chan))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue