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

IApplicationPartManager dependency in endporints.MapGrains()? #41

Open
vrecluse opened this issue Jun 16, 2020 · 2 comments
Open

IApplicationPartManager dependency in endporints.MapGrains()? #41

vrecluse opened this issue Jun 16, 2020 · 2 comments

Comments

@vrecluse
Copy link

Hi, I'm planing to split the Http gateway code from orleans silo.
Which the gateway server is not a silo, and should only depends on grains interfaces, orleans client, and routes http requests to the background silos.
But when I start gateway, it complains IApplicationPartManager not found.
Is there any workaround?

@ReubenBond
Copy link
Contributor

Maybe this could work if the IApplicationPartManager was taken from the client's container instead of the silos?

@vrecluse
Copy link
Author

It seems no simple way to do that...
I use following code as a workaround, a bit intriguing...

            // Application parts
            var parts = new ApplicationPartManager();
            services.AddSingleton<IApplicationPartManager>(parts);
            parts.AddApplicationPart(new AssemblyPart(typeof( IMyGrain ).Assembly));
            parts.AddFeatureProvider(new AssemblyAttributeFeatureProvider<GrainInterfaceFeature>());

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

No branches or pull requests

2 participants