What’s in Photon 3 Photon3是什么

1. High Performance S2S API (Native/C++) 高品质的S2S API

     A while back we introduced the TCPClient a managed class better
suited for server to server communication than the standard client
library. The TCPClient had two disadvantages: First the programming
model on both ends of the connection was different (TCPClient on one
side, peer on the other), second it was designed for low-bandwidth
communication. With this release Photon can setup a connection to other
Photon instances leveraging the networking power of the Photon Core
while allowing to use the same programming model using peers on both
ends of the connection.

   
 不久前大家介绍了托管类TCPClient比标准客户端类库更契合于服务器到服务器的通讯。那一个TCPClient有三个毛病:第1,编程模型连接的双面都以见仁见智的(TCPClient在一侧,peer在另一侧),第贰,是专为低带宽通讯。那么些版本的Photon可以安装3个连接其余Photon实例,利用Photon
Core,同时允许peer在接二连三的双方使用相似的编程模型。

 

2. Load Balancing 负载均衡

     

     With Photon Load Balancing, developers are enabled to create
scalable multi-node solutions. It includes out of the box a master
server hosting the lobby and game servers to host the active games. The
Lite Lobby Application is delivered with a set of matchmaking methods
and a load balancing component that distributes the load (where to
create new games).

   
 Photon负载均衡,开发人士可以成立可扩充的多节点的化解方案。它包涵了贰个主服务来托管大厅和三个游戏服务来托管游戏。这些Lite Lobby应用程序是经过设置配对方法和行使负载均衡组件分配负载来拓展付出工作的。

 

3. Event Caching 事件缓存

     So far, Lite had “Properties” for rooms and actors to store values
for players who join later on. They are a nice idea but a bit clumsy to
use: Whenever something has to be stored, you had to set properties. In
all other cases, you send events.The new Lite Application combines both
and gives you caching for events. Per player and event, you could cache
the values in it. If anyone joins, the events are sent immediately, like
they were just raised.

   
 到近来甘休,Lite用房间和玩家的性质为这个参预游戏之后的玩家来囤积值。那是1个好主意,然而采纳起来有个别鲁钝:无论如何事物被储存,您必须设置属性。在任何景况下,您发送事件。新的Lite应用程序结合了授予你的高速缓存事件。各种玩家和事件,您都得以缓存值在那个中。假使某人参加,立刻发送事件,他们唯有会被触发。

 

4. Extended Data Type Support 支撑数据类型的恢宏

     Photon now supports more data-types than ever: Null values,
dictionaries, arrays of objects (each with its own type) and even custom
classes can be integrated and used in events.

   
 Photon未来比在此之前其他时候都越来越支持数据类型,例如:Null值、字典、数组对象(每一种都有其自身的序列)和自定义被购并并用于事件里的类。

 

5. The Peer has new properties Peer的新属性

     NetworkProtocol, LocalIP, LocalPort.

 

6. Up to now you configured a global default
application
 为您布署壹个大局的专擅认同应用程序

     Now it is also possible to define a default application per
listener.

     将来还足以定义一个暗中认同的应用程序监听器。

Changed 改变

1. Lite and Lite Lobby Code-Cleanup Lite和Lite Lobby代码清理

     Event-, Operation- and Parameter-Codes are cleaned up. Everything
was reassigned and the predefined codes should be out of your way now.
There is an extra page which lists each old and new value.

     事件、操作和参数编码被清理彻底。
以后是漫天重新分配和预约义的代码应该出现了。有2个极度的页面,其中列出了种种旧的和新的值。 
   

 

2. Type of Codes 代码的品类

     We decided to keep using bytes as type for codes. It’s just
effective and lean. If needed, any operation or event could get
sub-codes (not supported out of the box).The ReturnCode for
operation responses was of type int. This is now short-typed. Not
extremely lean. But short.

   
 大家决定继续使用bytes作为代码的花色。那是一蹴而就的和精益的。要是急需,可以获取任何操作或事件的子码。这些ReturnCode对于操作响应是int类型的。那是短类型。不是尤其简单,可是短。

 

3. Protocol Cleanup 协议清理 

     We cleaned up the protocol for Photon 3. This is next to invisible
