Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.13 KB

design.md

File metadata and controls

46 lines (33 loc) · 1.13 KB

HTTP Replicator: Design

To be able to serve an arbitrary number of HTTP clients simultaneously, replicator separates independent transactions in fibers (see fiber.txt). Transactions are complete lines of communication between client and server, from HTTP request to HTTP response - whether coming from a remote server or generated by the proxy - and all communication in between. Detailed behaviour depends on three things:

  • client request
  • current state of cache
  • current downloads

The client request is a property of the transaction and will not have to be communicated amongst threads. Furthermore, all threads have independent access to the cache, which leaves only the currently running downloads as data to be shared globally. Other than that, all transaction threads can run completely indepent of each other and need only be switched on and off at suitable times.

Etc..

Requests

  • HttpRequest

Protocols

  • BlindProtocol
  • HttpProtocol
  • FtpProtocol

Responses

  • BlindResponse
  • DataResponse
  • ChunkedDataResponse
  • DirectResponse
  • NotFoundResponse
  • ExceptionResponse