Curious about the future of data-driven systems? Join our Data Engineering roundtable and learn how to build scalable data platforms.
Data Engineering: The industry has come a long way from organizing unstructured data to adopting today's modern data pipelines. See how.
Database Product Lead at DataStax
Redwood City, US
Joined Jan 2017
Stats
| Reputation: | 358 |
| Pageviews: | 48.3K |
| Articles: | 3 |
| Comments: | 4 |
Comments
May 15, 2020 · Valentin Kulichenko
Lior, thanks for pointing this out! I will fix this ASAP.
Jul 23, 2017 · Dulaj Atapattu
Why serialization and reflection are even considered problems? First - is there a use case for Serializable singleton really? I can't imagine one. Second - this can be told about anything, reflection generally allows to violate any API. It actually allows to violate incapsulation - should we search for better ways to encapsulate? :)
And yes, singleton is something that should be avioded in the first place. IMO it's always better to spend time and energy on creating proper architectures rather than inventing "better" ways to implement anti-patterns.
Jul 23, 2017 · Dulaj Atapattu
readResolveI() is not a part of any interface, but it's one of the standard methods in Java serialization spec. Refer to docs.
May 30, 2017 · Ayberk Cansever
Good article! Couple considerations though:
- You don't really need to enable peer class loading in this scenario. This feature is designed mostly for Compute Grid, and even there works only with Java classes (at least for now).
- Implementing IBinarizable is also redundant here. Since you don't have any custom serialization logic, but rather write all properties as is, Ignite will do exactly the same automatically for a plain class that doesn't implement any interface.