Imagine grain A is sending a dictionary with 100 entries to grain B, and 10 of the keys in the dictionary point to the same object, obj, on A's side. Object identity is important to preserve in scenarios like the following. On the receiver side, Orleans will restore all references correctly so that two pointers to the same object still point to the same object after deserialization as well. Maintaining object identity: If the same object is passed multiple types in the arguments of a grain call or is indirectly pointed more than once from the arguments, Orleans will serialize it only once. That means, for example, that if the method in the grain interfaces is declared to accept IDictionary but at runtime, the sender passes SortedDictionary, the receiver will indeed get SortedDictionary (although the "static contract"/grain interface did not specify this behavior). High-fidelity representation of types is fairly uncommon for serializers, so some points warrant further elaboration:ĭynamic types and arbitrary polymorphism: Orleans doesn't enforce restrictions on the types that can be passed in grain calls and maintain the dynamic nature of the actual data type. Numeric widening and narrowing (e.g: int to/from long, float to/from double).Version-tolerance - The serializer allows application types to evolve over time, supporting:. Flexibility - The serializer can be customized to support third-party libraries by creating surrogates or delegating to external serialization libraries such as, Newtonsoft.Json, and Google.Protobuf.Pointers are not supported, since they are not portable across processes. NET's type system, including support for generics, polymorphism, inheritance hierarchies, object identity, and cyclic graphs. High-fidelity - The serializer faithfully represents the majority of.More details are available in this presentation. High-performance - The serializer is designed and optimized for performance.The serialization framework included in Orleans is designed to meet the following goals: Orleans includes an advanced and extensible serialization framework which can be referred to as Orleans.Serialization. The Grain storage serializers section discusses the grain storage serialization. The majority of this article is dedicated to grain call serialization via the serialization framework included in Orleans. Grain storage serialization - used to serialize objects to and from storage systems.Grain call serialization - used to serialize objects passed to and from grains.There are broadly two kinds of serialization used in Orleans:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |