
We don't want that somebody use our tool to raffle off a prize, but bypass the random process, and record a video to say, "Hey, we picked a random winner by a tool from ." So we choose a server-side solution.īy using server-side random function, the only thing that the malicious code or a person can change is the data source. It is something which the developers can not control. It can happen in the background process, which other people can not see on the screen.

If using random function from Javascript, as the full source codes are stored on users' local computers, it is impossible to prevent a malicious code or any person from doing something to bypass the random function and set a value to the "winner" directly. However, it is a different story on actual real-world operations:


Both are the same from the technical part - the random function from Python and Javascript both generate pseudo-random numbers.
