Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 1.24 KB

readme.md

File metadata and controls

52 lines (37 loc) · 1.24 KB

Build status

ArangoDB Storage Provider for Microsoft Orleans

Can be used to store grain state in an ArangoDB database.

Installation

Nugets coming soon...

Usage

Register the provider like this:

config.Globals.RegisterArangoStorageProvider("ARANGO",
    url: "http://localhost:8529",
    username: "root",
    password: "password");

Then from your grain code configure grain storage in the normal way:

// define a state interface
public class MyGrainState
{
        string Value { get; set; }
}

// Select ARANGO as the storage provider for the grain
[StorageProvider(ProviderName="ARANGO")]
public class Grain1 : Orleans.Grain<MyGrainState>, IGrain1
{
        public Task Test(string value)
        {
                // set the state and save it
                this.State.Value = value;
                return this.WriteStateAsync();
        }

}

Note:

  • Grain state can be stored using a database name of your choice. The default is 'Orleans'.
  • The state is stored in a collection called 'GrainState'.

License

MIT