This paper presents the architecture and characteristics of a memory database intended to be used as a cache engine for web applications. Primary goals of this database are speed and efficiency while running on SMP systems with several CPU cores (four and more). A secondary goal is the support for simple metadata structures associated with cached data that can aid in efficient use of the cache. Due to these goals, some data structures and algorithms normally associated with this field of computing needed to be adapted to the new environment.
Index Terms-web cache, cache database, cache daemon, memory database, SMP, SMT, concurrency
I. INTRODUCTIONe observe that, as the number of web applications created in scripting languages and rapid prototyping frameworks continues to grow, the importance of offapplication cache engines is rapidly increasing [1]. Our own experiences in building high-performance web applications has yielded an outline of a specification for a cache engine that would be best suited for dynamic web applications written in an inherently stateless environment like the PHP language and framework 1 . Finding no Open Source solutions that would satisfy this specification, we have created our own. W II. SPECIFICATION The basic form for an addressable database is a store of keyvalue pairs (a dictionary), where both the key and the value are more or less opaque binary strings. The keys are treated as addresses by which the values are stored and accessed. Because of the simplicity of this model, it can be implemented efficiently, and it's often used for fast cache databases. The first point of our specification is that the cache daemon will implement key-value storage.However, key-value databases can be limiting and inflexible. In our experience one of the most valuable features 1 Because of the stateless nature of the HTTP, most languages and frameworks widely used to build web applications are stateless, with various workarounds like HTTP cookies and server-side sessions that are more-or-less integrated into frameworks.