0

I want to create a websocket Java API for these requirements: "When the user logs into my application, if he enters a page which has constant updates from the server, then the Java API should identify the user and keep pushing the contents on a regular interval"

So for this I want to get started in creating a generic Java API so that for other pages, which requires push from server, I can use the APIs instead of reinventing the wheel everytime

What are the things I should take into consideration and how should I approach this problem

Please key in your thoughts

Thanks in advance

1

1 Answer 1

3

GitHub has a number of libraries which deal with Java and WebSocket. You can build your application on top of one of them. Examples are vert.x, SockJS, Atmosphere etc.

At the SockJS page you can see a list of clients/servers for working with it. IMHO It is better to re-use one of the existing libraries/frameworks than building your own, because yours is a common usecase and working with web sockets, providing corss browser compatibility etc are not trivial as of now.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.