Please bear with me, I am a bit new to these terminologies. Sorry in advance for my misunderstanding. What I am seeking may not even be possible.
Seeking Solution For:
I would like to find a solution which allows bidirectional communication between the server(weblogic) <--> client same session (http, websocket). This communication should be considered 'Same Session'. This will be geared towards mobile applications (iOS, Android, Windows) to enable the native application communication to the web server over the same session as the Webview Facade.
|Webview -> http
server <--> | Both connection are considered the same user.
|Native -> ws
Current Implementation:
We are currently queuing JavaScript message objects in the global JavaScript context for the mobile webview and constantly polling this message queue for new updated messages from the native application. This implementation works somewhat/sometimes but is not the best solution and is a nightmare to maintain. I am seeking an alternative solution which would allow a cleaner approach.
Example flow:
- Mobile Webview connects to web application via url: https://webapp/login
- User logs into application.
- Mobile Webview redirects to dashboard url: https://webapp/dashboard
- Native application makes a connection to the websocket via url: wss://webapp/dashboard/ws
- Both connections are considered to be the same user and session with the ability to update UI layer via a websocket request.
Is this design/architecture possible? Can Web sockets be used in this manner? Can Web sockets share the same HTTP session?
Any help/pointers or just general knowledge in this realm would be greatly appreciated . Thanks