I am writing a web app that runs on tomcat. I need to transfer around 25 kb of data (all double/long values every 20 ms from server to client.) Trying to use server-sent events for this, as I just need one one way communication channel from server to client.
Using java at server side and java script at client side.
Please suggest if what I am talking here makes sense at all and if it is achievable.
I am new to web development.
Why don’t you try it yourself – you will notice a big difference between localhost and an actual network:
Servlet (Generates 25kb big messages):
Index.jsp: