Fork me on GitHub
随笔 - 215  文章 - 13  trackbacks - 0
<2017年2月>
2930311234
567891011
12131415161718
19202122232425
2627281234
567891011


专注即时通讯及网游服务端编程
------------------------------------
Openresty 官方模块
Openresty 标准模块(Opm)
Openresty 三方模块
------------------------------------
本博收藏大部分文章为转载,并在文章开头给出了原文出处,如有再转,敬请保留相关信息,这是大家对原创作者劳动成果的自觉尊重!!如为您带来不便,请于本博下留言,谢谢配合。

常用链接

留言簿(1)

随笔分类

随笔档案

相册

Awesome

Blog

Book

GitHub

Link

搜索

  •  

积分与排名

  • 积分 - 210445
  • 排名 - 118

最新评论

阅读排行榜

Introduction 介绍

 
     Welcome to the Photon Server documentation. If you are looking for the Photon Cloud documentation, please go over here . —— Photon云文档
 
     The documentation is split into three topics: Getting Started, Tutorials, References. Just head over there using the links below and take a look. You will always have quick access to the topics via the navigation menu on the right.
     分为三部分:开始,教程,参考文献
 
 
     If you are completely new to the world of Photon scroll down to the comparison chart below. It will help you to understand the differences and what Photon product better suits your needs.
     下表是Photon产品比较,便于你选择更适合的产品
 
  • Photon Server vs. Photon Cloud    Photon服务器与Photon云
 
     Photon Server is a On Premise (OnPrem) server application that you can run and host on machines of your choice. Fully customizable and the authoritative control gives you the freedom to configure and set up your own infrastructure for multiplayer enabled applications.
     Photon服务器 是一个服务器应用程序,可以在你选择的机器上运行,并且完全是自定义和权威性的控制,你可以自由的配置和部署多人应用的基础设施。
 
     Photon Cloud is a Software as a Service (SaaS) and as such a fully managed service. You can completely concentrate on your application client while hosting, server operations and scaling is all taken care of in the Photon Cloud.
     Photon云 是一个软件即服务并且是完全的托管服务,你可完全关注于你的应用客户端,而处理服务器操作和应用扩展是由Photon云负责。
 
Photon Cloud 云 Photon Server 服务器
Server Administration. Zero server hassle anymore. Sit back and relax while our experts take care of running the servers. 服务器管理:由云负责,零麻烦。 You gain full authority of running Photon for your applications. You run your own servers or rent fitting ones and make sure they are available for your users. Photon's logs and performance counters provide all necessary information about low level performance and stability.
你可以在你的服务器上运行你的应用,以确保对于你的用户是可用的,Photon的日志和性能监视器提供了最低水平的性能与稳定性的信息。
Scalability. The Photon Cloud scales automatically to accommodate all your users. Using our SDKs your client application is built for an efficient load balancing workflow. 可扩展性:Photon云自动适应你所有的用户,使用我们的sdk客户端应用程序是建立了一个有效负载平衡的工作流。 Our load balancing power-up is available in source code. It is a solid foundation to scale across multiple servers. Running the right number of servers for your customers is your responsibility.
在源代码中我们的负载均衡是可用的,它是固有的功能可跨越多个服务器,为你的用户提供正确数量的服务器。
Licensing. Choose between various subscription models from indie development to enterprise solutions check out our different pricing models now . Why don't you just give it a try? Photon Cloud comes with a free Plan for up to 20 CCU per app . 许可:免费版有20个CCU Licenses are bought through the shop and provided as download. Cheaper licenses limit the number of concurrent users per server. Optionally, an Enterprise License is available for any number of servers upon request.
许可证是通过购买的,并提供下载,便宜的许可证是现在用户数量的,而企业许可证是可提供任意数量的许可。
Game logic. All custom logic takes place on the application client to allow a zero-hassle experience.
游戏逻辑:让所有在客户端应用上的通用逻辑有一个零麻烦的体验
The server's logic can be fully customized in C#. Several pre-defined applications are available as source and provide a high performance framework for your application. Benefit from our protocols and abstraction of low level functionality and add any feature you might be missing.
服务端的逻辑完全是可定制的C#代码,有几个内置应用可用于扩展,并且为你的应用提供了一个高性能的框架,得益于我们的协议和抽象的底层功能,并且可以添加任意的功能。
Start instantly. Photon Cloud lets you register and immediately run your application. No setup needed. No server needed. 立即开始:Photon Cloud 使你可以注册并运行你的应用,并且不需要配置和服务器设备。 Once downloaded, start in less than 5 minutes . Photon is easy to setup and runs locally as well as remote.
下载后,不到5分钟就可以开始了,Photon是简单部署就可以运行了。
 

