{"id":19855412,"url":"https://github.com/gtesei/pippoproxy","last_synced_at":"2025-06-10T16:11:55.174Z","repository":{"id":9712065,"uuid":"11665779","full_name":"gtesei/pippoproxy","owner":"gtesei","description":"PippoProxy is a 100% pure Java HTTP proxy designed/implemented for Apache Tomcat","archived":false,"fork":false,"pushed_at":"2015-08-04T05:02:41.000Z","size":1002,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T23:42:51.691Z","etag":null,"topics":["filesystem-cache","http-proxy","java","java-http-proxy","memory-cache","pippo","servlet","tomcat"],"latest_commit_sha":null,"homepage":"http://www.javaworld.com/article/2071848/build-ci-sdlc/boost-tomcat-performance-for-static-content.html","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"dudleycarr/nsqjs","license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gtesei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-25T16:45:28.000Z","updated_at":"2018-05-15T15:03:23.000Z","dependencies_parsed_at":"2022-07-08T03:40:53.471Z","dependency_job_id":null,"html_url":"https://github.com/gtesei/pippoproxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtesei%2Fpippoproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtesei%2Fpippoproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtesei%2Fpippoproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtesei%2Fpippoproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gtesei","download_url":"https://codeload.github.com/gtesei/pippoproxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtesei%2Fpippoproxy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259106730,"owners_count":22805941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filesystem-cache","http-proxy","java","java-http-proxy","memory-cache","pippo","servlet","tomcat"],"created_at":"2024-11-12T14:12:39.795Z","updated_at":"2025-06-10T16:11:55.157Z","avatar_url":"https://github.com/gtesei.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pippo Proxy\n\n[![Build Status](https://api.travis-ci.org/gtesei/pippoproxy.svg?branch=master)](https://travis-ci.org/gtesei/pippoproxy)\n\n## What is it?\n\n  PippoProxy is a 100% pure Java HTTP proxy designed/implemented for \n  Apache Tomcat (5.0 or newer). Thanks to its cache manager (that can be \n  disabled in case of DYNAMIC proxied web sites) it's really very performant \n  in case of STATIC proxied web sites (a traditional well known Tomcat limit).\n  Untill now, Apache Tomcat provides proxy support by \n  using Apache Web Server proxy support (mod_proxy). But many times, in \n  production applications use a servlet engine (eg. Apache Tomcat) but not \n  Apache Web Server. Moreover, many times java written applications \n  requires java written (sometimes complex) authentication checks (typically \n  checking session attributes). Finally, in case of STATIC proxied web \n  sites  it is very useful a powerful cache in order to minimize remote HTTP \n  GET/POST for boosting performance.  \n  This is what PippoProxy provides. \n  \n  \n## How it works?\n\n  Pippo is a Servlet (and a set of related helper classes). \n  It has a cache manager (that can be disabled in case of DYNAMIC proxied web sites) \n  that manages two caches: one memory based and one file system based. \n  \n```\n  \n  ..................................  ,------------------------------.\n  |                                |  |                              |\n  | ....... .......      ........  |  | +-----b ........    |------. |\n  | |Node1| |Node2| .... |Nodek |  |  | |     | |      |... |Nodeh | |\n  | `-----' `-----'      `......|  '''' L_____| |......|    |______| |\n  |                                |  |                              |\n  |                                |  |                              |\n  |                                |  |                              |\n   `''''''''''''''''''''''''''''''''  '`'''''''''''''''''''''''''''''\n        Memory based Cache                 File System based Cache\n          (es. Max 2MB)                       (es. Max 20MB)\n  \n```\n\n  The caching (Last Recently Used) algorithm considers a (in memory) queue of nodes \n  and for each page hit the related resource (html page, image, ...) is pushed \n  to the head of queue shifting down all other nodes. For instance, this happens \n  if the page related to Node2 is requested. \n\n```\n  ..................................  ,------------------------------.\n  |                                |  |                              |\n  | ....... .......      ........  |  | +-----b ........    |------. |\n  | |Node2| |Node1| .... |Nodek |  |  | |     | |      |... |Nodeh | |\n  | `--:--' `--.--'      `......|  '''' L_____| |......|    |______| |\n  |    |_______|                   |  |                              |\n  |                                |  |                              |\n  |                                |  |                              |\n   `''''''''''''''''''''''''''''''''  '`'''''''''''''''''''''''''''''\n        Memory based Cache                 File System based Cache\n  \n```\n\n  Otherwise, if a new resource is requested a new head is created shifting \n  down all other nodes. For instance, this happens id a new resource must be cached. \n\n```\n  ..................................  ,------------------------------.\n  |                                |  |                              |\n  | ....... .......      ........  |  | +-----b ........    |------. |\n  -\u003e| New | |Node2| .... |Nodek |  |  | |     | |      |... |Nodeh | |\n  | `--:--' `--.--'      `......|  '''' L_____| |......|    |______| |\n  |                                |  |                              |\n  |                                |  |                              |\n  |                                |  |                              |\n   `''''''''''''''''''''''''''''''''  '`'''''''''''''''''''''''''''''\n        Memory based Cache                 File System based Cache\n  \n```\n\n  If the total amount of in memory resources (in MB) excedes the value specified by \n  CACHE_MAX_MEMORY_SIZE (es. 2 MB) then a suitable set of last positioned nodes is discarded \n  to filesystem where another cache works. For instance, this happens (taking previous example) \n  if after loading the Node named \u003cNew\u003e in memory the node named \u003cNodek\u003e must be discarded \n  to file system based cache. \n\n```\n  ..................................  ,------------------------------.\n  |                                |  |                              |\n  | ....... .......      ........  |  | +-----b ........    |------. |\n  -\u003e| New | |Node2| .... |      |  |  | |Nodek| |      |... |Nodeh | |\n  | `--:--' `--.--'      `......|  '''' L_____| |......|    |______| |\n  |                                |  |                              |\n  |                                |  |                              |\n  |                                |  |                              |\n   `''''''''''''''''''''''''''''''''  '`'''''''''''''''''''''''''''''\n        Memory based Cache                 File System based Cache\n  \n```\n\n  File System based Cache works as well. The caching (Last Recently Used) algorithm here \n  considers a (filesystem) queue and for each node discarded from the in memory cache all nodes here are \n  shifted down in the queue. If a resource is requested, the related node is pushed from the filesystem \n  queue to the head of in memory queue. For instance, this happens if NodeK is requested.\n\n```\n  \n  ' ..................................  ,------------------------------.\n  |                                |  |                              |\n  | ....... .......      ........  |  | +-----b ........    |------. |\n  | |Nodek| |New  | .... |      |  |  | |     | |      |... |Nodeh | |\n  | `--^--' `--.--'      `......|  '''' L_____| |......|    |______| |\n  |    |                           |  |    |                         |\n  |    |                           |  |    |                         |\n  |    |                           |  |    |                         |\n   `'''|''''''''''''''''''''''''''''  '`'''|'''''''''''''''''''''''''\n       |                                   |\n       |___________________________________|\n  \n```\n\n  Finally, if the total amount of resources stored in filesystem excedes the value (in MB) specified \n  by CACHE_MAX_DISK_SIZE, a suitable set of last positioned nodes is destroyed. \n  \n  Resources are refreshed according to CACHE_TIMEOUT value (es. 2h). \n\n## References \n* [PippoProxy homepage] (http://sourceforge.net/projects/pippoproxy/)\n* [Tomcat homepage] (http://tomcat.apache.org/)\n* [Ant homepage] (http://ant.apache.org/)\n* [HTTPClient homepage] (http://www.innovation.ch/java/HTTPClient/)\n* [Design PatternsElements of Reusable Object-Oriented Sofware, E. Gamma, R. Helm, R. Johnson, J. Vlissides (Addison-Wesley Professional, 1995; ISBN0201633612)] (http://www.amazon.com/exec/obidos/ASIN/0201633612/javaworld)\n* [For Ephemeral Cache Item, see \"Chapter 7, Concurrency Patterns\" in Java Enterprise Design Patterns, Volume 3, Mark Grand (John Wiley \u0026 Sons, 2002; ISBN0471333158] (http://www.amazon.com/exec/obidos/ASIN/0471333158/javaworld) \n* [High Availability Tomcat,\" Graham King] (http://www.javaworld.com/javaworld/jw-12-2004/jw-1220-tomcat.html)\n* [Tomcat FAQ about connectors] (http://jakarta.apache.org/tomcat/faq/connectors.html)\n* [The Apache Jakarta Tomcat Connector] (http://jakarta.apache.org/tomcat/connectors-doc/)\n* [Visit Wikipedia for the Law of Demeter] (http://en.wikipedia.org/wiki/Law_of_Demeter) \n* [Visit Wikipedia for the principle of locality] (http://en.wikipedia.org/wiki/Principle_of_locality)\n* [For an introduction to extreme programming, read the bible by Kent BeckExtreme Programming Explained (Addison-Wesley Professional; 1999ISBN0201616416)] (http://www.amazon.com/exec/obidos/ASIN/0201616416/javaworld)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgtesei%2Fpippoproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgtesei%2Fpippoproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgtesei%2Fpippoproxy/lists"}