Currently the directory structure is confusing and inter-module dependencies
are not well factored. This project will address those issues.
These are straw man proposals for discussion. Please discuss this on the -dev
list. If you would like to make another straw man proposal, please add it
a complete proposal with a new proposal number.
Straw Man Proposal 1
This proposal is based on a lib < core < modules < plugins. Moreover, core depends on all of lib, modules depend on all of core and traffic_server proper includes all of lib and all of core and possibly some modules and may load some plugins.
Directory Structure
- lib/
Libraries should be largely stand alone and of general utility.- lib/ts - e.g. libinktomi++, portability + small and stand alone low level functionality, depends on nothing else
- lib/stats - may depend on lib/ts, may have to depend on other lib/* (try not to)
- lib/config - may depend on lib/ts, may have to depend on other lib/* (try not to)
- lib/* - other such core functionality which do not depend on the iocore
- core/
Core should general buffering and I/O functionality and low level protocols of of very general utility (e.g. DNS and SSL).- core/event - e.g. iocore/eventsystem - currently events + buffering, might want to factor buffering out and add in polling callbacks from iocore/net
- core/net - e.g. iocore/net - might want to factor out SSL/UDP support
- core/dns - currently does not depend on UDP, probably shouldn't as UDP in net is for bulk transport/MediaIXT, depends on event
- core/hostdb - depends on DNS
- core/aio - depends on event
- core/cache - depends on AIO
- core/utils ?? see if we can move these more appropriate places, this would include lots of stuff from $(ROOT)/proxy which was just thrown there
- modules/
Modules should support protocols and optional functionality. These may be statically or dynamically linked (i.e. the traffic_server should be able to link without them).- modules/hdrs - MIME/HTTP header support
- modules/http - depends on hdrs
- modules/remap - depends on http
- modules/ICP
- modules/tsapi - provides support for plugins. ? what do to about cache plugins ?
- modules/congest
- plugins/ - use only ts/ts.h
Plugins should be non-integrate pieces and should typically be dynamically loaded. - main/ - should be only Main.cc for traffic_server and supporting files
- mgmt/ - all code only used/useful by mgmt
- mgmt/cli - ? does this go here ?
- mgmt/html
- mgmt/main
- cop/ - all code only used/useful by the traffic cop
- logging ? is logging lib/core/module ? have to investigate
Dependencies
- lib - ts is base, others may have internal dependencies in Makefile.am
- core - depends on lib and may have internal dependencies, all explicit in Makefile.am
- modules - depends on lib and event but only I_ headers in the
core tree not P_ headers. All ts/*.h APIs for modules
must be in separate files. All dependencies explicit in Makefile.am - plugins - may depend on lib/core/modules and other plugins with all dependencies
explicit in Makefile.am. They may only depend on the ts/ts.h interface and
those ts/*.h interfaces for modules they depend on - ts/mgmt/cop/logutils - related executables should have their own directories