00001 /****************************************************************************** 00002 00003 @mainpage The Mango Tree 00004 00005 Mango is a collection of D packages with an orientation toward 00006 server-side programming. These packages may be used together 00007 or in isolation and, in many cases, can be just as applicable 00008 to client-side development. Mango is targeted for Win32 and 00009 linux platforms. 00010 00011 There are currently eight packages under the Mango Tree: 00012 00013 @li mango.io: a high-performance buffered IO package. Primary 00014 functionality includes memory Buffers, external Conduits 00015 (files, sockets, etc), file-system manipulation, several 00016 flavors of Readers and Writers (formatted data), TextFormat 00017 (printf) and TextLayout support, class serialization, 00018 tokenization, and a whole lot more. Socket support is via 00019 the gracious provision of Christopher Miller's socket module. 00020 See FilePath, FileProxy, FileConduit, FileSystem, File, 00021 FileScan, SocketConduit, ServerSocket, MulticastSocket, 00022 SocketListener, Token, Stdin, Stdout, Reader, Writer, 00023 IPickle and PickleRegistry. 00024 00025 @li mango.http.client: An HTTP client for conversing with a remote 00026 HTTP server. Supports headers, query parameters, cookies, 00027 timeout etc. Tokenizer classes in mango.io are handy for 00028 parsing returned content. See HttpClient. 00029 00030 @li mango.http.server: an HTTP server framework is provided for 00031 implementing a variety of high performance servers based 00032 on the HTTP protocol. This is not a fully-fledged v1.1 00033 implementation. That is, it doesn't currently support 00034 'fields' or 'keep alive'. However, it happily processes 00035 each request without allocating memory, making it unusually 00036 efficient. This is an example of how D array-slicing can 00037 seriously improve runtime efficiency. An open-source HTTPS 00038 library should be fairly easy to bolt in. Modules HttpServer 00039 and IProvider are the primary entry points: you implement an 00040 instance of the latter, and hand it to the former. 00041 00042 @li mango.servlet: A servlet-style engine that sits upon 00043 mango.server. Includes most of the things that Java servlet 00044 programmers would expect, and attempts to improve in certain 00045 key areas such as the IO system. See Servlet and ServletProvider. 00046 00047 @li mango.cache: Some simple caching mechanisms. Includes MRU 00048 caching via a queue, and level-two caching (to disk) via 00049 class-serialization. Now based upon a derivative of Doug Lea's 00050 concurrent hashmap. The mango.cluster package derives from 00051 mango.cache, so it's really easy to switch between a local 00052 cache implementation and a clustered version. See ICache, 00053 IMutableCache, PlainCache, QueuedCache and VirtualCache. 00054 00055 @li mango.log: A port of the wildly popular Log4J package, for 00056 logging and tracing of runtime behaviour. See 00057 <A HREF="http://logging.apache.org/log4j/docs/documentation.html">this page</A> 00058 for an introduction to Log4J. Mango.log exposes an extensible and 00059 customizable framework, has been optimised heavily for 00060 minimal runtime overhead, does not impact the GC once 00061 initialised, and operates with either Mango.io or Phobos. 00062 Mango.log can generate remote log messages for use with Chainsaw, 00063 and has a browser-based 'Administrator' which allows remote, 00064 dynamic inspection and adjustment of the log settings within an 00065 executing program. See Logger, BasicConfigurator and 00066 PropertyConfigurator. There are a number of examples that show 00067 how to use these facilities (e.g Servlets.d) 00068 00069 @li mango.cluster: A clustering package for servers and other 00070 network aware applications. Currently supports clustered 00071 caching and queuing, where the former is limited to a fixed 00072 MRU number of entries per node, and the latter is limited to an 00073 upper memory waterline. While the underlying QOS (quality of 00074 service) substrate is setup to be plugable, the QOS 00075 currently provided is stream/multicast based. Note that this 00076 package is not a substitute for a persistence layer; instead 00077 it is a tool for enabling horizontal scaling within a system 00078 that has been designed explicitly from the outset to scale. 00079 On the other hand, it can significantly enhance the throughput 00080 of any persistence layer by offloading a large percentage of 00081 read operations. See CacheInvalidatee, CacheInvalidator, 00082 NetworkCombo, NetworkAlert, NetworkCache and NetworkQueue. 00083 00084 @li mango.icu: Set of wrappers around the ICU I18N project. See 00085 <A HREF="http://www-306.ibm.com/software/globalization/icu/index.jsp">this page</A> for 00086 the scoop on what is probably the most comprehensive and 00087 functional project in this particular arena. Mango.icu exposes 00088 the C API in a manner that takes advantage of D arrays and 00089 so on. See UCalendar, UChar, UConverter, UDateFormat, ULocale, 00090 UMessageFormat, UNumberFormat, UResourceBundle, UString, 00091 UText, UCollator, USet, UTransform, USearch, UNormalize, 00092 UDomainName, UBreakIterator, URegex, and UTimeZone. 00093 Numeric formatting is handled by a range of subclasses, 00094 including UDecimalFormat, UCurrencyFormat, UPercentFormat, 00095 UScientificFormat, and USpelloutFormat. 00096 There is set of adapter classes in UMango which can be used 00097 to bind the ICU converters to Mango.io, thereby enabling 00098 Reader and Writer with the full suite of unicode transcoders. 00099 00100 Package dependencies are as follows (from left to right): 00101 00102 @code 00103 mango.io => phobos (minimal) 00104 mango.log => mango.io (without -version=Isolated) 00105 mango.icu => mango.io (without -version=Isolated) 00106 mango.cache => mango.io 00107 mango.http.server => mango.io 00108 mango.http.client => mango.io, mango.server 00109 mango.cluster => mango.io, mango.cache, mango.log 00110 mango.servlet => mango.io, mango.http.server, mango.cache, mango.log 00111 @endcode 00112 00113 Mango.icu and Mango.log are also made available as independent packages, 00114 outside of the regular Mango Tree. To enable this, specify the flag 00115 -version=Isolated when building those packages 00116 00117 You might take a look at the unittest.d source to get a general 00118 feel for functionality, and browse the various pdf files 00119 <A HREF="http://svn.dsource.org/svn/projects/mango/trunk/doc/">here</A> 00120 along with the class-hierarchy or alphabetical-list linked at the 00121 top of this page. There's also a set of examples 00122 <A HREF="http://svn.dsource.org/svn/projects/mango/trunk/example/">over here</A>. 00123 Those will probably be sufficient to get an idea where the Mango Tree 00124 might come in handy within your projects. 00125 00126 Discussion forums are hosted 00127 <A HREF="http://www.dsource.org/forums/viewforum.php?f=5">here</A>, 00128 and the general introduction starts 00129 <A HREF="http://www.dsource.org/forums/viewtopic.php?t=148">here</A>. 00130 00131 *******************************************************************************/ 00132