PPT slides

26
05/30/22 1 Architecture and Pragmatics of Server-directed Transcoding Björn Knutsson and Honghui Lu, U. Penn Jeffrey Mogul, HP WRL

Transcript of PPT slides

Page 1: PPT slides

04/12/23 1

Architecture and Pragmatics of Server-directed Transcoding

Björn Knutsson and Honghui Lu, U. Penn

Jeffrey Mogul, HP WRL

Page 2: PPT slides

2

Transcoding proxies

Problems that transcoding proxies solve Complex server content Highly variable network bandwidths Highly variable client capabilities: screen size, color

depth, encoding

Origin Server

TranscodingProxy

Page 3: PPT slides

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

Page 4: PPT slides

4

Server-directed transcoding (SDT)

Autonomous transcoding Proxy employs heuristics Risks loosing the meaning of the content Risks loosing opportunities for aggressive transcoding

Server-directed transcoding [Mogul WCW ’00] Server explicitly tells the proxy what to do Respects the end-to-end argument

Page 5: PPT slides

5

Contributions

A specific protocol design

An applet architecture

A proxy architecture

Interesting transcoding applets

Experimental results

Page 6: PPT slides

6

Basic architecture

Server-directives as mobile code – applets

Reference to applets attached to the HTTP response

Origin Server Transcoding

ProxyClient

Request

Transcoded response

Request

Response +

directives

Fetch applet

Size and reusability of applets?

Page 7: PPT slides

7

HTTP protocol extensions

SDT-applet: http://example.com/crop.jarSDT-parms: crop-origin=140;300, crop-size=100,100

New HTTP response headers

No restrictions on the syntax of SDT-parms SDT-parms are interpreted by applets, not by proxies

Mechanism for reusing applets

Page 8: PPT slides

8

Basic image transformations

Cropping

Scaling

Lossy compression

Color-depth reduction

De-animation

Format conversion

New basic transformations may be introduced …

Page 9: PPT slides

9

Complex image transformations

An image must be adapted for many clients

Small screen Cropping, scaling

Low bandwidth Cropping, color-depth reduction, scaling Lossy compression, de-animation

Small screen and low bandwidth?

Page 10: PPT slides

10

What should an applet look like?

Big, all inclusive applet Control complexity

Small, per image applet Reusability

Category-specific applet One applet that applies to a set of images

Page 11: PPT slides

11

Example applet: 'crop-interp'

For images with one important subject and surroundings that just add flavour

First interpolate between a set of crop boxes

Shrinks the inner most cropped image if necessary

Page 12: PPT slides

12

Other category-specific applets

Landscape panorama Apply lossy compression first Then crop …

Banner ad Reduce color depth first De-animation, scaling …

Page 13: PPT slides

13

Who is in control?

Seems the server controls everything, via the applet

But, what if Server – image cannot be scaled to < 100x100 Client – cannot display images > 50x50 Proxy – does not have enough CPU cycles for this!

Who decides what transformations to apply?

Page 14: PPT slides

14

Who is in control of what?

Origin server controls the semantics

Client controls the presentation

Proxy controls the resource used for transcoding, and network traffic

Server controls are delegated to its applet running at proxy

Page 15: PPT slides

15

Rules for resolving conflicts

Any party has a veto Server or proxy can decide not to transcode an image The client can decide to reject an image

Server is free to compromise semantics in order to meet client and proxy preferences, if the server is willing

Page 16: PPT slides

16

Proxy environment

Transcodingapplet

response

Transcodedresponse

SDT-parms

Client parameters

Proxy parameters

Page 17: PPT slides

17

Revisit ‘crop-interp’

For images with a main subject

Simple control

Crop-interp(input image, output image, SDT_params, /* crop boxes */ client parameters, proxy parameters)

Page 18: PPT slides

18

The pragmatics of an applet

Applet size is still large Image I/O Bit manipulations for basic transformations

Performance is bad Compute intensive Interpreted code is slow

Page 19: PPT slides

19

The pragmatics of an applet

Separate common, basic functions from the control

Function applet

Control applet 2Control applet 1

Implement basic functions with native code

Page 20: PPT slides

20

Prototype proxy implementation

Basic, un-optimized implementation No caching of either image or transcoding applet Sequential store and forward Implemented in Perl

Supports Perl applets

Pre-installs native functions (ImageMagick)

Long-term : augment Squid to support Java applets

Page 21: PPT slides

21

Experimental environment

Penn CIS Web server

Proxy: IBM ThinkPad, 1.2GHz Pentium III, 384MB RAM

10 Mbps Ethernet between server and proxy

Simulate various proxy-to-client bandwidths using Linux Traffic Shaper

Page 22: PPT slides

22

Transcoding overhead

“crop-interp”: 2KB Perl code

Original image: 600x800, 65982 bytes

Target size: 200x267, 5831 bytes

Download applet 30ms

Execute applet 86ms

Page 23: PPT slides

23

Effect on end-to-end latency (ms)

56 Kbps 768 Kbps

No proxy

600x8009680 510

Proxy transcoding

200x2761120 211

Page 24: PPT slides

24

Summary of contributions

A specific protocol design

An applet architecture

A proxy architecture

Interesting transcoding applets

Experimental results Improves end-to-end latency even on 768 Kbps links

Page 25: PPT slides

25

Future work

Applet design Size, reusability, performance

Proxy execution environment Native functions API

Security issues Resource consumption of transcoding applets

Caching issues cache replacement policy Matching client requests with the cached items

Transform contents other than images Extend to support CDNs and streaming media

Page 26: PPT slides

26

Related work

Proxy transcoding Brooks et al. 1995, Fox et al. 1996 Chandra and Ellis 1998

Introducing code into proxy Active Cache, Cao et al. 1998 Active Names, Vahdat et al. 1999

Other related ideas Active networking IBM WebSphere ICAP