投票给出给定方案的最佳协议 [英] Vote for the best protocol for the given scenario

查看:99
本文介绍了投票给出给定方案的最佳协议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个设计决定。我需要你的建议。

I have a design decision to make. I need your advice.

要求:


  • 服务器和客户端。客户端通常是手机。

  • 通过互联网连接。

  • 服务器和客户端希望彼此通话。

  • 在客户端和服务器之间交换文本,多媒体。

  • 文本将是一些标准格式。这是预先确定的。

  • 实时要求

  • 会话通常持续5-15分钟。在某些情况下,不到一分钟。假设会话持续时间为5分钟。

  • 协议应符合标准。

  • 必须高效。

  • A server and a client. client is typically a mobile phone.
  • Connected through the Internet.
  • Server and client want to talk to each other.
  • Exchange of text, multimedia between the client and the server.
  • Text would be some standard format. that is predecided.
  • Real time requirements
  • Session would typically last for 5-15 minutes. In some cases for under a minute. assume 5 minutes as the session duration.
  • The protocol should adhere to standards.
  • It must be efficient.

选项1
我为我的应用程序设计的二进制协议。

Option 1 A binary protocol that I design for my application.

选项2
将我的服务器实现为HTTPServlet。客户端发送post请求,post消息中的查询和servlet在消息中发送响应。
但是,我认为对于实时交互,这不是一个好的选择,因为即使对于同一个客户端和会话,也会为每个帖子请求创建一个新线程。请评论此效率。

Option 2 Implement my server as an HTTPServlet. Client sends post requests and the query in the post message and servlet sends response in the message. However, I think that for real time interaction, this is not a good option as a new thread would be created for each post request even for the same client and session. Please comment on the efficiency of this.

选项3
使用普通的servlet。
将遇到与上述相同的问题。

Option 3 Use a normal servlet. Would face the same problem as above.

选项4
使用 SOAP

选项5
使用 REST

选项6
使用 Google Wave (我尚未阅读规范)

Option 6 Use Google Wave (I haven't read the specification yet)

选项7
建议其他协议

Option 7 Suggest some other protocol

现在,我不知道有网络服务经验,但如果它是 选项,那么我不介意投入时间。

Right now, I don't have experience with web services, but if it is the option then I don't mind investing time in it.

基本上,我希望选项1的速度和效率采用标准的做法。

谢谢

推荐答案

听起来我觉得HTTP协议最适合你。它的开销很低,已被广泛接受。使用TCP [这是移动通信的要求],它具有会话协商[连接良好而不是会话的实际状态]

Sounds like to me that you would be best served by the HTTP protocol. It has a low overhead, already well accepted. Uses TCP [which is a requirement for mobile communication], it has session negotiation [well connection wise not the actual state of the session]

使用不同的协议进行共享视频和音频,但设置与http连接。

Use a different protocol for sharing of video and audio, but set the connection up with the http one.

由于需要处理,使用SOAP / Web服务并不是最佳选择。从个人经验来看,移动机器上的Web服务客户端更容易,但所需的处理过程非常流行,可能会在您的应用程序中造成瓶颈。 [移动机器不能很好地处理线程]

Using SOAP/web services would not be optimal, due to the processing required. From personal experince webservice clients on mobile machines is easier but the processing required is tremedious and can create a bottleneck in your application. [Mobile machines don't handle threads too well]

另外:由于您通过无线方式发送数据,因此您还必须考虑与非制导媒体有关的其他问题。

Also: Since you are sending data over wireless you also have to account for the additional issues dealing with unguided media.


  • 服务器和客户端。客户端通常是手机。 :是的

  • 通过互联网连接。 :是的,取决于设备网络的设置方式。

  • 服务器和客户端希望相互通信。 :是的

  • 在客户端和服务器之间交换文本,多媒体。 :HTTP适用于文本和图像,但您需要切换到像UDP一样不可靠的视频。

  • 文本将是一些标准格式。这是预先确定的。 :是的

  • 实时要求:这是不可能的,但可以尝试。

  • 会话通常持续5-15分钟。在某些情况下,不到一分钟。假设会话持续时间为5分钟:有会话打开的标题

  • 协议应符合标准。 :RFC Something

  • 它必须高效。 :你要做的唯一处理是逐行解析Key:data。

  • A server and a client. client is typically a mobile phone. : Yep
  • Connected through the Internet. : Yep, depends on how your device network is setup
  • Server and client want to talk to each other. : Yep
  • Exchange of text, multimedia between the client and the server. : HTTP works well with text and images, but you need to switch to something unreliable like UDP for video.
  • Text would be some standard format. that is predecided. : Yep
  • Real time requirements : This is impossible, but can be attempted.
  • Session would typically last for 5-15 minutes. In some cases for under a minute. assume 5 minutes as the session duration.: There are headers to keep the session open
  • The protocol should adhere to standards. : RFC Something
  • It must be efficient. : The only processing you have to do is line by line parsing of Key: data.

另外,我忘了提及SOAP / Webservices是基于HTTP的XML。

Also, I forgot to mention SOAP/Webservices is XML over HTTP.

这篇关于投票给出给定方案的最佳协议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