Self hosted server backwards compatibility

Options
nosleepdemon
edited January 2012 in Photon Server
Hi folks,

My company is running photon server version 2 for several existing projects and begun doing so before I arrived. Their existing projects are basic in functionality, and the old network programmer built a server connection class that handled all communication between the server and the program instead of using RPCs. Our new project is heavily physics based so I'd like to use RPCs and PhotonViews to keep things tidy and in sync instead of writing a wacky interface that poorly replicates what Photon already does, but we don't have documentation for the older Photon Network Unity API. Unfortunately the latest version of Photon Network Unity doesn't seem to connect with photon server version 2 (no connection error, it seems to become stuck in the 'initializingApplication' state), and upgrading the server to version 3 appeared to break functionality with the older projects (we started getting crossdomain policy errors, despite having a crossdomain policy file present on the server and accessible in a browser through [url=http://]http://[/url]<ipaddress>/crossdomain.xml). So I have a few questions:

1) Are applications built with older versions of Photon Network Unity actually compatible with Photon Server version 3?
2) Is the latest version of Photon Network Unity actually able to connect to Photon Server version 2?
3) At what point were RPCs added to Photon Network Unity - it's possible our old network programmer simply didn't know they existed. Using an old version of the server would be a last resort though, i'd really like to just upgrade to the newest version as painlessly as possible.

Cheers!

Comments

  • Kaiserludi
    Options
    ll versions of the Photon Unity Networking plugin are only compatible to Photon 3 servers. This Client has never been compatible to any Photon 2 server as it relies heavily on server features, that have been introduced with Photon 3. If your older Unity projects use a Photon 2 server, then the clients can't be PUN-clients, but have to use normal Unity Client SDKs. The normal Unity clients SDKs version 6.x (old 3-number client versioning) are compatible to Photon 2 servers only, while the version 3.x clients (new 4-number client versioning) are compatible to Photon 3 servers only.
    For new games I would strongly recommend to use a Photon 3 server, as although we still give support for Photon 2, this is mainly because of exisiting projects still using it. The server licenses are still per application, even if several games use the same server isntance so if your user numbers are high enough that the free license is not enough, then you have to use a separate payed license for each game, which on its own needs more concurrent users, than the free license offers. Buyying a Photon 2 license for new games, only to have to upgrade them later, if you want to switch to Photon 3, although Photon 3 ist already out, doen't seem economic to me.
    I think, the best option for you, If you don't want to upgrade your old games to Photon3 and also don't want to run a second server hardware, would really be to let a Photon 2 and a Photon 3 server run on your server hardware (although this means a bit of extra setup work in terms of changing the ports for one of them to differ from the ones, the other isntance is using, etc.).
  • Thanks for the timely reply, that's a good point about the licenses and a good suggestion about how we should proceed. I think we'll run the servers side by side and have the new server on a non-default port that all of our projects will use going forward. Cheers!
  • Kaiserludi, we tried starting Photon server 3, but it wouldn't start because version 2 was already running. The same happened when we had version 3 running and tried to start version 2. Is there a way around this?
  • There could be different reasons for startup failures...

    If you run it as a service (which I would recommend), make sure to install it with a different name, and edit the varius .cmd files in your deploy folder to start / stop the appropriate service (in case you want to use them) Unfortunately, the Photon Control can not be started twice, , so you need to control your second installation "manually" with the scripts.

    Beyond that, make sure that you don't use the same ports by both Photon instances:
    - Modify your PhotonServer.config and either bind each Photon to it's own IP, or use unique ports (in ALL listeneres: don't forget the TcpPolicyListeners which use port 943 / 843; you can uncomment them if you handle crossdomain files yourself, like you said earlier).

    If that doesn't help, please let us know at which step exactly it does not work (including any error messages from log files etc.), so that we can better see what the problem is. Good luck!
  • Thanks kindly, we'll get right on it and let you know.