New Features as of version 1.3.2 BETA Top-Level: * Added some http client/server classes to the C++: compatibility with Python's http classes. These interfaces are in flux, so this is included for feedback. * Added JSON support * Added NumPy support * C++ classes can pickle and unpickle, Midas* support * M2k OpalPythonDaemon can pickle and unpickle January 2012 *Added some new OpenContainers functionality: * Added python-esque Split, Strip, Lower, and Upper (with identical semantics to Python's similar routines) and associated tests. * Moved some synchronization code in SynchronizedWorker to a helper methods "startUp" and "waitFor" which simplifies the main loop of the SynchronizedWorker, and also has the added benefit of exposing that code for the ThreadedServer (see below). That eases managing threads that aren't in a WorkerCoordinator. * Updated the ValReader so that a few methods were virtual: this allows the JSONReader to slip in and re-use the majority of the Python dictionary parsing. * Minor error message fix *Python: * Updated so MidasSocket can support NumPy: added new ArrayDisposition AS_NUMPY for this. *Added JSON compatibility to PTOOLS C++ libraries * Added JSONReader, which allows a user to read a stream containing JSON and turn it into a dictionary. * Added JSONPrint which allows a C++ Tab to print as JSON * Added an example json_ex.cc which shows some examples of how to access the JSON compatibility (printing and input). *Adding simple HTTP Server into PTOOLS: * Augmented MidasServer to handle "NORMAL_SOCKET" (which means we don't do the crazy DUAL/SINGLE socket sending) and added a special constructor for that. * Augmented MidasServer to allow some client to take over a file descriptor so the server doesn't have to track that file descriptor anymore. * Added a new SimpleServer, which doesn't do any crazy Midas DUAL/SINGLE: a simple server where the server gets the standard MidasServer callbacks * Added a new ThreadedServer, where each socket connection is dispatched to a thread (one thread per connection). A minimal threadpool is implemented to avoid the startup/shutdown of threads. This is the bare class that handles the thread management and co-ordinating the threads. * Added a new SimpleHTTPServer (which inherits directly from ThreadServer) for parsing the basic HTTP protocols, leaving the details to clients. * Added a MidasHTTPServer (which inherits directly from SimpleHTTPServer) which specfically serves as a Gateway, translating from HTTP POST to MidasTalker. Upon sending a standard HTTP POST XML/HTML from some HTTP client into MidasHTTPServer, the HTTPServer converts the request into a dictionary, sends that dict to some MidasServer (via a Midastalker), gets the resulting dict back, converts that dict into XML and sends the final XML result back to the HTTP Client. Discussion: We wanted to reuse the framework of the MidasSocket and MidasServer without too much of a rewite (there are really only 2 or 3 minor changes). That way, the SimpleServer and resulting framework can take advantage of the MidasServer socket work that has some legacy of testing. From an abstract design aspect, this is non-optimal (as perhaps some of the MidasSocket and MidasServer code should be in helper classes), but we wanted to keep the Python MidasServer/MidasTalker in sync: one of the minor goals of the PTOOLS is to keep the Python and C++ as close as possible (for maintenance reasons). * Added httptools which characterizes a lot of the work that HTTP has to do when parsing. * Took a lot of functionality to do with file descriptors out of MidasSocket and placed it into FDTools. To preserve backwards compatibility, MidasSocket now inherits from FDTools. * Added an HTTPConnection/HTTPResponse which resembles what Python does: this is the simple way to put together an HTTP client. * Added two sample http servers 1) samplehttpserver_ex which returns time from a GET 2) httpserver_ex which just shows what POST and GET send, and responses with an echo * Added sample httpclient_ex, which basically shows the same examples as the Python HTTP clients. It also demonstrates the chunked response stuff. * NumPy support * Added documentation * Added a new array disposition to C++ code: AS_NUMPY Since NumPy is the current supported standard, we had to make sure we supported it * valpickleloader uses the Val specific loader NOT the generic one * load: Added NumPy array support to the genericpickleloader * handles PicklingProtocol 0 and 2 * handle NumPy sharing with get/put * added tests to pickleloader_test for all different types we support (valgrind the test) * Added postprocess step to pickleloader to turn all "shared tups" into appropriate arrays. * dump: Added NumPy array support * Updated PythonPickler class for Protocol 0 * Restructured so pmstack is own data structure for handling memoization. This is for Pickling Protocol 0. This will be reused in the M2k * NumPy handles most numeric arrays * Updated dumper for Protocol 2: p2common.h, valprotocol2.h,cc * added tests to p2_test.cc * Fixed so NumpY gets/puts work (has to do a postprocess step to do this right) * Added NumPy to M2k, massive updates to M2k opalpython area