The server is hit once to get a small work assignment that could be run on any machine. The chunk of work should be small, perhaps 5 minute to 1 or 2 hours of work at the most.SuneF wrote:I did a simple distributed version of perft a few years ago, using WCF (SOAP) and entity framework it just took me a day or so to set up.
There are a few issues to solve...
1) Every user should queue up some "work units" locally to avoid going idle in case of network problems. The server side must remember which WUs have been assigned and re-assign them after a certain timeout period, as the user may have quit the project and they will never complete.
No need for complicated tracking. I suggest that the assignments are handed out randomly. The server only cares what it actually has received and it does not care where it came from. There is no harm done if an occasional work assignment is handed out an extra time than intended as that is useful for verification.
Yes, that would make it much more fun.
2) There should be a stats page to make it more interesting. Who is the lead cruncher, cruncher of the day and all that, like SETI.![]()
The client binary does the work - just get volunteers to run it whenever their computer is idle. It does not have to be fast or run on a fast machine. It will just be a binary that you download and run - and to make it fun the binary will report cool statistics on it's progress.
3) You should have a super fast client for this, something coded just for perft. In fact you should probably have 2 independent clients and randomly validate the result not just between programs but also between users, so that every user is checked for credibility. Some users may have faulty hardware or overclock to the extent that it occationally flips a bit, such clients must be detected and denied access.
The secret is to get a lot of volunteers - I don't know how many will be willing to run perft.
How much CPU effort was involved in perft(13)? Was this just Steve's machine? Was it a quad or much more than that?
No need. Just obfuscate the assignments so that the user is not aware of what "lines" are specifically being worked on. And to verify the results you hand out the assignments twice. Yes, it's twice as much work but it needs to be checked anyway.
4) Some kind of security, so that a single user cannot intentionally send you garbage data and sabotage the final result. I image something like a username/password and an computed checksum on each message.
But it kinda seems like a lot of work, just for perft..

