Code Monkey home page Code Monkey logo

Comments (4)

huntc avatar huntc commented on June 1, 2024

Given that the developer is able to take full control of the deserialisation, I wonder if the issue here is regards to what the default behaviour is. Presently, the default behaviour is to skip over records that cannot be deserialised, having warned the observer via a warning level log output.

Should we change the default behaviour to have the deserialisation panic and rely on the process supervisor to act i.e. treat this situation as unrecoverable?

from akka-edge-rs.

patriknw avatar patriknw commented on June 1, 2024

Should we change the default behaviour to have the deserialisation panic and rely on the process supervisor to act i.e. treat this situation as unrecoverable?

That is correct. Would it be possible for the user to override the behavior per event type so that the user can make an explicit decision to skip certain events?

from akka-edge-rs.

huntc avatar huntc commented on June 1, 2024

Would it be possible for the user to override the behavior per event type so that the user can make an explicit decision to skip certain events?

Sure, but if they want to skip certain events then they could also completely override the way serde deserialises. This would achieve the same outcome, no? By way of example:

#[derive(Deserialize)]
pub struct {
    my_bool: bool,
}

If my_bool was just added, serde will not deserialise and assume false. To override, the programmer would have to (I may have the syntax wrong):

#[derive(Deserialize)]
pub struct {
    #[serde(default)]
    my_bool: bool,
}

Furthermore, you can fully implement Deserialize instead of the macro, which is how you'd handle more complex cases.

from akka-edge-rs.

patriknw avatar patriknw commented on June 1, 2024

sounds good

from akka-edge-rs.

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.