framework icon indicating copy to clipboard operation
framework copied to clipboard

Removing CometActors from page

Open gvdm opened this issue 11 years ago • 3 comments

As per the discussion at https://groups.google.com/forum/#!topic/liftweb/u3qN8mVUpnI and as Antonio pointed out in that conversation, this is a feature which is likely to be multi-faceted.

Removing the CometActor from the client side only is probably simplest and provided via a function such as lift.stopListeningToComet as Antonio has suggested.

The other option is doing it on the server - a S.removeComet to correspond to S.findOrCreateComet. That could do a lot better cleanup handling, including unsubscribing clients, shutting down the comet immediately, and removing it from the session's comet list. On the flip side, that would have to deal with potential timing issues with, say, clients in multiple tabs/windows that have perhaps already sent something to the comet for processing, etc etc.

Even just a client side shutdown which would allow server side GC to kick in properly would be awesome by itself.

gvdm avatar Jan 04 '15 14:01 gvdm

I'll be trying to do some deeper work on comet plumbing for the 3.2 cycle, time willing. I've got many other improvements in ideation/half-implemented stages, but it's going to take some time. I'd like to roll this in with those; if anyone else wants to pick it up, though, please feel free.

Shadowfiend avatar Apr 22 '17 19:04 Shadowfiend

This sounds interesting. I'd like to give it a shot unless you are already working on it.

Bhashit avatar Nov 05 '17 05:11 Bhashit

Go for it. My deeper work on comets got shelved in favor of #1876, which can't really go in until a major version bump… That kind of made me stumble in general, so those changes are still in nascent stage and won't be making it into 3.2.

Shadowfiend avatar Nov 05 '17 23:11 Shadowfiend