2
votes

Can I open and use multiple websocket sessions between a Codename One app and a Spring Boot server?

For example, is it fine if I open a session for each chat, assuming that the app must handle multiple chats? Moreover, is it fine if I open sessions for chatting and a different session, froma different url, for notifications?

Thank you

1

1 Answers

1
votes

Yes. But I wouldn't recommend more than one connection per device. Websocket connections are kept open on the server and can become a point of scaling challenges moving forward as you need to handle the mapping to the sockets.

You're better off using them as one per device.