I've started testing poolserverj at bitcoins.lc for handling larger loads better (Having issues with LP's against large amount of connections).
But before rolling out anything public, i really need to get rid of the DATETIME-fields in MySQL. Is that possible?
I'd like to have everything in GMT UNIX Timestamps. One "hackish" way would be to do the conversion in the statement, but I'd like actually make poolserverj to insert unix timestamp instead of having to do a TO_UNIXTIME(?) in the statment.
Even better would be to drop MySQL entirely and finally use a better scaling database (MongoDB/other No-sql DB) and let Mongo take care of timestamps by it's own, also let mongodb take care of replication and load balancing / sharding.
Any planned NoSQL-support?
Well before the advent of merged mining PSJ had exceptional longpoll performance but as you can see from the last few posts in this thread there's a few issues to be ironed out....
There is one good reason why you'd want to have timestamps set on the psj side rather than DB side. Because psj caches shares and bulk writes them there can be a delay between when they came in and when the DB sees them. PSJ timestamps the share as soon as it's received and uses this timestamp when writing to the db. So if accurate share times are important to you that's something to consider.
I'm not really familiar with mongo or no-sql. If they have JDBC drivers then adding support would be fairly trivial. However it won't happen until mm is stabilised. Dropping mysql support isn't likely sits it's most commonly used.
Having poolserver insert a timestamp directly should also be fairly trivial. The internal representation is the same as a unix timestamp GMT but in millis instead of seconds. If you're comfortable building from source it would only be a couple of lines needed modding in DefaultPreparedStatementSharesDBFlushEngine. If you really want crazy performance and your share writes don't update existing rows have a look at the bulkloader engines in the source.
I presume what yr actually after is just an integer column? If so have you tried just changing the column type to see if it works? The code that sets is this:
stmt.setTimestamp(7, new Timestamp(entry.createTime));
And I have a feeling if the target column type is a BIGINT it will probably just convert it.
If not the change you'd need to make would be something like:
stmt.setLong(7, entry.createTime / 1000);