Feature Overview 功能概述

 
     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是一个快速、简单、灵活、实时的Socket服务器和开发框架,客户端SDK可用于以下平台:

 

     The Photon high level architecture looks like this:
     Photon的高级架构体系:
 
 

     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
          Photon Core是用C++编写的,这是出于性能考虑
               它使用的是完成端口IOCP,用于高性能套接字的处理
               使用了更好的协议
               支持可靠的UDP,TCP和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)
          Photon Core 托管着运行业务逻辑的.NET CLR
               包括运行在Photon上所有的应用程序
               用C#编码

     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)
          我们提供了多种应用作为开始点
               Lite:简单又强大的房间游戏逻辑基础
               LiteLobby:大厅功能和房间逻辑
               Policy:为U3D,Flash,Silverlight提供的策略服务
               LoadBalancing:负载均衡的Lite扩展服务器
  • 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
          Photon Core支持以下协议
               可靠的UDP(基于eNet),专门针对Client-2-Server架构
               二进制TCP
               Web Sockets
  • Transfer protocol is very lean and slim
          传输协议很精简
  • Photon wraps up the networking layer of each client platform
          Photon包含了网络层的每个客户端平台
  • Communicate cross-platform and cross-protocol
          通信是跨平台和跨协议的
  • Put your data in hashtables and send it: forget about de-/serialization
          你的数据是放在hashtables中进行发送的,无需序列化和反序列化

     Server Dev Framework (C#) 服务器Dev框架

  • 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
          简单和灵活的映射调用RPC去操作实例
  • Messages passing through fibers solve many threading problems
          信息传递是通过线程池来解决多线程的一些问题
  • Designed to saturate bandwidth before the CPU becomes the bottleneck
          在CPU成为瓶颈之前设计成饱和带宽

     Server Development Tools 服务器开发工具

  • Fully running in Visual Studio » F5 » Debug right from your code!
          完全运行在VS上,F5可以进行调试
  • 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 )
          可使用的工具
               Microsoft:VS
               Redgate:内存分析、性能分析
               Jetbrains:ReSharper, dotTrace, dotCover, dotPeek 

     Data Persistence (DBs) 数据持久层

  • Photon does not provide an persistence layer
          Photon不提供数据持久层
  • .NET/Windows supports all major products
          .NET/Windows提供SQL和NoSQL
  • Usage of ORM (mapping) layers optional
          可使用ORM(对象关系映射)

     Vast Support of Client Platforms 支持的客户端平台

 

  • All client platforms interoprate (iOS vs Android vs PC)
          支持所有的客户端平台
  • Major client platforms supported 主要的客户端平台
    • Unity3d: Inlcuding Web/Standalone (Win, MAC, Linux), iOS, Android (see here )
    • MAC: iOS (iPad, iPhone), Mac OSX
    • Marmalade: iOS, Android, Bada, LG, BlackBerry (see here )
    • Flash & Air: Browser, Standalone, iOS, Android
    • Windows 8, Windows 7, Vista, XP, Windows Server: Native & .NET
    • Windows Phone 7+
    • HTML5: Javascript
    • Android: Java and native (NDK)
    • .NET
    • Mono(跨平台的.Net运行环境)

     Hosting 托管

  • Host Photon with any major provider
    • PaaS: Platform as a Service
    • IaaS: Infrastructure as a Service
          主要提供者
               平台即服务
               基础设施即服务
  • Selected providers 可选供应商
               微软Azure、Leaseweb、SoftLayer、Rackspace、Amazon EC2

     Support 支持


