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:

The Photon high level architecture looks like this:

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
- 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)
- Photon does not provide an persistence layer
- .NET/Windows supports all major products
- Usage of ORM (mapping) layers optional

- All client platforms interoprate (iOS vs Android vs PC)
- Major client platforms supported
- Android: Java
- Android: Native (NDK)
- Blackberry: Native (NDK)
- Corona
- .NET
- Flash & Air: Browser, Standalone, iOS, Android
- HTML5: Javascript, Typescript (ECMA Script 6)
- iOS
- Mac OSX
- Marmalade: iOS, Android, Bada, LG, BlackBerry
- Mono
- Playstation
- PSMobile
- Silverlight
- Unity3d: Including Web/Standalone (Win, MAC, Linux), iOS, Android
- Windows 8 RT
- Win32
- Windows Phone 8
- Xamarin
Hosting
- Host Photon with any major provider
- PaaS: Platform as a Service
- IaaS: Infrastructure as a Service
- Selected providers
Support
Report an issue in the Forum ...
Back to Top