Realtime C++ Source Code

I just downloaded the c++ SDK, and noticed that there is source code provided for libLoadBalancing, but not for libCommon or libPhoton. I know it comes with compiled libraries, but it would be nice to compile from scratch in order to use our own flags, etc.

Just wondering -- why provide the source code for load balancing but not the rest?

Comments

  • Hi @kitofans.

    The LoadBalancing lib is a more high level layer that sits on top of the more low level Common and Photon lib.

    On the server side we have the Photon core functionality, which is a fully functional socket server on its own and on top of that users of the Photon server SDK can add their own functionality as so called 'applications'. LoadBalancing is provided by us as such an application and provides functionality like scaling, lobbies, game rooms, etc. When one wants to write ones own application, it often makes sense to write it as an enhancement to the LoadBalancing application and not totally from scratch, so that one can continue to use the functionality that LoadBalancing already provides and doesn't have to rewrite it oneself.

    The Common lib handles not directly networking related functionality like data containers, serialization, etc.
    The Photon lib is the client-side equivalent to communicate with a raw photon server without any applications running on it, while the LoadBalancing lib is the client side interface to communicate with the LoadBalancing application.
    On Photon Cloud runs the latest stable state of development of LoadBalancing, so an unmodified out of the box LoadBalancing client is what one uses to communicate with Photon Cloud.
    However with Photon server users may customize the server side LoadBalancing layer by applying major modifications and enhancements. Depending on the nature of those modifications they might also need to modify the Client side LoadBalancing lib accordingly.
    Also with photon server people might write their own applications from scratch and in that case studying the LoadBalancing source code might help to get a grasp on how to do this, both, on the server, as well as on the client side.

    For these reasons we decided that it makes sense to provide the source code for LoadBalancing with the SDKs. The same also applies for the Chat lib by the way.

    The major reason against also providing the source code for the Common and the Photon lib with the Client SDK is that the source of those libraries contains code that is under non-disclosure agreements with 3rd parties. We are simply not legally allowed to share that part of the code base with the wide public.


    but it would be nice to compile from scratch in order to use our own flags, etc.

    If you have a critical requirement for certain compilation flags (for example for compatibility with 3rd party libraries), please simply let us know and if it makes sense we might add prebuilt library binaries that have been built with those flags, to the SDK.