Giter VIP home page Giter VIP logo

Comments (3)

jhelovuo avatar jhelovuo commented on August 22, 2024

The description above is not completely accurate.

Serde is used for serialising application (payload) data, whose structure we do not know beforehand. Serde's derive macro is very handy here. DDS default serialisation format for application data is CDR, so we provide an implementation for that. We have SerializerAdapter and DeserializerAdapter traits to decouple Serde from RustDDS. I think the application data could be (de)serialised completely without Serde, if the adapters are used to attach some other serialiser library in Serde's place. We are still dependent in Serde in serialising the built-in Discovery data.

Speedy is used to process the RTPS protocol headers and other control data. These have fixed content and format. Some parts of the protocol cannot be independently decoded by Speedy, so some of the implementations are hand-written. Mostly because submessage contents cannot be decoded without looking at some flags from submessage header, which is decoded separately.

Now that I think of it, Speedy could be used better by restructuring the submessages: Instead of keeping submessage header and body separate (neighbouring fields in a struct), the data should be restructured so that we always decode the submessage as one unit, both header and body. Then we have the header flags locally available to decode the body. Submessage header is just one machine word in size.

While I understand the architectural goal of separating logical representation from the wire format, I see little gain in doing that all over the place. Most of the data items are too simple to gain significant benefit from that.

from rustdds.

danieleades avatar danieleades commented on August 22, 2024

fair enough. thanks for the detailed response. Maybe I should just close this until there are some more concrete requirements for the serialisation. Where do you see this going? or are you happy with the current approach?

from rustdds.

jhelovuo avatar jhelovuo commented on August 22, 2024

I am quite happy with the current status. If you spot similar redundancy or C++ leftovers as there were with ReliabilityKind, then those could be cleaned away, but I see nothing major here.

from rustdds.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.