Increase max document size to at least 64MB

We use ROS (Robotic Operating System) and it’s distributed between 6 different computers on the vehicle. We have a perception (cameras and lidar), localization/navigation, mapping, control, safety, and a database computer running MongoDB. It’s too heavy of a load for a single computer; we had a team build an amazing (and fragile) Threadripper and it failed. The images come in from six cameras as a 15fps stream of compressed raw stills over the network (not files). Each still from one of the low rez cameras is 5MB and 25MB from the high rez cameras. We thought about writing the raw images (bgr8 format, the binary isn’t a standard format like jpg or png) with a unique id to the filesystem, but that creates different problems. The software isn’t running on the same machine as the MongoDB and when documents are updated or deleted, the filesystem also needs to be updated. It all can be figured out, it just complicates things using the filesystem. It’s much cleaner and faster to write the c++ objects and arrays directly to the database, using lazy writes if the filesystem can’t keep up, and cast them back when read. No encoding/decoding or serialization/deserialization. For example:

To Write:

MyClass my_object;
bsoncxx::types::b_binary b_object
{
  bsoncxx::binary_sub_type::k_binary,
  uint32_t(sizeof(MyClass)),
  reinterpret_cast<uint8_t*>(my_object)
};

Then to read:

MyClass* my_object =
  reinterpret_cast<MyClass*>(my_doc["my_object"].get_binary().bytes);

It’s simple = more stable, less code = faster, and less to maintain = more reliable.