Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to deserialise serialised object back to Event #67

Open
royalpinto opened this issue Aug 30, 2017 · 1 comment
Open

Any way to deserialise serialised object back to Event #67

royalpinto opened this issue Aug 30, 2017 · 1 comment

Comments

@royalpinto
Copy link
Contributor

Any way to deserialise serialised object back to Event ?

This would be useful with clustering (one use case) in which master process listens to the events, serialises and evenly distributes to the workers. When worker receives these events from the master process, if there is any way to convert back serialised object back to Event, it can use all the methods associated with it.

@englercj
Copy link
Owner

englercj commented Aug 30, 2017

To make there be a clean API for that it would require refactoring the Parser to have the two concerns it has currently (socket listening and stream parsing/buffering) separated. So there would be something that listens to the socket and buffers, then something that parses the buffered data into an Event object. You could then use that second thing.

Other options include having the master send events to slaves using a socket connection that you setup the parser to listen to so it just parses things coming over the wire, or just copy-paste the parsing code into your own thing that you can use for custom stuff. Currently there is no clean way of doing what you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants