Author Message
Ahmadqadri
Joined: Oct 8, 2018
Messages: 54
Offline
Hello

I am developing a dmcc call control application, my telephony logic resides on the server and browser clients requests applicationSession by sending an extension and related credendials. Client server communication is done using web sockets. My question is, will this work for multiple clients. I have referenced the code provided in sample popup application which starts an application session every time the project runs. In my case should there be a new application session for every single client or they can use the same applicaiton session to register an extension.
If I initialize a new serviceProvider instance for every new request will the events for previous registration still be fetched...

Additional Info
Im using signalR for client server communication. And my telephony logic resides in the signalR HUB class.
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Offline
It is not good practice to open (and close) a new connection for each request. In fact, if you are listening for events, you will need to keep at least one connection open indefinitely.

So, you can use either of these schemes:

1. Open a DMCC connection when your service starts up. Use this connection for all requests to AE Services. Disconnect the connection when the services is stopped.

2. Open a DMCC connection per station. Open the connection when the user logs in via the browser. Use this connection for all requests & events for that station. Close the DMCC connection when the user logs out.

Scheme is the simplest and I don't see any advantages to scheme 2.

Martin
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
I actually see disadvantages to the second approach Martin outlines. Each session consumes resources in AE Server and in the SDK (and thus your server). Each session must be maintained via keepalives. Should there be a session issue it is bound to cause issues with many sessions causing a lot of extra work. I would also recommend the single session approach, it reduces latency (of session establishment) and overall it reduces load on both AES and your server.

Q: My question is, will this work for multiple clients. A: yes, definitely.
Q: If I initialize a new serviceProvider instance for every new request will the events for previous registration still be fetched A: not sure I understand - registration may mean different things to you and I in this context; an application _can_ have multiple (independent) serviceProvider instances, they will operate autonomously.
Go to:   
Mobile view