New Features as of version 0.94 One main feature of this release is that the C++ versions of MidasTalker and MidasServer are more adaptive to the serialization they support. In particular, a MidasServer can be talking to all sorts of different clients, each having its own different serializations: BY DEFAULT THIS JUST WORKS. If you have written a C++ MidasServer or MidasTalker in the past for a previous release, you will not have to change any code to get this feature, it just works. Some of the MidasSocket code has changed to support this feature, but none of the MidasTalker or MidasServer interfaces have changed at all. THIS IS ALL BACKWARDS COMPATIBLE WITH OLD PTOOLS: If you have a running MidasServer running at (say) PTOOLS 0.86, that server will still talk correctly to a MidasTalker from 0.94. The only difference is that the newer version is smarter on how to handle MidasTalkers who connect with "different than default" serializations. *Detail: By default, "adaptive" is turned on in both the MidasTalker and MidasServer. This means that when there is a question of how to talk because no conversation has begun between the client and server (thus, the type of serialization is still in question), the default language (serialization) of the conversation will be the default serializations set-up in the constructor. Once someone has initiated a conversation, then that sets the language of the conversation. *Detail: You can turn "adaptive" off. This forces you to ALWAYS use the serialization set in the constructor. The only time you may want to do this is if you are sending raw strings and don't want anything to be misconstrued as a serialization type. *Detail: In a MidasTalker/Server pair, typically the client "talks first", sending a header which describes the serialization. Hisorically, the header was mostly a sanity check and usually ignored. Now, we take that header and the server notices "Oh, the client is talking M2k Binary, okay, when I talk back to him, I will speak M2k Binary as well." The MidasServer can also talk first, but this is rare: in that case, the server will establish the communication type. *Detail: Note that the Python versions of MidasTalker and MidasServer still DO NOT support adapative serialization. Why? Because a version of Python has certain capabilites established by the version of Python, the presence of absence of the Numeric library, etc. It's much more difficult for the Python Talker/Server to be adaptive because it can't typically support all the different range of serializations. Note that the Python MidasTalker and MidasServer are "sort of" adaptive because they can support usually both Python Protocol 0 and Python Protocol 2, but usually not M2k serialization and "old" Python Protocol 2. *Detail: Note that the UDP MidasYeller and MidasListener ARE NOT adaptive because of backwards compatibility concerns with M2k. Another main feature of this release is that the C++ MidasTalker, Server, Yeller and Listener classes can all use M2k Binary serialization: The M2k binary serialization is about as fast as the Python Pickling Protocol 2, but this new serialization protocol is M2k specific. While some applications find this support necessary, we tend to steer people to use Python Pickling Serialization Protocol 2. *Detail: The M2k serialization support is equivalent to serialization used in the newer versions of M2k (M2k 3.22.0 and up). Because this feature *requires* some C++ code, we currently aren't supporting this type of serialization from Python (but we will in the future). C++ Area: Small bug: None of the MidasTalker, Midaserver or MidasListener "select" calls did the proper thing in the presence of EINTR. Fixed. Small bug: Cleaned up permutation_server so it handles disconnects without bringing down the entire server. Changed threads to join so can clean up resources better Fix OCArray for removeAll to be faster. Added a 'const' version of the data() method to ocarray as well to avoid strange const casts. Update the operator== for AVLHashT to be faster. Change request from users: Update the opalutils.h so you have more control over how Tabs can be converted to Arrs in the ReadTabFromOpalFile and ReadValFromOpal routines. ReadTabFromOpalFile now has a parameter that allows you to control how such conversions occur (it defaults to the old behavior). ReadValFromOpalFile now works correctly (recursively) converting: before, it only did Tab->Arr conversions at the top-level only (not recursively). Added the capability for better error messages from OpalReader and ValReader (string and stream version). When a logic_error is thrown when we try to parse either Opal Dictionaries or Python Dictionaries, a better error message describing where the error occurred will be emitted (from .what() method of logic_error). All examples can now use --ser=4 for M2k Binary Serialization. Again, currently this is ONLY for the C++ examples (in both X-Midas and plain C++) but not Python. Refactored the ValReader and OpalValReader to reuse code for the stream/string readers as well as the syntax error reporting code: there was previously too much replicated code between the two Python Area: Small bug: None of the MidasTalker, Midaserver or MidasListener "select" calls did the proper thing in the presence of EINTR. Fixed. Xm Area: Added all new opencontainers work into ptools option tree Added all new C++/M2k binary serialization into ptools option tree Updated relevant explain pages, adding new /SER=4 option (for M2k serialization) to relevant primitives All MidasServers and MidasTalkers can be adaptive. Cleaned up permserver so works better when client disconnects: Changes so OSF1 versions will work Testing under X-Midas 4.4.4 only, others should work, but your mileage may vary