设计用于流量压缩的移动Web服务器和客户端 [英] Designing a mobile web server and client for traffic compression

查看:340
本文介绍了设计用于流量压缩的移动Web服务器和客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对如何最好地解决这个问题感到困惑。



事情:我创建了一个j2me移动应用程序将通过HTTP将压缩数据发送到Web服务器,然后Web服务器将解压缩请求,获取数据,压缩并发送回客户端。



一个类似的解决方案这是: T-Booster



问题:我对如何从客户端应用程序发送压缩的http请求,为服务器使用什么技术以及如何最好地实施它而感到困惑。
假设服务器一次处理数千个请求,对整个应用程序有什么影响?



评论非常感谢。
感谢。

解决方案

方法I :顶部标准:和建筑设计自由



可感知的实现数据压缩的最佳方式是创建只能由移动客户端及其服务器理解的自定义语言。您可以使用 GZIP / LZW 或任何其他压缩算法为其添加下一级压缩。



优点:




  1. 使用最少的标题自定义有效内容,

  2. 相对安全的从eaves-droppers,另外一个级别的加密不会有害,但是需要考虑。

  3. <
  4. 除非使用GZIP /加密库,否则没有任何第三方编码器/解码器库。

  5. 由于没有使用第三方库,因此假设没有gzip和加密algos,没有商业许可问题。



    1. 缺点:




      1. 难以维护自定义语言,应该支持架构,设计和javadoc的

      2. 如果使用多个压缩器,创建有效负载的时间相对较高。自定义语言编码,GZIP压缩和加密库。

      http://en.wikipedia.org/wiki/Opera_Mini#Functionalityrel =nofollow> Opera Mini 阅读功能部分。

      >



      对于项目的快速支付,使用像GZIP和行业标准Web服务内容交换格式(如SOAP和JSON)的第三方压缩器。



      优点:


      1. 快速集成,遵守标准方法,使Web服务器组件




      2. 没有时间在发明车轮时消耗,就像没有时间在架构和开发自定义语言中消耗时间。 b

        缺点:


        1. 级别压缩是由第三方库驱动的,在实际内容中可能不会被压缩。

        2. 压缩在低端/高端设备中工作相同,因此堆内存消耗可能在低内存设备上阻塞。

        3. 依赖第三方库,您永远不知道支持何时被撤回。

        4. 您可能陷入商业许可的恶性循环

        示例: http://developers.sun.com/mobility/apis/articles/wsa/

        $ b


        1. Informit

        2. DevX

        3. 设计移动网络服务

        4. 提供网络服务移动用户:移动服务门户的
          架构设计


        I have been a bit confused on how best to go about this.

        The thing: I'm creating a j2me mobile app that will send compressed data via HTTP to a web server, which then will uncompress the request, fetch the data, compress it and send back to client.

        One similar solution to this is: T-Booster

        The Problem: I'm confused on how to send a compressed http request from the client app, what technology to use for the server and how best to go about implementing it. Assuming the server is handing thousands of requests at a time, what will be the effect on the whole application?

        Comments are well appreciated. Thanks.

        解决方案

        Approach I: Top Criteria's: Compression, Security and Architectural design freedom

        The perceivable best way to achieve data compression is to create custom language that is understandable by the mobile client and its server only. You can add next level compression to it by using GZIP / LZW or any other compression algorithm.

        Pros:

        1. Customize the payload content with minimal headers and send it to the server.
        2. Relatively secured from eaves-droppers, also an extra level of encryption would do no harm but to be considered on need basis.
        3. Tow levels compression reducing the total payload.
        4. Does not have any depending on any 3rd party encoder/decoder library, unless you use GZIP / encryption libraries. Hence its portable across platforms.
        5. As 3rd party libraries are not used, assuming no gzip and no encryption algos, there is no commercial licensing hassles.

        Cons:

        1. Difficult to maintain the custom language, should be supported with architecture, design and javadoc's
        2. Relatively high time to create payload if used multiple compressors viz. custom language encoding, GZIP compression and encryption library.

        Example: In this link Opera Mini read section on Functionality.

        .

        Approach II: Top Criteria: Strict project timelines

        For quick disbursement of the project use 3rd party compressors like GZIP and industry standard webservice content exchange formats like SOAP and JSON.

        Pros:

        1. Quick integration, adherence to standard approach's which make the web-server component easier to develop
        2. No time consume in inventing the wheel, like is said no time consumed in architecturing and developing custom language.

        Cons:

        1. The level compression is driven by 3rd party libraries where-in the actual content might not be compressed. The library would just restructures similar to Shannon / Rate-Distortion theory.
        2. The compression works the same in low end / high end device so the heap memory consumption might be blocker on low memory devices.
        3. Dependency on 3rd party libraries, you never know when the support is pulled back.
        4. You might get pulled into the vicious circle of commercial licensing when using 3rd party libraries, unless you use open source libraries.

        Example: http://developers.sun.com/mobility/apis/articles/wsa/

        .

        Edit: Some very useful links

        1. Informit
        2. DevX
        3. Design Mobile Webservices
        4. Providing web services to mobile users: the architecture design of an m-service portal

        这篇关于设计用于流量压缩的移动Web服务器和客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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