Removing CometActors from page
- Dominant language
- Scala
- Stars
- 1.3k
- Forks
- 275
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
Research direction
Start with the linked Google Groups discussion and the Comet lifecycle around S.findOrCreateComet. Compare the proposed client API lift.stopListeningToComet with server-side S.removeComet, then define and test one shutdown path covering the cleanup behavior described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100