nevadalogoboss
  • Home

Akka Protobuf Serialization

01.09.2019by admin
  • Akka Protobuf Serialization Example
  • Akka Protobuf Serialization Images

Proto.Actor was created by Roger Johansson, the original creator of Akka.NET. The reason for creating yet another actor model framework was due to the many design issues faced while building Akka.NET. Akka.NET required the team to build custom thread pools, custom network layers, custom serialization, custom configuration support and much more.

What are protocol buffers?

Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages.

Pick your favorite language

ExampleProtobuf
Protocol buffers currently support generated code in Java, Python, Objective-C, and C++. With our new proto3 language version, you can also work with Dart, Go, Ruby, and C#, with more languages to come.

How do I start?

  1. Download and install the protocol buffer compiler.
  2. Read the overview.
  3. Try the tutorial for your chosen language.
Active4 years, 8 months ago

I'm playing around with Akka's remoting and serialization facilities and want to understand a few things to get started. I've read over the documentation on serialization here:

According to the documentation, it seems that it would be enough to just supply these things in my application.conf, under:

And let's assume I have a case class under that package, such as:

And then in my actors, I can simly do something like this:

Would this configuration be enough, or would I need to do something more?I've looked at an external serializer mentioned from the documentation here:https://github.com/romix/akka-protostuff-serialization

This looks really promising, but I was looking for something standard that comes out of the box from Akka.

I'm also looking into testing for message version compatibility. Let's say Actor A talks to Actor B with MessageX

MessageX initially might contain fields like this:

Now let's say Actor B upgrades its version of Message X, lets call it Message X +1

Message X +1 now includes another field, like so:

But Actor A is still sending the older version of the message, just simply Message X... would Actor B still know how to deserialize the old message?

Akka Protobuf Serialization Example

Thanks for the help.

HiChews123
HiChews123SerialHiChews123
73333 gold badges1414 silver badges3434 bronze badges

2 Answers

The Protobuf serializer can only serialize Protobuf messages. So for things to work as you want you need to make MyMessage a protobuf message.

Viktor KlangViktor Klang

Akka Protobuf Serialization Images

24.1k77 gold badges4242 silver badges6565 bronze badges

Just an additional information on your versioning concerns;

Protobuf can serialise/ deserialize different versions of the same message types. You have to sustain the already present fields' indexes and add the additional new ones accordingly, in your proto file descriptor.

GladmirGladmir

Not the answer you're looking for? Browse other questions tagged scalaakkaprotocol-buffers or ask your own question.


Cdk Software Install Agent
Software Conteggio Parole Pdf Printer

  • Recent Posts

    • Su Podium 1 7 Download Crack Pes
    • Grover Inductance Calculations Pdf Creator
    • Autodesk Navisworks Simulate 2013 Free Download
    • Constitutional Law Of India By J N Pandey Pdf Viewer
    • Windows 2003 Standard Edition Iso Download
    • Buildsoft Crackers
    • Holymen Free Download Mp3
    • 13 Escalones Del Mentalismo Descargar Pdf En
    • Vlinx Serial Server Manager
    • Australian 1 Dollar Note Serial Numbers
    • Star Pistol Serial Numbers
    • Descargar Controlador De Audio Para Windows Xp Profesional 2002
    • The Sims Complete Collection Patch Fremont
    • Driverpack Solution 13 Download Full
    • Anatomy For The Artist Jeno Barcsay Pdf Free
Copyright © 2019 nevadalogoboss.
  • Up