Developing for Photon Server on OSX/Linux

Hi guys, I know there have been topics in the past related to this, but I haven't found quite the answer I was looking for, so please bear with me!

I'm currently evaluating a few software backend options for a project (installed software, not BaaS), and Photon Server seems like a really strong contender. I noticed that it's mainly geared towards Windows development, which is unfortunate because our studio is like 90% Macs at the moment.

I was wondering whether people have had success developing their backend code in a non-Windows environment. For example, does the Photon server still work if we use Mono instead of .NET? Are there any big functional or workflow issues with using Xamarin or MonoDevelop instead of Visual Studio?

I should note that we DO intend to ultimately deploy and run our Photon server on Windows Server machines. I'm mainly wondering about day-to-day development on Macs instead of Windows machines. If a developer is writing server code on a Mac, would it be reasonably straightforward to use Xamarin/MonoDevelop for writing code, and then run a local test instance of the server via Mono or similar? Or do we need to set up bootcamp and work in Windows during development?

Comments

  • Hopefully you'll get a more detailed answer from the developers themselves, however, to give you some insight in the mean-time.

    Development on a Mac is entirely possible, using the Photon Server Mac OS SDK, you can find this here: https://doc.photonengine.com/en/onpremise/current/sdks-and-api/sdk-macosx. Note however that there is no "client SDK" for Mac. This shouldn't pose too much of a problem however, as you should be constructing your own client SDK based on the functionality of your server. If however you require a client SDK, then Photon Server + Mac may not be an option.

    MonoDevelop should definitely be your IDE of choice. It should allow you to use the same project source files on both Mac and Windows. It handles the build process differently. For example, running a "build" on your project in windows will generate .dll files, while in Mac it will generate the Mac equivalent of .dll files.

    It may be a little tricky to transition between the two, but certainly not impossible nor something that should hold you up. Personally though, I would recommend that you develop and test on the OS that you plan to deploy on, mostly for good practice but also because:
    - photon is geared towards windows
    - generally, servers running on windows perform better
    - you may find that your benchmark testing on Mac produces different results on Windows (which may add more time to your project after the transition, if you are concerned about the performance of your server/client)

    Ultimately though, provided that you don't required a pre-built client SDK, what you are looking to do should be entirely possible.
  • Hi kromenak, hi donnysobonny.

    Actually it is the other way round:
    The SDK for OSX is a Client SDK, while their is no Server SDK for OS X.

    The server side of Photon runs exclusively on Windows.

    We have done some experiments in the past with porting the Photon server to Linux and from their it would not have been too far to OS X anymore, as OS X bases on Unix, but we decided against it as optimizing it to a level that would give a performance that would at least be even remotely comparable to the Photon Windows server would have been a real lot of work.
    We prefer to rather concentrate the developer manpower that would be needed for supporting other server OS on improving the Windows version even further.

    So in your scenario I would recommend to develop the server side on Windows machines and the Client side on OS X machines.
  • Apologies for the miss-information! I realize now that it is in fact a client SDK, which would render my advice entirely null and void! I would recommend Kaiserludi's advice above, and build your server-side on windows, and optionally stick to Mac for the client-side. If you build the client-side entirely on your own, you should be fine to port that from Mac to Windows (MonoDevelop will handle that for you). This might unfortunately set you back however, as you will almost certainly need to construct your server-side before you can make a start on the client-side.

    As a side note, there is also uLink. Although (in my oppinion), it is nowhere near as flexible as Photon, it does have cross-platform capabilities due to the fact that the server-side is also created within a Unity instance (assuming you are in fact using Unity).
  • There is no server SDK for MAC or Linux now. I searched 1 topic talk about Linux Server SDK but Photon Core Team Dev not have any plant for it right now
  • Ok, great, thanks for the info! Perhaps we can do bootcamp, or maybe get something working with VirtualBox. I noticed that one of the tutorial videos for Photon was using VirtualBox to run a server instance on a Mac machine ;).

    But it also sounds like it might not be a problem to write the server code on a Mac (inside MonoDevelop) and then push that updated code to a Windows machine or virtual machine to actually run within the Photon Server framework. I'll investigate a bit more today.
  • It would be entirely possible to create your own server solution on a Mac from scratch, but the point here is that if you want to use Photon for your server solution, you are likely going to need some sort of a work-around like as you've said, a virtual box. Again, personally I would recommend against situations like this, as you are likely to find a tool more suited to your requirements, resulting in far less hassle for you and your team.

    Note that the main things that you need from the Server SDKs are the .dll files, in order for you to be able to make use of Photon and it's functionality within your project in MonoDevelop. This is the main reason why it is an issue for you. The photon control center is also very useful, although it is not essential.
  • this may be an old post, but it still shows up on a google search so wanted to add my 2 cents about what works for me for any future surfers who may stumble across this. If your using Photon in house server, the code you write is a c# dll. C# wether done in xamarin, MonoDevelo, Rider, or the new Visual Studio for Mac is compiled to a .net dll either way the same on all 4 whether built on Mac or Windows. I have found that running a windows 2008/2016 server on the same lan then using a network share to share the deploy folder from windows to the Mac and have the Mac dev software of choice dump the built files to said folder works like a charm. The windows photon will see the file changes and reload the server/servers without a hitch (providing theres no serious errors). I myself much prefer Rider because they have both Mac and windows versions and they are exactly the same (and include reshaper features built in).

    anyhow hope this helps anyone who stumbles across this today.
Sign In or Register to comment.