I'm currently working on a semi-small spare time project to learn some new technologies. My plan is to create a chat application, client-side being built in WPF, and server-side with Java.
What I'm curious about is what approach I should take to sending and receiving messages. My current idea is to log the user in using a socket connection, and then maintain that connection to send that user notifications when he/she receives a message. Many people might have an application such as this run for many hours on their computer, so is maintaining a socket connection bad? If so, is there another approach I should consider instead?