bmaso / file-ingest-service-poc

File ingesting web service, implemented with Akka Stream, Alpakka Http, Akka Cluster
GNU General Public License v3.0
0 stars 0 forks source link

Jackson JSON serialization #1

Open bmaso opened 4 years ago

bmaso commented 4 years ago

Java serialization is the default being used, but should be changed to anything better. JSON provides readability of the data even when in the persistence store. In theory then the data could be accessed as semi-structure data in Spark env, or processed using standard JSON tools.

bmaso commented 4 years ago

Got Jackson JSON serialization for intra-cluster communications going. That was commit 9524439. Will need to add an Akka JDBC Persistence journal and snapshot plugin to et JSON serialization in the JDBC journal and snapshot databases still.

bmaso commented 4 years ago

Turns out that changing the default database encoding of messages is non-trivial, and therefore I think beyond the scope of this POC. The solution involves writing a plugin for the Akka Persistence JDBC JournalDao. A different DAO change change how events are written to the JDBC database. The default and only DAO provided with Akka Persistence uses Byte[] representation of serialized events.