setup own server

I would like to setup my own server.

I already searched the forum and saw two threads that dealt with this topic.

The first one said that the server code is already in the source.
The second one said that the server architecture will move to jabber soon, so it would not be advisable to use the current server.
And I found a hint mentioning that the main VASSAL source woulf habe to be altered to be able to connect to a custom server.

Could you please give me some advice:

When will the new server be ready? I do not ask this to hurry, but to see if I will use the old server if will still take some time. :slight_smile:

Where CAN I find the server source in the code tree? I looked in the downloadable source and in the svn but did not find anything.

Where would I alter the code to tell the client to connect to my servers IP?

And last but not least: I could not find any instructions or tutorials on how to compile the source - would NetBeans do?

I would be very grateful for some help and thanks in advance.

p.s.: I was Sun certified for Java 2.0 SE in 2002, biz did not program in java since then, so I have basic knowledge, but am more than a little rusty… :wink:

Thus spake xanathon:

I would like to setup my own server.

I already searched the forum and saw two threads that dealt with this
topic.

The first one said that the server code is already in the source.
The second one said that the server architecture will move to jabber
soon, so it would not be advisable to use the current server.
And I found a hint mentioning that the main VASSAL source woulf habe to
be altered to be able to connect to a custom server.

Why do you want to do this? What shortcoming of the current server do you
expect to correct by running your own?

Could you please give me some advice:

When will the new server be ready? I do not ask this to hurry, but to
see if I will use the old server if will still take some time. :slight_smile:

I can’t give you a reliable estimate right now.

Where CAN I find the server source in the code tree? I looked in the
downloadable source and in the svn but did not find anything.

It’s under VASSAL.chat.

Where would I alter the code to tell the client to connect to my servers
IP?

There’s a URL you’d need to alter in VASSAL.chat.DynamicClient.

And last but not least: I could not find any instructions or tutorials
on how to compile the source - would NetBeans do?

I see no reason why NetBeans wouldn’t work.


J.

Thank you for your replies.

Well, let’s just say there was a server outage for days over the weekend… :wink:

The issue with the current vassal server is that it is a single point of failure for playing vassal online. The backup solution, the peer-to-peer direct connections, requires that all players but one have a public (even if dynamic) ip address. In my case, this makes it impossible to connect, as most of them are behind NATs that they do not control.

Since we are not opportunist players, meaning that we set up rendez-vous so as to play together online, downage of the central server does not allow us to play at all. This scenario happened on Monday night (at around 2000Z) when the server was down, together with the fora and the main site.

That is the single issue that I think would be solved by running your own server, considering that you already need your connectivity to play online. The other solution would be to increase the resiliency of the server; will the foreseen usage of Jabber address this issue?

Thus spake Calsir:

Since we are not opportunist players, meaning that we set up rendez-vous
so as to play together online, downage of the central server does not
allow us to play at all. This scenario happened on Monday night (at
around 2000Z) when the server was down, together with the fora and the
main site.

That is the single issue that I think would be solved by running your
own server, considering that you already need your connectivity to play
online. The other solution would be to increase the resiliency of the
server; will the foreseen usage of Jabber address this issue?

No, Jabber won’t make the power infrastructure nor the telco in Tucson
any more reliable than they are. Essentially every problem we’ve had
recently has been due to one of the two. When the network’s been down,
the server itself has remained up, just unreachable.

It’s been a while since we’ve had the server process itself die, but
that used to happen more often. Switching to Jabber should make that
more reliable.

I don’t want to hinder you from setting up your own server, I just
don’t have the time right now to help you with it. I’d like eventually
to find a way to shift over to peer-to-peer more so that things can
be more self-organizing, so that we don’t have a single point of
failure.


J.

I don’t want to hinder you from setting up your own server, I just
don’t have the time right now to help you with it. I’d like eventually
to find a way to shift over to peer-to-peer more so that things can
be more self-organizing, so that we don’t have a single point of
failure.

One idea would be to use the central server as a meeting point and hand off
the protocol to P2P once a room has been created.

  • M.

Yeah, but the meeting points ought to be decentralized, otherwise it would still be a single point of failure.

@Joel:
I have seen that a local server still connects to the central vassal server for stats reporting. Is that an issue for you or can I leave it as it is now? Otherwise, it works perfectly, except on the part that I have to kill the virtual machine to stop it :smiley:.

Thus spake Calsir:

One idea would be to use the central server as a meeting point and
hand off
the protocol to P2P once a room has been created.

Yeah, but the meeting points ought to be decentralized, otherwise it
would still be a single point of failure.

I’ve been looking around for an open-source P2P library—one which
handles NAT traversal and players joining or disconecting mid-session—
in any language, not just Java, to no avail. If you have suggestions,
I’d be grateful.

@Joel:
I have seen that a local server still connects to the central vassal
server for stats reporting. Is that an issue for you or can I leave it
as it is now? Otherwise, it works perfectly, except on the part that I
have to kill the virtual machine to stop it :smiley:.

For now, that’s ok.

Why do you have to kill the VM?!


J.

Thus spake Michael Kiefte:

One idea would be to use the central server as a meeting point and hand off
the protocol to P2P once a room has been created.

