Comments (9)
I see, maybe you can take a look ay my implementation as a reference, I've tested and it works under 8, until we get official docs.
from orleans.
Hi.
I hit the same issue, documentation and samples are not yet updated to 8.0, as you also saw :)
Based on your code, something like this should work:
internal static IServiceCollection AddAzureShardedGrainStorage(
this IServiceCollection services,
string name,
Action<OptionsBuilder<AzureShardedStorageOptions>> configureOptions = null)
{
configureOptions?.Invoke(services.AddOptions<AzureShardedStorageOptions>(name));
services.ConfigureNamedOptionForLogging<AzureShardedStorageOptions>(name);
return services.AddGrainStorage(name, AzureShardedGrainStorageFactory.Create);
}
But I'm 100% sure if this is all that's needed after migrate to v8, because right know my custom provider it not working, method Participate
is not called during Silo startup :(
edit: found out the issue, be sure to return your strong typed Storage class, not IGrainStorage
as in the old example. Ex. public static AzureShardedGrainStorage Create(IServiceProvider services, string name)
from orleans.
Thanks @sec for the info. That would get past the build error, but wouldn't get it running (I did test to make sure). Hopefully the Orleans team might have some more info?
@ReubenBond - do you know how 'Custom Grain Storage' should be set up in Orleans 8 please? Are there any docs anywhere?
If there aren't any current docs and you can show me how to fix it, I could update/create the tutorial for Orleans 8. Here is an example of my standard of writing.
from orleans.
I've had a look at the above mentioned sample. I think it's missing a lot of new stuff.
I checked out the release notes, but couldn't see any pointers.
I checked out Orleans Contrib and found the Mongo provider, but I'm really struggling to work out the changes.
Does anyone from the Orleans team will know how to help please?
from orleans.
What do you miss exactly or maybe what problem are you facing? After those code changes and change in Storage factory return type, your provider should work - what errors are you getting?
from orleans.
The same thing as you whereby Participate(ISiloLifecycle lifecycle)
isn't called on the silo startup.
If you check out the Mongo Provider, it seems to be done in a very different manner in V8, but that provider is quite complex, so I'm having trouble working out exactly what's needed.
Did you get your repo working with the provider calling Participate?
from orleans.
Yes, you need to change the return type in your storage factory to be like this
public static class AzureShardedGrainStorageFactory
{
public static AzureShardedGrainStorage Create(IServiceProvider services, string name)
{
var options = services.GetRequiredService<IOptionsMonitor<AzureShardedStorageOptions>>().Get(name);
return ActivatorUtilities.CreateInstance<AzureShardedGrainStorage>(services, options, name);
}
}
from orleans.
I couldn't get it going, so I went to the Orleans repo and re-modelled my stuff based on the Redis provider.
Thanks for your help.
The tutorial is still out of date, so I'll leave this open as notification that the docs need updating. Appreciate the team have a lot on.
from orleans.
For anyone else who gets stuck, I now have the persistence provider working. Code can be found here.
It's based on the Redis provider, which is a nice example to follow.
I'm going to close this issue as my problem is resolved and hopefully others will be able to follow these examples.
from orleans.
Related Issues (20)
- Bug: Exclude inaccessible interface methods from codegen HOT 3
- `IGrainReferenceActivatorProvider` exception with interfaces written in F# HOT 1
- [Question] Orlean grain does not allow concurrent read HOT 2
- Typo in silo start log HOT 1
- Awaiting this.AsReference call causes deadlock in Orleans 7+ HOT 5
- [Question] How to connect Orleans Client to Orleans Server in Docker? HOT 3
- Issues with streams during rolling deploy (Orleans.Streams.QueueCacheMissException)
- In Orleans 8.1.0, after 90 seconds, the Silo and Gateway ports will change from the status LISTEN to CLOSED, which prevents further connections.
- Cannot serialize type inheriting from Dictionary HOT 3
- Pulling agents don't work properly with MemoryStreams on multiple silos
- Bug: Invalid code generated for interface with explicit implementations
- [Proposal] Let `AddSiloBuilderConfigurator` has an overload which accept an `Action` to configure cluster
- Serialization issues #2 - Orleans 8.0.0
- Serialization issues #3 - Orleans 8.0.0
- UnregisterReminder(string reminderName)
- Tracing: Recorded flag not propagated between activities HOT 6
- Graceful shutdown
- ObjectDisposedException at Orleans.Runtime.GrainTimer.ForwardToAsyncCallback HOT 1
- Add Roslyn PublicApiAnalyzers to all src projects
- PersistentStreamPullingAgent skips over the message under a certain condition
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.