Socket programming inside a servlet acting as server, is it a good solution to start a sort of server pushing environment?

I wouldn't do socket programming from within a servlet; you're likely to have all kinds of problems if the socket outlives the Request which initiates it Take a look at the cometd project. Comet is a technology for doing HTTP-push (basically, you hold an HTTP connection open for an arbitrarily long time, and the server pushes events down to the client as they occur, rather than waiting for the client to poll). You need a web server which will scale to support a large number of mostly-idle connections, but that's not hard these days, and the cometd project has a number of implementations available for download.

You could use theirs, or just take a look at it for inspiration if you want to build your own.

I wouldn't do socket programming from within a servlet; you're likely to have all kinds of problems if the socket outlives the Request which initiates it. Take a look at the cometd project. Comet is a technology for doing HTTP-push (basically, you hold an HTTP connection open for an arbitrarily long time, and the server pushes events down to the client as they occur, rather than waiting for the client to poll).

You need a web server which will scale to support a large number of mostly-idle connections, but that's not hard these days, and the cometd project has a number of implementations available for download. You could use theirs, or just take a look at it for inspiration if you want to build your own.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions