PPT slides

629 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
629
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Mechanism for reusing applets. SDT-parms has to be a valid HTTP value.
  • What the parameters are for each transformation. What do they adapt to – screen size, bandwidth, color depth.
  • Very small screen – crop followed by scaling
  • Seems the server controls everything, via the applet.
  • Now we have a whole system.
  • PPT slides

    1. 1. Architecture and Pragmatics of Server-directed Transcoding Björn Knutsson and Honghui Lu, U. Penn Jeffrey Mogul, HP WRL
    2. 2. Transcoding proxies <ul><li>Problems that transcoding proxies solve </li></ul><ul><ul><li>Complex server content </li></ul></ul><ul><ul><li>Highly variable network bandwidths </li></ul></ul><ul><ul><li>Highly variable client capabilities: screen size, color depth, encoding </li></ul></ul>Origin Server Transcoding Proxy
    3. 3. Problem with transcoding proxies JPEG, 600x800 Q=50, 48617 bytes JPEG, 200x267 Q=34, 5815 bytes JPEG, 600x800 Q=3, 5830 bytes Q=50, 5831 bytes
    4. 4. Server-directed transcoding (SDT) <ul><li>Autonomous transcoding </li></ul><ul><ul><li>Proxy employs heuristics </li></ul></ul><ul><ul><li>Risks loosing the meaning of the content </li></ul></ul><ul><ul><li>Risks loosing opportunities for aggressive transcoding </li></ul></ul><ul><li>Server-directed transcoding [Mogul WCW ’00] </li></ul><ul><ul><li>Server explicitly tells the proxy what to do </li></ul></ul><ul><ul><li>Respects the end-to-end argument </li></ul></ul>
    5. 5. Contributions <ul><li>A specific protocol design </li></ul><ul><li>An applet architecture </li></ul><ul><li>A proxy architecture </li></ul><ul><li>Interesting transcoding applets </li></ul><ul><li>Experimental results </li></ul>
    6. 6. Basic architecture <ul><li>Server-directives as mobile code – applets </li></ul><ul><li>Reference to applets attached to the HTTP response </li></ul>Origin Server Transcoding Proxy Client Request Transcoded response Request Response + directives Fetch applet <ul><li>Size and reusability of applets? </li></ul>
    7. 7. HTTP protocol extensions <ul><li>New HTTP response headers </li></ul><ul><li>No restrictions on the syntax of SDT-parms </li></ul><ul><ul><li>SDT-parms are interpreted by applets, not by proxies </li></ul></ul><ul><li>Mechanism for reusing applets </li></ul>SDT-applet: http://example.com/crop.jar SDT-parms: crop-origin=140;300, crop-size=100,100
    8. 8. Basic image transformations <ul><li>Cropping </li></ul><ul><li>Scaling </li></ul><ul><li>Lossy compression </li></ul><ul><li>Color-depth reduction </li></ul><ul><li>De-animation </li></ul><ul><li>Format conversion </li></ul><ul><li>New basic transformations may be introduced … </li></ul>
    9. 9. Complex image transformations <ul><li>An image must be adapted for many clients </li></ul><ul><li>Small screen </li></ul><ul><ul><li>Cropping, scaling </li></ul></ul><ul><li>Low bandwidth </li></ul><ul><ul><li>Cropping, color-depth reduction, scaling </li></ul></ul><ul><ul><li>Lossy compression, de-animation </li></ul></ul><ul><li>Small screen and low bandwidth? </li></ul>
    10. 10. What should an applet look like? <ul><li>Big, all inclusive applet </li></ul><ul><ul><li>Control complexity </li></ul></ul><ul><li>Small, per image applet </li></ul><ul><ul><li>Reusability </li></ul></ul><ul><li>Category-specific applet </li></ul><ul><ul><li>One applet that applies to a set of images </li></ul></ul>
    11. 11. Example applet: 'crop-interp' <ul><li>For images with one important subject and surroundings that just add flavour </li></ul><ul><li>First interpolate between a set of crop boxes </li></ul><ul><li>Shrinks the inner most cropped image if necessary </li></ul>
    12. 12. Other category-specific applets <ul><li>Landscape panorama </li></ul><ul><ul><li>Apply lossy compression first </li></ul></ul><ul><ul><li>Then crop … </li></ul></ul><ul><li>Banner ad </li></ul><ul><ul><li>Reduce color depth first </li></ul></ul><ul><ul><li>De-animation, scaling … </li></ul></ul>
    13. 13. Who is in control? <ul><li>Seems the server controls everything, via the applet </li></ul><ul><li>But, what if </li></ul><ul><ul><li>Server – image cannot be scaled to < 100x100 </li></ul></ul><ul><ul><li>Client – cannot display images > 50x50 </li></ul></ul><ul><ul><li>Proxy – does not have enough CPU cycles for this! </li></ul></ul><ul><li>Who decides what transformations to apply? </li></ul>
    14. 14. Who is in control of what ? <ul><li>Origin server controls the semantics </li></ul><ul><li>Client controls the presentation </li></ul><ul><li>Proxy controls the resource used for transcoding, and network traffic </li></ul><ul><li>Server controls are delegated to its applet running at proxy </li></ul>
    15. 15. Rules for resolving conflicts <ul><li>Any party has a veto </li></ul><ul><ul><li>Server or proxy can decide not to transcode an image </li></ul></ul><ul><ul><li>The client can decide to reject an image </li></ul></ul><ul><li>Server is free to compromise semantics in order to meet client and proxy preferences, if the server is willing </li></ul>
    16. 16. Proxy environment Transcoding applet response Transcoded response SDT-parms Client parameters Proxy parameters
    17. 17. Revisit ‘crop-interp’ <ul><li>For images with a main subject </li></ul><ul><li>Simple control </li></ul>Crop-interp(input image, output image, SDT_params, /* crop boxes */ client parameters, proxy parameters)
    18. 18. The pragmatics of an applet <ul><li>Applet size is still large </li></ul><ul><ul><li>Image I/O </li></ul></ul><ul><ul><li>Bit manipulations for basic transformations </li></ul></ul><ul><li>Performance is bad </li></ul><ul><ul><li>Compute intensive </li></ul></ul><ul><ul><li>Interpreted code is slow </li></ul></ul>
    19. 19. The pragmatics of an applet <ul><li>Separate common, basic functions from the control </li></ul>Function applet Control applet 2 Control applet 1 <ul><li>Implement basic functions with native code </li></ul>
    20. 20. Prototype proxy implementation <ul><li>Basic, un-optimized implementation </li></ul><ul><ul><li>No caching of either image or transcoding applet </li></ul></ul><ul><ul><li>Sequential store and forward </li></ul></ul><ul><ul><li>Implemented in Perl </li></ul></ul><ul><li>Supports Perl applets </li></ul><ul><li>Pre-installs native functions (ImageMagick) </li></ul><ul><li>Long-term : augment Squid to support Java applets </li></ul>
    21. 21. Experimental environment <ul><li>Penn CIS Web server </li></ul><ul><li>Proxy: IBM ThinkPad, 1.2GHz Pentium III, 384MB RAM </li></ul><ul><li>10 Mbps Ethernet between server and proxy </li></ul><ul><li>Simulate various proxy-to-client bandwidths using Linux Traffic Shaper </li></ul>
    22. 22. Transcoding overhead <ul><li>“ crop-interp”: 2KB Perl code </li></ul><ul><li>Original image: 600x800, 65982 bytes </li></ul><ul><li>Target size: 200x267, 5831 bytes </li></ul><ul><li>Download applet 30ms </li></ul><ul><li>Execute applet 86ms </li></ul>
    23. 23. Effect on end-to-end latency (ms) 211 1120 Proxy transcoding 200x276 510 9680 No proxy 600x800 768 Kbps 56 Kbps
    24. 24. Summary of contributions <ul><li>A specific protocol design </li></ul><ul><li>An applet architecture </li></ul><ul><li>A proxy architecture </li></ul><ul><li>Interesting transcoding applets </li></ul><ul><li>Experimental results </li></ul><ul><ul><li>Improves end-to-end latency even on 768 Kbps links </li></ul></ul>
    25. 25. Future work <ul><li>Applet design </li></ul><ul><ul><li>Size, reusability, performance </li></ul></ul><ul><li>Proxy execution environment </li></ul><ul><ul><li>Native functions </li></ul></ul><ul><ul><li>API </li></ul></ul><ul><li>Security issues </li></ul><ul><ul><li>Resource consumption of transcoding applets </li></ul></ul><ul><li>Caching issues </li></ul><ul><ul><li>cache replacement policy </li></ul></ul><ul><ul><li>Matching client requests with the cached items </li></ul></ul><ul><li>Transform contents other than images </li></ul><ul><ul><li>Extend to support CDNs and streaming media </li></ul></ul>
    26. 26. Related work <ul><li>Proxy transcoding </li></ul><ul><ul><li>Brooks et al. 1995, Fox et al. 1996 </li></ul></ul><ul><ul><li>Chandra and Ellis 1998 </li></ul></ul><ul><li>Introducing code into proxy </li></ul><ul><ul><li>Active Cache, Cao et al. 1998 </li></ul></ul><ul><ul><li>Active Names, Vahdat et al. 1999 </li></ul></ul><ul><li>Other related ideas </li></ul><ul><ul><li>Active networking </li></ul></ul><ul><ul><li>IBM WebSphere </li></ul></ul><ul><ul><li>ICAP </li></ul></ul>

    ×