Hi,
First of all, thanks for this great library. I am doing some tests at this
moment and it is looking very good.
I have a couple of questions about the rules concerning the valid server
and group combinations running inside the same JVM. I use GMSFactory to
create GMS modules, but it is unclear to me which combinations of server
IDs and groups are allowed inside the same JVM. Looking at the code of
GMSFactory did not help. My questions are:
- is it allowed to have two modules for the same group inside the same
JVM? For example, server ID A as a core member and server ID B as a
spectator, or both server ID A and B as core members.
- Is it allowed to use different server IDs for different groups? For
example, server ID A as a member of group foo and server ID B as a member
of group bar.
IMHO, GMSFactory should actively check for violations of the answers to my
questions and throw a runtime exception if the user attempts to create an
invalid combination.
Also, I think that GMSFactory is broken. To check for the existence of a
group the server ID passed to startGMSModule is not used. Instead a static
variable is used that is set on the creation of a module. Depending on the
order in which startGMSModule is called this leads to different behavior.
Here is an invocation sequence:
- server ID A, group foo
- server ID B, group foo
- server ID B, group bar
The second invocation will return the module created in the first
invocation. If the second and third invocation are swapped, a new module
will be created for server ID B and group foo.
Another sequence is:
- server ID A, group foo
- server ID B, group bar
- server ID A, group foo
The third invocation will not return the module created in the first
invocation but will return a new module. If the second invocation is left
out, the group created in the first is returned.
Kind regards,
Johan Stuyts