Hello All,
I am using this https://docs.openvidu.io/en/2.15.0/tutorials/openvidu-js-java/ as a reference while developing my Java based application.
I can see that we are using HashMap to store sessions and tokens.
I am talking about this piece of code.
// Collection to pair session names and OpenVidu Session objects
private Map<String, Session> mapSessions = new ConcurrentHashMap<>();
// Collection to pair session names and tokens (the inner Map pairs tokens and role associated)
private Map<String, Map<String, OpenViduRole>> mapSessionNamesTokens = new ConcurrentHashMap<>();
As the number of users grows, the size of this collection will grow. I know the details will be removed once the user ends the session but can we really depend on this? What if the user didn’t click on the end call button (to remove from collection) in my case?
Is there any efficient way to handle this? I was thinking to store in the database.