Understanding Photon Server

Photon is a real-time socket server and development framework that is fast, simple to use and flexible. Client SDKs are available for all major platforms:

Photon Server Platforms

The Photon high level architecture looks like this:

Photon Server: Architecture

Basic Architecture

  • The Photon Core is written in native C++ for performance reasons
    • It uses IO Completions Ports (IOCP) for high performance socket handling
    • Implements the heavy “lifting” of the protocols (e.g. reliable UDP)
    • Support relaible UDP, TCP and Web Sockets
  • The Core hosts a .NET CLR which runs the business logic in C#
    • Contains the applications running on Photon
    • Written in C# (or any other .NET language)

Server Applications (C#)

  • We provide several applications as starting point provided in source C# code
    • Lite: Simple and powerful room based game logic
    • LiteLobby: Lobby functionality and room logic
    • Policy: Policy server for Unity3d, Flash and Silverlight
    • LoadBalancing: Load balanced lite scaling across servers (this is powering our Photon Cloud)
  • The apps are tuned for performance and can be used out of the box or extended
  • Convenient xcopy deploy (automatic or manual restart)

Protocols

  • Photon Core supports the follwoing protocols
    • reliable UDP (based on eNET) and specially tuned for Client-2-Server architectures
    • Binary TCP
    • Web Sockets
  • Transfer protocol is very lean and slim
  • Photon wraps up the networking layer of each client platform
  • Communicate cross-platform and cross-protocol
  • Put your data in hashtables and send it: forget about de-/serialization

Server Dev Framework (C#)

  • All apps sit on top of a development framework that solves common tasks for you
  • Simple and flexible mapping of RPC calls to operation instances
  • Messages passing through fibers solve many threading problems
  • Designed to saturate bandwidth before the CPU becomes the bottleneck

Server Development Tools

  • Fully running in Visual Studio » F5 » Debug right from your code!
  • Use all the first class tools from .NET Development
    • Microsoft: Visual Studio
    • Redgate: Memory Profiler, Performance Profiler, Reflector (see here)
    • Jetbrains: ReSharper, dotTrace, dotCover, dotPeek (see here)

Data Persistence (DBs)

Vast Support of Client Platforms

Photon Server: Platforms

Hosting

Support

Report an issue in the Forum ... Back to Top