I need to write and read a byte array to and from MongoDB. In Java, the data is in a form of
@Document(vale="raw_data")
public class RawData{
@Id
private String id;
private byte[] data;
...
}
The byte array can be long enough to exhaust all available memory. One (easy ?) solution is to cut a long byte array into a few pieces and store them one by one. Any features of MongoDB can be used for this scenario? I am thinking of reactive for some reason.