for you, but has some benefits. Most of all, the new protocol does no
longer hard-code any codes. Any code for operations, results, parameters
or events can be defined by your code.

     大家为Photon3清理了协和。那对于你来说大概是看不见的,但有一些利益。最要害的是用新的商谈来做,不再要求硬编码任何代码。任何代码的操作、结果、
参数或事件可以依照你的代码来定义。

 

4. Error Handling 错误处理

     The error handling was re-designed to

     错误处理是被再次设计为

  • always call the unhandled exception event handler
  • it is no longer required to initialize the logging facade
  • introduced three policies for unhandled exceptions: ignore, restart
    application, end process
  • consistent behavior: before unhandled exceptions in threads
    controlled by Photon where logged and then ignored, those in other
    threads usually terminated the process. 

  • 连接调用未处理的不胜事件处理
  • 不再需求先河化 logging facade
  • 对此未处理的这几个有以下多个政策:忽略、 重启应用程序、终止进程
  • 同一的行事:在线程通过Photon登录和忽略来支配未处理的很是此前,其余线程寻常会甘休那个历程。

     Note: due to a bug in 2.6 sometimes exceptions where “transformed”
into ThreadAbortException or the application was unloaded without
being loaded again (this is also fixed with 2.6.28).

     注意:由于3个谬误(在2.6)有时有分裂,“transformed”到
ThreadAbortException
或应用程序被卸载不会再也被加载(那也是定位与2.6.28)。

5. Server SDK Changes (breaking) 服务器SDK改变(破坏)

  • Peer classes are now required to inherit from class ‘PeerBase’. The
    former interface IPeer and class PhotonPeer were removed. Take a
    thorough look at the PeerBase class definition as it is a central
    piece of your application.
  • Applications are now required to inherit from class
    ‘ApplicationBase’. Like PeerBase this is one of the most important
    classes.
  • Classes ResponseParameterAttributeRequestParameterAttribute and EventParameterAttribute have
    been substituted with class DataMemberAttribute. As a
    consequence, request and response parameters can not be part of the
    same container class anymore.
  • The Params property of
    classes EventDataOperationRequest and OperatioResponse has
    been substituted wth the new property Parameters. This
    dictionary’s keys are now of type byte.
  • The property EventData.EventCode has been renamed
    to ‘Code’ and its type was changed to byte.
  • The type of the
    properties OperationRequest.OperationCode and OperationResponse.OperationCode has
    been changed to byte.
  • The new class DataContract substitutes
    classes Operation and Event. While class Operation remains
    part of the framework it is not mandatory to use it in order to
    convert the parameters to class properties anymore.
  • Methods Event.GetEventData and Operation.GetOperationResponse have
    been removed. Instead use the
    new OperationResponse and EventData constructors.
  • PhotonPeer.SendBufferFull was removed.
    Override PeerBase.OnSendBufferFull to respond to a full send
    buffer. The counterpart PeerBase.OnSendBufferEmpty is called
    when Photon is ready to send more data.

  • Peer类以往必要继承类自PeerBase。接口IPeer和类PhotonPeer
    IPeer被移除。把1个整机的PeerBase类的概念作为你应用程序的主干部分。
  • 应用程序以后必须继续自类
    ApplicationBase。像PeerBase那是里面2个最要害的类。
  • 类 ResponseParameterAttribute 、 RequestParameterAttribute 和
    伊夫ntParameterAttribute 被类DataMemberAttribute
    代替。由此,请求和响应的参数不能属于同3个器皿类了。
  • 类 伊夫ntData , OperationRequest 和 OperatioResponse
    的习性参数被新的性情参数代替。这本字典的键的种类是byte。
  • 属性伊芙ntData.伊芙ntCode 已经更名为 “Code” 和它的项目改为byte。
  • OperationRequest.OperationCode 和 OperationResponse.OperationCode
    属性的档次已经改为了byte。
  • 本条新类DataContract
    替代了类 Operation 和 Event。尽管类的操作是framework的一有的,为了转移参数为类的属性它是不强制被应用的。
  • 措施 伊夫nt.Get伊夫ntData 和 Operation.GetOperationResponse
    已被移除。而使用新的 OperationResponse 和 伊夫ntData 构造函数。
  • PhotonPeer.SendBufferFull 已被移除。覆盖 PeerBase.OnSendBufferFull
    来响应一个总体的发送缓冲区。当Photon是准备好并发送更加多的数目时这几个PeerBase.OnSendBufferEmpty 会被调用。

