My favorites | Sign in
Project Logo
                
Code license: MIT License
Labels: html, proxy
Feeds:
People details
Project owners:
  cgabaldon, hung.n.luu

A TCP server that proxies requests from a web application for remote HTML. The service proxy runs local to the web application and listens on port 4615.

Overview

When a client connects, the content proxy does the following:

  1. Validate JSON request from client.
  2. Load content service's base URL (key: "aps{service}baseurl"), widget's URL pattern (key: "aps{service}{widget}urlpatterns"), and HTML (key:"aps{service}{widget}{request_path}") from memcached. This is a get_multi request where we attempt to retrieve multiple keys from memcached with a single query.
    1. If content service's base URL and/or widget's URL pattern do not exist in memcached, the Content Proxy will fallback to the database for this information, and then sets it in memcached.
  3. If "aps{service}{widget}{request_path}" exists, return HTML to client and we're done.
  4. If "aps{service}{widget}{request_path}" does not exist and {request_path} matches one of the widget's URL patterns, make HTTP request to content service: http ://{baseurl}{request_path}.
    1. Set HTML in memcached.
    2. Return HTML to client.

Flow

http://docs.google.com/Present?docid=df5rq9bb_17gtxt5hhr&skipauth=true









Hosted by Google Code