why filters
Download
Skip this Video
Download Presentation
Why filters?

Loading in 2 Seconds...

play fullscreen
1 / 25

Why filters? - PowerPoint PPT Presentation


  • 120 Views
  • Uploaded on

Why filters?. Very flexible design Allows one module to modify the data that another module produces Finally, CGI\'s that output SSI tags A module that puts header and footer information on each page Many many more possibilities. Basic filters in 2.0. Core

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Why filters?' - tiger-wiley


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
why filters
Why filters?
  • Very flexible design
  • Allows one module to modify the data that another module produces
    • Finally, CGI\'s that output SSI tags
    • A module that puts header and footer information on each page
    • Many many more possibilities
basic filters in 2 0
Basic filters in 2.0
  • Core
    • core_input_filter (read from network)
    • core_output_filter (write to network)
    • byterange_filter (send partial result)
    • content_length_filter (compute C-L)
    • sub-request_filter (remove extra EOS)
    • OLD_WRITE (buffer for ap_r* funcs)
basic filters in 2 01
Basic filters in 2.0
  • HTTPD
    • HTTP_IN (header/body determination)
    • HTTP_HEADER (send headers)
    • CHUNK (send data in chunks)
    • DECHUNK (read chunked body from client)
  • Modules
    • SSI_filter (parse files for SSI tags)
basic filters in 2 02
Basic filters in 2.0
  • Modules
    • SSI_filter (parse files for SSI tags)
    • External (run external programs)
    • Charset-encoding (translate between charsets)
possible additional filters
Possible Additional Filters
  • SSL (in process of being written, input and output)
  • Header/Footer (basic attempt in presentation and handouts)
  • Cache (cache data in output filter, send it later from cache_handler, basic attempt in CVS)
handlers and filters
Handlers and filters
  • Handlers are the first filter in the chain
    • Filters use functions like ap_fwrite
    • Handlers use ap_rwrite
  • Handlers Generate data from nothing
  • Filters modify data passed to them from handlers, and other filters
types of buckets
File

Pool

MMAP

EOS

Flush

Error

Types of buckets
  • Heap
  • Transient
  • Immortal
  • Pipe
  • Socket
assumptions
Assumptions
  • All data can be broken into chunks
    • Each chunk of data must come from the same source
  • All HTTP data can be represented as strings of characters, even if not human readable
  • Filters must allow for optimal performance, even if they don\'t enforce it
    • If files are in the output stream, then we should use sendfile
bucket functions
Bucket Functions
  • apr_bucket_*_create
    • Different arguments for each bucket type
  • apr_bucket_split
  • apr_bucket_destroy
  • apr_bucket_copy
  • apr_bucket_setaside
brigade functions
Brigade Functions
  • apr_brigade_create
  • apr_brigade_split
    • Splits based on buckets
  • apr_brigade_partition
    • Splits based on offset
  • apr_brigade_destroy
  • apr_brigade_write, putstrs, vputstrs, putc, etc
    • Write into a brigade with buffering
more information
More Information
  • Slides on-line
    • Http://www.ntrnet.net/~rbb/presentations
  • Articles
    • http://www.apachetoday.com
    • http://www.covalent.net/
  • General Information
ad