I have a burning desire not to write any P2P code ourselves, because I
think that (1) it’s hugely complex, (2) we don’t know how to do it
properly, and (3) if we spend enough time to learn how to do it
properly, we’ll have spent all that time producing a P2P library rather
than working on VASSAL.


J.

Because I am too lazy to look in the code for command line options to find one that properly exits the server :stuck_out_tongue:. I will look into it further.

Thus spake Calsir:

Why do you have to kill the VM?!

Because I am too lazy to look in the code for command line options to
find one that properly exits the server :stuck_out_tongue:. I will look into it further.

Oh, you’re talking about the server. Yeah, you just have to kill that.
I know of no way to shut it down cleanly.


J.

Bumped into this while looking for info on setting up a private instance of vassal: Not that this isn’t a bit of a necro at this point, but you could use hamachi and get around the NAT issue. It sets up a virtual lan so you and your friends all appear to be on the same subnet regardless of where you actually are. Up to 16 people is free I think, then you need to pay for a commercial license, but from the sounds of it that’d cover what you do.

Hi all,
just another Scenario where a local server would help a lot:
I’m playing with my colleagues behind a firewall that does not allow for ‘free’ internet by corporate policy.
Playing VASSAL during Lunch Break is violating this policy. Having a local server online would not… ;-)

What about just integrating the Server into the Client Software?
Three Options:

  • Starting/Connecting to a game on the central server
  • Starting/Connecting to a P2P game
  • Starting/Connecting to a local hosted game

With some command line options or preferences to define default behavior on startup…

Best Regards
Stephan

This is, I believe, how the ‘Direct peer-to-peer’ option in the ‘Server’ tab of the module preferences works. Unless you have a pretty funky network, you should be able to just specify each others’ private IPs in the ‘Invite’ dialog.

-Seth

Well, right p2p would be an idea as long as you think of a ‘conventional’ 2 player game.

The ‘Game’ I’m thinking of is more a perpetual available sandbox like thing, that anybody who likes to ‘Play’ is able to connect to, rather then a ususal vassal implementation of a board or card game for 2 or like players.
Technically speaking there will be a ‘hosting’ Computer running the server and module unattended and perpetually logged in to the server. Anybody who wants to join the ‘Game’, to play around with the ‘Stuff’ available and afterwards like to leave and rejoin at any point of time can do so on its own volition.
That is just resembling a player that opened a Modul Session on the public VASSAL Server free to join for everybody but beeing AFK all the time…

I tried P2P but it just to complicated to use…
Connecting to a open server would be way easier.

What kind of ‘Game’ Im thinking of can’t be revealed here because of IP resasons as of now.
Guess this kind of ‘Game’ module will put VASSAL to its mere limits but actually it looks like it provides everything required except a easy to set up ‘Local Server’ option.

brgds
Stephan

Say I want (or rather need) to setup my custom server. I know next to nothing about programming, but I already managed to hack Vassal a bit for my gaming group’s purposes via trial and error.

I have source files in front of me and I read here those include server code. I located server URL in VASSAL.chat.DynamicClient. And I’m stuck.

What general steps should I take from this point?

Am I right that it’s necesary to compile a separate application and run it before others will be able to connect with the modified client? Would it be possible to run it on the same machine as my own instance of Vassal and still play?

Thus spake Filip:

Say I want (or rather need) to setup my custom server. I know next to
nothing about programming, but I already managed to hack Vassal a bit
for my gaming group’s purposes via trial and error.

I have source files in front of me and I read here those include server
code. I located server URL in VASSAL.chat.DynamicClient. And I’m stuck.

What general steps should I take from this point?

You need to replace that URL with the URL from which you’re pulling
the server configuration information. Look at what’s at that URL to
see what you need in the file.

Am I right that it’s necesary to compile a separate application and run
it before others will be able to connect with the modified client?

Not sure what you’re asking here.

Would
it be possible to run it on the same machine as my own instance of
Vassal and still play?

Yes, you could run a game server on the same machine.


J.

I’m not sure if I understand how Vassal server works. I always imagined there’s some separate application running on the server. Is it just that file?

Would it be enough to change the URL to information stored in a text file on the same machine, then everybody edits their configuration files, changing nodeHost to the IP of whoever works as server?

Thus spake Filip:

I’m not sure if I understand how Vassal server works. I always imagined
there’s some separate application running on the server. Is it just that
file?

That file is what the client uses to determine where to connect. The
entry point for the server itself is in VASSAL.chat.node.Server.

Would it be enough to change the URL to information stored in a text
file on the same machine, then everybody edits their configuration
files, changing nodeHost to the IP of whoever works as server?

No, becuase the URL which points to that text file is unfortunately
hard-coded in the client. You also have to change the URL in the client,
which will require recompiling.


J.

Ok, I tried to test it. Here’s what I did today, step by step:

  • Opened my port.
  • Created getServerImpl file, setting nodeHost to my IP.
  • Uploaded the file to a free hosting site to test things out. It was then possible to directly view the config file from a browser (just like the one at www.vassalengine.org/util/getServerImpl).
  • Changed urls in VASSAL.chat.DynamicClient and VASSAL.chat.node.Server as appropriate.
  • Recompiled.
  • Run Vassal and tried connecting to a server.

Vassal hangs when trying to connect, without giving any errors.

Should it work? What am I doing wrong?