David H Nebinger 6 Years Ago It is important to note that the list you get will likely never be 100% accurate. For example, if a user logs in and just closes the browser, they will show as logged in, even when they are not, until their session expires.Also this code will never work in a cluster since it is based on per-node session creation/destruction. The only list you'll get is the list from the node you happen to connect to. Please sign in to reply. Reply as... Cancel Neha Goyal David H Nebinger 6 Years Ago Thanks David for the detailed feedback. Could you mind to share your thought how i can resolve above issues.I would be really thankful to you.Regards Please sign in to reply. Reply as... Cancel David H Nebinger Neha Goyal 6 Years Ago The browser close (or general disconnect from internet) issue you can use a short session with auto-extend enabled. That shortens the amount of time a user would show as logged in, even though they are not. Note that this cannot be eliminated because, if you just close the browser, there is absolutely nothing you can do about it.For the cluster, you could message the events around the cluster to notify the other nodes. This has two issues, though. First it magnifies the session timeout issue above (you see invalid sessions from all nodes instead of just one), and second you may need to resolve cases where users are on multiple nodes (either because they are logged in using multiple devices or because you are not using sticky sessions).These are not issues for Liferay, per se, these are issues that all internet systems struggle with. Closing the browser is simply not solvable using today's browser/http technology. The cluster issue can be resolved, but will take additional effort on your part to make it happen. But then you need to ask yourself if solving this problem actually gives you anything worthwhile or whether it is just throwing money away. Please sign in to reply. Reply as... Cancel
Neha Goyal David H Nebinger 6 Years Ago Thanks David for the detailed feedback. Could you mind to share your thought how i can resolve above issues.I would be really thankful to you.Regards Please sign in to reply. Reply as... Cancel David H Nebinger Neha Goyal 6 Years Ago The browser close (or general disconnect from internet) issue you can use a short session with auto-extend enabled. That shortens the amount of time a user would show as logged in, even though they are not. Note that this cannot be eliminated because, if you just close the browser, there is absolutely nothing you can do about it.For the cluster, you could message the events around the cluster to notify the other nodes. This has two issues, though. First it magnifies the session timeout issue above (you see invalid sessions from all nodes instead of just one), and second you may need to resolve cases where users are on multiple nodes (either because they are logged in using multiple devices or because you are not using sticky sessions).These are not issues for Liferay, per se, these are issues that all internet systems struggle with. Closing the browser is simply not solvable using today's browser/http technology. The cluster issue can be resolved, but will take additional effort on your part to make it happen. But then you need to ask yourself if solving this problem actually gives you anything worthwhile or whether it is just throwing money away. Please sign in to reply. Reply as... Cancel
David H Nebinger Neha Goyal 6 Years Ago The browser close (or general disconnect from internet) issue you can use a short session with auto-extend enabled. That shortens the amount of time a user would show as logged in, even though they are not. Note that this cannot be eliminated because, if you just close the browser, there is absolutely nothing you can do about it.For the cluster, you could message the events around the cluster to notify the other nodes. This has two issues, though. First it magnifies the session timeout issue above (you see invalid sessions from all nodes instead of just one), and second you may need to resolve cases where users are on multiple nodes (either because they are logged in using multiple devices or because you are not using sticky sessions).These are not issues for Liferay, per se, these are issues that all internet systems struggle with. Closing the browser is simply not solvable using today's browser/http technology. The cluster issue can be resolved, but will take additional effort on your part to make it happen. But then you need to ask yourself if solving this problem actually gives you anything worthwhile or whether it is just throwing money away. Please sign in to reply. Reply as... Cancel