Closed Fyrsta closed 9 years ago
@WickedGamingUK Seems like a good idea. Would be the best to have the entries stored in a synchronized list. Then, they could easily be pulled every so often by a BukkitRunnable, and synced with the server.
@JeromSar By a synchronized list, do you mean by using Collections.synchronizedList? Also, would it be possible to empty the list after the Runnable has finished without losing any queries that were added whilst the Runnable was running (if this is a problem or not, I don't know)?
@JeromSar
@JeromSar
@WickedGamingUK I can't really go into specifics without writing a huge post, try something out and see if it works.
@JeromSar Alright, thanks for your help.
Something that @TheCJGCJG thought of. The ability to add a queue of SQL queries to log to the database every so often (probably every 20 seconds - I don't see why it'll need to be any faster to be honest) asynchronously. This will free up performance as these queries can easily cause the server to slow down.
@JeromSar, I'd like your opinion on this as you've got a far better idea than I do about asynchronous threading, thread safety, etc.