ericmedvet / jgea

Apache License 2.0
19 stars 11 forks source link

Why core interfaces extend Serializable? #4

Closed hrstoyanov closed 4 years ago

hrstoyanov commented 4 years ago

I see a few core interfaces extend Serializable? Why? There a couple of concerns here:

  1. Java Serialization today is full of problems, The Java architects would have preferred to have never implemented it this way. It is best to be avoided until a better architecture comes out.

  2. One usually mark concrete objects with Serializable tag interface, not interfaces. This is for when JGEA transfers objects across a network wire. Even then there are better alternatives then Java Serialization out there - either implement a small custome protocol, or use: Arrow, Avro, Bert, Blixter, Bond, Capn Proto, CBOR, Colfer, Elsa, Externalizor, FlatBuffers, FST, GemFire PDX, Gson, Hessian, Ion, Jackson, JBoss Marshaling, JSON.simple, Kryo, Kudu, Lightning, MessagePack, Okapi, ORC, Paranoid, Parcelable, Parquet, POF, Portable, Protocol Buffers, Protostuff, Quickser, ReflecT, Seren, Serial, Simple, Simple Binary Encoding, SnakeYAML, Stephenerialization, Thrift, TinySerializer, travny, Verjson, Wobly, Xson, XStream, YamlBeans

ericmedvet commented 4 years ago

You are right. In a very preliminary version, I used serialization for some reasons. Now it is no more needed. And I agree that, even if it was, it would hardly sound that the interfaces extended Serializable.

ericmedvet commented 4 years ago

Fixed in commit 4dda263.