First off, not really sure where to post this, as it involves rendering, networking, and multithreading. So here I am general topics!
Context; I’m attempting to build a fully mutable sandbox world from the ground up to be both networked and multithreaded for best scaling performance possible on higher end hardware. The system uses a client / server relationship for networking.
I hit a snag with multithreading, found an interesting fix, and would like to investigate it’s ramifications with all of you. The snag was concurrent modification of the world data (rootNode) from multiple threads. I know this is strictly not allowed by the OpenGL render thread. But I was curious and found that if I ran the program in headless server mode (as my server would be) the exception went away.
Now I’d also like to use assertions for development purposes, but I found that with assertions enabled my program still crashes as an assertion is checking for the concurrent modification problem even when in headless server mode.
Is it ‘cheating’ to allow concurrent access to the rootNode when in headless server mode? Will this approach lead to other problems down the road, or is really just a concern for the rendering process and thus irrelevant on the server? And is there a way I can get assertions back for my use without the jme crashing my program everytime? Should I comment out those assertions in the engine?
Thanks for reading.