How to show online members on our website ?

The_Small_k

The_Small_k

@the-small-k Oct 25, 2024
hello guy's
I am facing a problem in showing currently online members on my website.
I am using Application scope(Context) to store the online members name but seems like it doesn't work's.
If anyone know what is the mechanism behind showing online members or common chat room please share the idea.

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Manish Goyal

    Manish Goyal

    @manish-r2Hoep Oct 22, 2011

    I think you can use following approach for this

    Just store sessions (If you really use session) in separate tables in your database and then manipulate them dynamically (This is not a best approach , but quite easy you can use it)
  • The_Small_k

    The_Small_k

    @the-small-k Oct 22, 2011

    I don't think database is used there because if we use database then for every message show in group chat i have to establish a connection between database and controller.And that degrades the performance of group chat.
    Same thing can be utilized to show the online members.
    I want to store that information's in List.
    On every session creation i want to update the list and on refreshment of page it show's the every elements of lists by iterating them.

    I used application scope to store the information and loads in every session but still it's not working for me.
    I think one more problem is there our server load increase due to heavy memory use isn't it ?