My question is similar to this stackoverflow question.
I have a Spring application runs under tomcat on port 80. This is for RESTfull service and a web application.
Now new requirment comes in which is to use native Android clients (1000+) to exchange messages (events) from android app to the server, not android-to-android. I'm not going to use same tomcat server to use HTTP for this messaging pipeline because,
- Many android clients
- Many messages/events will be there
- Need a lighter protocol than HTTP
I though it is better to have a NIO socket server (ex: using websockets) such as Netty to handle only mobile client's messaging pipeline. However these mobile clients use RESTfull service as well.
Message/event flows for Android clients
Android ----> Netty ----> Spring App
All the other request/response
Android ----> Tomcat ----> Spring App
Web ----> Tomcat ----> Spring App
They suppose to share the same authentication mechanism or separate mechanisms. However I have't though about that yet since no Netty is there.
I appreciate if anyone can give me directions, advice or sample configurations.