Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 1.08 KB

File metadata and controls

29 lines (18 loc) · 1.08 KB

1. Static Filesystem Handler

The StaticFSHandler Component manages Filesystem Data / Mime-Types for Static Data Requests.

All Virtual Host dependend file properties will be loaded at startup into static C++ class member Objects / Structs.

The File Data will be mmapped() into Kernel-Space for sendfile() usage when requested. If a files size is bigger than 2 Megabytes a huge-page for mmap() will be tried to allocate.

Important

A huge amount of files / subdirs currently is a performance killer. Segmentation on subdirs must be implemented.

1.1. Program Logic

1.1.1. Initialization

Loop recursive over files found in Virtual Host dir (from configuration). Add properties to internal C++ Objects / Structs.

All found files will be mmapped() (read into memory) for sendfile() processing.

1.1.2. Get Property

When a HTTP request for a Static File arrives, the files properties (e.g. SendfileFD) must be determined / returned. This happens inside multiple parallel ResultProcessors Threads.

Due to immutable member Objects / Structs a pointer can be used for parallel read access.