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
Attempt to make the serialization manager non static #2100
Comments
This will require a change to codegen, since generated seralizers use the static members. I wonder if it would be more fruitful to port to Wire instead of this and replace our serializer entirely. |
I've made rough implementation of Wire port, and it doesn't yet supports |
Likely we will need to register default surrogates for each of those generic collections like we do in |
I think if we can make it non static to start with, it makes it easier to plugin and isolate. The idea being it could become an Iserializationmanager and the code gen could take an instance before starting which is what @jdom sugessted to me. Its really the first step. |
It will have to be a think about how all the parts (message handling, code gen etc) take a reference to the instance based serialization manager. And to see if we can rationalize the various calls to get it to what could be a sensible interface in the future to allow the plugging of a totally different serialization from the core. I am open to suggestions? |
Are you open to suggestions, @Drawaes? If you are - here's mine: serialization manager already supports swapping of the serializers, DI can be easily added into it as well. You can think of it as of factory method container. So making it non-static will require major unnecessary effort. Instead I'd suggest to make inner refactoring of it in order to make all serializers inherited from one interface, e.g. |
Absolutely open to suggestions. So are you saying pull out the internal "serialization" bits and move them into a IExternalSerializer and then make that the first class serialization source? |
Yes, kind of. |
@ReubenBond, do you think this makes sense and relatively easy to do as a follow-up to #2345? |
Yes, this is likely the next PR after that one. On Nov 4, 2016 6:23 PM, "Sergey Bykov" notifications@github.com wrote:
|
#2592 is meant to address this. |
Fixed by #2592 :) |
I propose that I have a go at this, it would be an opportunity to clean it up at the same time while hopefully helping with testing (being able to isolate the serialization during tests), it might help the DI story or even testing swapping wire in place if people feel the need for that.
I have created a branch https://github.com/Drawaes/orleans/tree/SerializationRefactor that I will start work on.
Initially I am mostly going to just try to remove the static, and make a singleton, but if there are any ideas of what would like to be seen at the same time, or if it is something that is not wanted please to say.
The text was updated successfully, but these errors were encountered: