A few years ago I had the idea of creating a fairly standard online spaceship combat game (like EVE). The difference to other such games being that the players would not control their ships directly, but instead through code they submitted to the game - a more complicated and extended Robocode or CoreWar. At the time I stopped because I couldn’t work out a way of preventing Denial of service attacks in the submitted code. I had hoped to use Java as it had an extensive security model, but I found there was no way of stopping untrusted code from starting too many threads or allocating too much memory.
Fast forward many years, and I thought I’d check out if the situation has improved. A search on Google returned all the same webpages I read 9 years ago - there hasn’t been much movement in the area. The Javadocs suggested that the thread issue had been fixed, but no word about memory. I checked Robocode and it seems to just ignore the memory allocation problem. This is because it is not fixed!
WTF! Sun has gone on about the Java Security Model for some time now. Touting the safety of its sandbox. However, if untrusted code can crash the system it is broken - nothing more to say. I don’t care about the rest. This has been a known issue for years.
Anyway, rant over. On a more positive side, I used StackOverflow for the first time in researching this issue and it is quite cool. My question is here. The answer states that there is a movement to fix the memory DoS attack, but that it is still in the requirements stage and probably will not be part of Java7.