Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

HWM support #19

Closed
tj opened this Issue · 4 comments

2 participants

TJ Holowaychuk Garrett Johnson
TJ Holowaychuk
Owner
tj commented

and emit an event when messages are dropped so you can implement your own queuing etc..

Garrett Johnson
Collaborator

Kinda playing off that and whats going on in #20, might be nifty to pass the "identity" to the event and also emit an event (or have a plugin api) when a previously "identified" socket comes back online.

That would basically give us a durable socket implementation with out having to write one lol.

TJ Holowaychuk
Owner
tj commented

haha yeah as long as we expose that info it should be pretty easy to hook up

Garrett Johnson
Collaborator

Have you thought about this much? I am running into a case for it, but not super sure the best implementation for it... My use case is leveraging HWM so I don't have to add a queue in the middle. I can imagine the event for meeting HWM is straight forward, but the offload process there after is not so straight forward...

socket.on('hwm', function(msg){
  // write to db
});

socket.on('meh?!?!', function(){
  // offload from db
});
TJ Holowaychuk
Owner
tj commented

not much nope, so far our data is very transient but hmm yeah I guess we emit start emitting them when hwm is reached and emit another when things cool down, that what algo would be im not sure. If we were to emit that immediately it could enable thrashing so we might a backoff function for that as well

TJ Holowaychuk tj closed this issue from a commit
TJ Holowaychuk add HWM support. Closes #19 7829221
TJ Holowaychuk tj closed this in 7829221
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.