I’m working on a project that will eventually involve Java objects with several billion total fields, and some back-of-the-envelope calculations show that standard serialization techniques will quickly become intractable for inputs of this length (think a 20 gig JSON file). Are there any alternative techniques known?
I’m working on a project that will eventually involve Java objects with several billion
Share
I would probably use Sun’s XDR format. It’s binary, so figure 1/3rd the size of text-based formats as a starting point for size. Although they’re not (to my knowledge) included in the Java distribution, there are a few libraries to produce/read this format in Java and C++. Since it’s used in Sun’s ONC RPC, the protocol (and at least some library implementations) have been tested heavily over the years. It’s also standardized in RFC 4506, so you can be about as independent of Oracle as you see fit.