Saving Millions by Dumping Java Serialization
quantcast.com
Saving Millions by Dumping Java Serialization
1–10 of 48 posts
Re: Saving Millions by Dumping Java Serialization
#2Re: Saving Millions by Dumping Java Serialization
#3Author here, let me know if you have any questions/want more details.
Re: Saving Millions by Dumping Java Serialization
#4Re: Saving Millions by Dumping Java Serialization
#5Author here, let me know if you have any questions/want more details.
So... what's quantcast?
Re: Saving Millions by Dumping Java Serialization
#6Sounds to me like you shouldn't be storing objects in your database.
Why not just write the data into tables, and then create new POJO's when necessary, using the selected data?
Re: Saving Millions by Dumping Java Serialization
#7> Secondly, Java serialization produces very bulky outputs. Each serialization contains all of the data required to deserialize. When you’re writing billions of records at a time, recording the schema in every record massively increases your data size. Sounds to me like you shouldn't be storing objects in your database. Why not just write the data into tables, and then create new POJO's when necessary, using the sele…
Re: Saving Millions by Dumping Java Serialization
#8TLDR: we had shitty code, optimized it, now it runs well. No code examples, nothing.
Re: Saving Millions by Dumping Java Serialization
#9> Secondly, Java serialization produces very bulky outputs. Each serialization contains all of the data required to deserialize. When you’re writing billions of records at a time, recording the schema in every record massively increases your data size. Sounds to me like you shouldn't be storing objects in your database. Why not just write the data into tables, and then create new POJO's when necessary, using the sele…
A standard database table isn't large enough to handle our large datasets. For example, the Hercules dataset was over 2 petabytes and even after optimization is almost 1 petabyte. Big data systems like Spark, Impala, Presto, etc. are designed to make the data look like a table, even though it is spread out into many files in a distributed filesystem. This is what we do. It's pretty common to reimplement some database…
A standard database table isn't large enough to handle our large datasets
... isn't much of an answer as-to why you're storing objects in your database.As you already mentioned in your post, serialized objects are big - they contain all of their data, plus everything necessary to deserialize the object into something usable.
I imagine your objects have the standard amount of strings, characters, numbers, booleans, etc... why not just store those in the database and select them back out when needed? Less data in the database, and faster retrieval time since you skip serialization in both steps (storage and retrieval). Even if you have nested objects within nested objects, you can write-out a "flat" version of the data to a couple of joined tables surely.
On the other hand, serializing the object is probably more "simple" to implement and use... but then you get the classical tradeoff of performance vs. convenience.
Re: Saving Millions by Dumping Java Serialization
#10Author here, let me know if you have any questions/want more details.