You can use
page methods to periodically (say, every 5 or 10 seconds) send a request to the server asking for new messages. You can setup a JavaScript timer to control the lookup period. You can then use some JavaScript to update the page with the new messages. When a user submits a new message, store it in a database.