6. Client SDK Changes (breaking) 客户端SDK改变(破坏)

  • renamed IPhotonListener interface
    member OperationResult to OnOperationResponseEventAcion to OnEvent and PeerStatusCallback to OnStatusChanged.
  • The different parameters of the
    old OperationResult (OperationCodeParameters, …) are
    passed in one object OperationResponse. Same applies
    to OnEvent now has one parameter EventData.
  • Support for invocation ID was removed.

  • 更名IPhotonListener接口成员 OperationResult 为 OnOperationResponse
    、 EventAcion 为 On伊芙nt 和 PeerStatusCallback 为 OnStatusChanged 。
  • 旧的 OperationResult ( OperationCode , 参数
    ,…)的不等参数被传送在1个 OperationResponse 对象里。同样适用于
    On伊夫nt 有二个参数 伊夫ntData。
  • 帮忙调用ID已被移除。
  1. PhotonHostRuntime version attribute was removed from the config file
    and is no longer required – we recommend to remove it to ease
    feature updates.
  2. The application NetSyncObjects is no longer part of the SDK.
  3. Changed default for dump files from mini to full
  4. Added version display to log file during start up.

  1. PhotonHostRuntime
    version属性已从布置文件中移除,和不再是不可或缺的,大家提出删除它以便于成效更新。
  2. 应用程序NetSyncObjects不再是SDK的一有个别。
  3. 更改转储文件的暗许选项从迷你到全方位。
  4. 加上版本显得到日志文件在起步的时候。

Bug Fixes Bug修复

  1. Fixed a memory leak when canceling actions scheduled on a fiber.
  2. S2S.TCPClient did not close the socket at disconnect which caused an
    error when calling Connect again.
  3. Flash policy file is claimed malformed with a top-level XML tag that
    is not, see
    http://www.adobe.com/devnet/flashplayer/articles/fplayer9\_security.html\#\_Malformed\_Policy\_Files
  4. Fixed CLR startup to ensure GC Server is used (issue affected .net
    4.0 only).
  5. Fixed ENet fragmented buffering flow control bug.
  6. Fixed TCP magic byte issues – fragmented pings where not parsed
    correctly and an issue in the internal handling of the size of
    packets could lead to parsing errors (bigger packets and high load).
  7. Fixed Photon hang on shutdown trying to log on a dead logging
    instance.
  8. Fixed the method Peer GetRemoteAddress – due to a caching issue
    the result was wrong in some cases.
  9. Fixed mini dumps – now obey configured limits.
  10. Changed PhotonPeer::GetRemotePort so that it doesn’t rely on a
    cached port.

  1. 改正了当裁撤线程池的移动时内存的透漏。
  2. S2S。
    在断开的时候TCPClient没有关闭套接字,然后重新连接造成的二个破绽百出。
  3. Flash策略文件被声称为非符合规律的万丈阶段的XML标记,其实它不是,看到
    http://www.adobe.com/devnet/flashplayer/articles/fplayer9\_security.html
    #非不奇怪的国策文件
  4. 考订了CL奥迪Q3运维时以担保GC服务器是可用的。
  5. 查对了eNet分散缓冲流控制的错误。
  6. 改正了TCP魔法字节问题——不正确的解析ping
    和五个内部处理的标题,数据包的高低只怕造成解析错误(更大的数据包和高负荷)。
  7. 核对了Photon在关机时试图在三个关门的日志实例进行记录。
  8. 矫正了法子peer GetRemoteAddress
    ——由于缓存难点,在好几情状下结果错了。
  9. 核对迷你转储——以后听从布署的限量。
  10. 修改了 PhotonPeer::GetRemotePort ,因而,它不借助于1个缓存的端口。

相关文章

网站地图xml地图