Hi am creating a instant messenger in java, I am very unsure as to what the best way to store a users contacts would be. I am using a mySQL database to check user credentials for login, once logged in the user status on the database is stored as "online". I have created a simple GUI for the client with a login section and a textArea for the contacts. is the best way forward to store the contacts in the mySQL databse too? or in a file which can be uploaded to the mySQL database. and how would i get the contacts list to update as users go online and offline. currently I have no code for updating or storing contacts as I am lost, if someone could please send me in the write direction I would be grateful.
here is what I have
Java chat client GUI -login feature working which stores the user as online on the mySQL database
-mySQL database which stores users Id, password, name and status as well as ipAddress
I am stuck here and need help please. for example... when a user logs in from their client and another user logs in from theirs and they are both contacts how will can i get their "online" statuses from the sql database and output them. I know i will user a textArea etc but would i need to implement RMI? or will my server need to handle all of this.