<p>I want to enable an user to be able to communicate with other users through a site. I know that ASP.net is stateless, but what can I use for this synced communication? Java servlets?</p>

[{'answer_id': 36918, 'author': 'Rob Bazinet', 'author_id': 2305, 'author_profile': 'https://Stackoverflow.com/users/2305', 'pm_score': 0, 'selected': False, 'text': '<p>ASP.NET is "stateless" but it maintains state using Sessions.  You can use them by default just using the Session[] keyword.  </p>\n\n<p>Look at <a href="http://msdn.microsoft.com/en-us/library/ms972429.aspx" rel="nofollow noreferrer">ASP.NET Session State</a> for some details from Microsoft.</p>\n'}, {'answer_id': 36923, 'author': 'brabster', 'author_id': 2362, 'author_profile': 'https://Stackoverflow.com/users/2362', 'pm_score': 0, 'selected': False, 'text': '<p>Could do a messaging solution in Java Servlets using the application context. Objects stored as attributes in the application context are visible from anywhere in your webapp.</p>\n\n<p>Update: Chat like functionality... I guess that would be AJAX polling your message structure stored in the app context unless you want to use something like applets.</p>\n'}, {'answer_id': 36925, 'author': 'Rob Bazinet', 'author_id': 2305, 'author_profile': 'https://Stackoverflow.com/users/2305', 'pm_score': 1, 'selected': False, 'text': '<p>You probably don\'t want to use sessions for things like chat messages but you probably could use some type of implementation of queueing using <a href="http://msdn.microsoft.com/en-us/library/ms711472.aspx" rel="nofollow noreferrer">MSMQ</a>.</p>\n\n<p>The approach to chat could be done in many different ways, this is just a suggesting off the top of my head.</p>\n'}, {'answer_id': 36929, 'author': 'brabster', 'author_id': 2362, 'author_profile': 'https://Stackoverflow.com/users/2362', 'pm_score': 0, 'selected': False, 'text': '<p>Don\'t know if it\'s any good, but there\'s a chat servlet <a href="http://coldjava.hypermart.net/servlets/chatfaq.htm" rel="nofollow noreferrer">here</a> that might be useful to use or learn from if you decide to go the Java route...</p>\n'}, {'answer_id': 36931, 'author': 'Sam McAfee', 'author_id': 577, 'author_profile': 'https://Stackoverflow.com/users/577', 'pm_score': 3, 'selected': True, 'text': '<p>I don\'t think you need to set up Java just to use a servlet for this. I would use AJAX and the database. I don\'t know ASP.NET but I PHP is similar in this case, being also basically "stateless". If you want to display some kind of asynchronous communication between two different users, say, from two different sessions, without a lot of refreshing (like chat), you can have the AJAX page constantly poll the database for new messages, and display them when they come in. You can also use AJAX to insert the new messages, giving the user read/write access to this messages data structure. Since the "other" user is doing the same thing, user A should see new messages pop up when user B types them in.</p>\n\n<p>Is that what you mean?</p>\n'}]
['https://Stackoverflow.com/questions/36916', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1013/']