Requirements 需求

 
     For developing and setting up your own server the following additional software is needed:
     为了开发和配置你的服务器,以下软件是必需:
 

     Operating System to Run Photon Server 运行Photon服务器操作系统

  • Windows XP, Windows Vista, Windows 7 or Windows 8
  • recommended development OS(开发环境系统): Windows 7 x64
  • recommended production OS(生产环境系统): Windows Server 2008R2 x64

     .NET Framework & Visual Studio (VS) 开发环境

  • Microsoft .NET SDK 3.5 SP1 or .NET SDK 4.0
  • Microsoft VS 2008 or VS 2010
  • recommended: .NET SDK 4.0 & VS 2010

     Photon Uses the Following Ports for Communication 通信端口

  • UDP: 5055, 5056
  • TCP: 4520, 4530, 4531
  • TCP: 843 for Unity3D Webplayer and Flash Crossdomain requests
  • TCP: 943 for Silverlight Crossdomain requests

Starting Photon in 5 Minutes 五分钟内开始

 
     Photon is extremely easy to install and start. The SDK includes ready-to-use binaries which can be up and running within 5 minutes.
     Photon是非常容易安装和启动的,SDK中包含了可用的二进制文件,5分钟内即可启动运行

     Download 下载

     The Photon Server SDKs are available on our website: www.exitgames.com/Download/Photon

     Choose Fitting Binaries 选择装配的二进制文件

 
     Unzip the files anywhere on your machine. Locate the “deploy” folder and choose the fitting binaries for your system:
     解压在你机器的任何位置,找到deploy文件夹,选择适合你的二进制文件
  • bin_Win32: 32 bit Windows Vista and up
  • bin_Win32_xp: 32 bit Windows XP or 2003
  • bin_Win64: 64 bit Windows Vista and up
  • bin_Win64_xp: 64 bit Windows XP or 2003
 
     The deploy folder of the SDK contains everything you need to run Photon. Other content of the SDK includes documentation(/doc), libraries(/lib) and source(/src-server).
     deploy文件夹中包含运行Photon的所有东西,另外还有doc、lib、src-server
 

     Photon Control

 
     Run Photon using the PhotonControl.exe. This will create a tray bar-icon and -menu to manage Photon.
     使用PhotonControl.exe运行Photon,将创建一个托盘图标和菜单管理Photon
 
 
 
     Click the white/blue icon and select “Photon” -> “Start as Application” from the menu. Now you have started Photon!
     点击该托盘并选择“Photon”->“Start as Application”,现在你启动了Photon
 
     It might take several seconds until Photon is ready to use, depending on the applications it is running.
     只需几秒钟Photon就可以使用了
 
     When you don’t have a License File yet it will run with a 20 CCU limitation.
     当你没有许可文件时,也可以运行20个CCU
 

     Starting the Test Client 开始测试客户端

 
     The server SDK includes a test client to simulate multiple clients and to generate some load. You can start it from the Photon Control tray bar-menu: “Photon” -> “Run test client”.
     服务器SDK包含一个测试客户端,用于模拟多个客户端和产生一些负载,你可以选择“Photon” -> “Run test client”开始测试
 
     The test client is a simple console application which will simulate client sessions and games with a few players each.
     这客户端是一个简单的控制台程序用于模拟多个客户端的会话和游戏
 
 

   License 许可证

 
     The License needs to be placed in the same directory from where you start the Photon Control. Make sure that there is only one “.license” file in that directory.
     许可证需要放置在你启动Photon Control的目录中,确保有一个 “.license”文件在目录中

posted on 2015-11-25 11:22 思月行云 阅读(698) 评论(0)  编辑 收藏 引用 所属分类: Photon

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理