Comments (9)
@ReubenBond , I believe the issue here is that we have moved our types to a class library. Now Orleans cannot find the types in the assembly anymore even though the main project references the class library. Do we need to explicitly add the class library assembly similar to what has been mentioned in other issues like [assembly: GenerateCodeForDeclaringAssembly(typeof(SomeTypeInMyOtherAssembly))]
. We are on version 7.2.1 and the only change we have done in our code is move the grain types (records) from the main project to a class library. All the types of have generate serializer and alias attributes.
from orleans.
@SoucianceEqdamRashti the issue is not moving types to a class lib, the issue is that Alias
doesn't apply to the OrleansJsonSerializer
from orleans.
@ledjon-behluli , can you elaborate on that? Are you saying I need to explicitly add the new NewtonSoft.Json package to the class library?
To give more context, in the initial setup, everything existed in one project and this worked fine. We created creates in Azure table storage and no issues there. Then we decided to move the models to a class library and that's when we got the issue of the types not being found and also codec not found for a json serializer exception.
from orleans.
@SoucianceEqdamRashti maybe we are talking about two different things, but can you tell me if in the "$type" property, stored in table storage, you had the fully qualified name or not, i mean in the previous setup you had.
from orleans.
Ah, i looked at your initial comment and as you can see the FQN is stored in $type. See: $type":"TIP.AutomationCenter.Orleans.**Api**.Grains.Contracts.ActionReason.ActionReasonTriggerConditionRecord
.
Now the namespace changed to: TIP.AutomationCenter.Orleans.**Business**.Grains.Contracts.Country
from orleans.
@ledjon-behluli , yeah the namespace changed initially.
But I also tried to keep the same namespace in the new class library but that didn't make any difference. Got the same error as above. My assumption is that with Alias it shouldn't use the full name to access the types?
from orleans.
@SoucianceEqdamRashti I dont know about keeping the namespace the same, i would assume it would work (regardless of Alias or not), in the otherhand i dont know if 2 types with the same namespace can be deserialized if assembly info is taking into account or not. You could try this with a POC project and just use Newtonsoft.Json to try it out.
Regarding Alias in the context of storage: no it doesnt work! Kinda...See the Alias attribute is used with the Orleans serializer (the default RPC is done with), not with others! And the json serializer (deafult one for storage) doesnt take that into account (so far). You could use the orleans serializer for storage too, and it should work then. I am not sure if you want to do that, since you'll gain this ability but loose readability, and in-place modification...potentially other benefits.
Hope this helps.
from orleans.
Hmm, thanks for the clarification. Perhaps we will just keep the code in one project for now until some of these serializer parts become easier. Thanks again. I will though try with a POC and if anything new comes up I will post it here. Can close this issue for now.
from orleans.
I will though try with a POC and if anything new comes up I will post it here
Please, and @ me if you dont mind
from orleans.
Related Issues (20)
- Implementing Oneway Grain to Grain Media Streaming with Different Nodes and Silos in the Same Cluster
- New Microsoft.Extensions.Configuration stuff breaks existing Orleans project with "Could not find Clustering provider named 'Default'." HOT 5
- Failing DeepCopy when implementing multiple IConverter<,> on single class
- Mark explicitly removed or obsolete ids are reserved
- Azure App Service fails to start with never ending Orleans connection exceptions HOT 3
- Issues running Silo in Docker Compose: Unexpected direct silo connection on proxy endpoint HOT 5
- ISiloBuilder.ConfigureApplicationParts not in version 8 ? HOT 7
- How do I correctly call the DeactivateOnIdle() method within the Grain? Getting error! HOT 3
- The best suggestion for grain state storage? HOT 5
- Cluster Manifest Broken by v7.2.5
- Could not find a copier for type System.Func` HOT 4
- Accept a redis key prefix for all redis providers
- Metric value for orleans-grains can sometimes be negative
- PartitionGrains and Rebalancing HOT 2
- Expetion thrown on Subcribtion to MemoryStream. HOT 5
- Log spam with "ActivationCollector found an activation in a non Valid state"
- Null reference when trying to get a grain from GrainFactory
- Multiple Silos on single Host (One Cluster) Not updating database status with UseAdoNetClustering (3.2.2 and 3.7.1) HOT 1
- [Aspire] Cannot start Orleans client project because UseOrleansClient() tries to configure storage providers HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orleans.