QuickServer的学习研究(八)

   在QuickServer针对通讯的方式的不同可以采用很多形式,但是必须考虑各种交互方式的不同和优缺点:

QuickServer划分其对八类主要开发应用程序逻辑,
      服务端和客户端的交互的各种方式如下:

  • ClientEventHandler [Optional Class] ClientEventHandler [可选类]
    Handles client events.处理客户端事件。
  • ClientCommandHandler [#] ClientCommandHandler [#]
    Handles client interaction - Character/String commands.处理客户端的双向互动 - 字符/字符串命令。
  • ClientBinaryHandler [#] ClientBinaryHandler [#]
    Handles client interaction - Binary data.处理客户端的互动 - 二进制数据。
  • ClientObjectHandler [#] ClientObjectHandler [#]
    Handles client interaction - Java Object commands.处理客户端的双向互动 - Java对象的命令。
  • ClientWriteHandler [Optional Class] ClientWriteHandler [可选类]
    Handles client write operation - Non-Blocking Mode.处理客户端写操作 - 非阻塞模式。
  • ClientAuthenticationHandler [Optional Class] ClientAuthenticationHandler [可选类]
    Used to Authenticate a client.用于验证客户端。
  • ClientData [Optional Class] ClientData [可选类]
    Client data carrier (support class)客户数据载体(支持类)
  • ClientExtendedEventHandler [Optional Class] ClientExtendedEventHandler [可选类]
    Handles extended client events.把手扩展客户端事件。

[#] = Any one of these have to be set based on default DataMode for input.

 [#] =其中任何一个都必须设置默认输入DataMode基础上的。

The default DataMode for input is String so if not changes you will have to set ClientCommandHandler.

 对于输入的默认DataMode是String,所以如果不改变你将需要设置ClientCommandHandler。

 

 

 

如果服务端和客户端采用java方式那么采用ClientObjectHandler比较好。

采用非相同的语言那么最好采用ClientCommandHandler或者ClientBinaryHandler对象实现两种的交互比较好。

 

 

Mina和QuickServer的优缺点:看来自TrusinLee的评论:

Thank for the information about another network application framework.  I found a few differences:

Ø         QuickServer supports blocking mode.  (MINA supports only non-blocking mode, but you can make your operation block at your will.)

Ø         QuickServer provides GUI-based admin.  (MINA doesn't have one yet, but will have full JMX support soon, which is a standard.)

Ø         QuickServer uses java.util.logging.  (MINA uses SLF4J, which is a safe replacement of commons-logging.)

Ø         QuickServer uses its own XML settings.  (MINA provides Spring framework integration instead.)

Ø         QuickServer can specify maximum number of clients allowed.  (MINA can do this using a filter, but not implemented by default.  Of course, this will be implemented as an overload prevention filter.)

Ø         QuickServer team has one crew.  (MINA has three crews.)

Ø         QuickServer project started in 2003.  (MINA started in 2005.)

Ø         QuickServer has a difference event handler interface from MINA.  (You'll have to compare it by yourself.  IMHO, MINA has one simple enough handler which covers all QuickServer provides.)

Ø         QuickServer doesn't support UDP at all.  (MINA does)

Ø         QuickServer doesn't support client-side API at all.  (MINA does)

Ø         QuickServer integrated authentication and text protocol in its core.  (MINA didn't and they are considered as a cross-cutting concern that a filter should take care of.  IMHO, MINA is more extensible here.)

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值