Giter VIP home page Giter VIP logo

azurestorageextensions's Introduction

Build status

Azure Storage Extensions

A set of extensions to the Azure Storage SDK, to easily enable new types of storage, as abstractions over existing services.

AzureGraphStore

An extension to the .NET SDK for Windows Azure Storage which adds a triple store abstraction over Table Storage.

In simple terms, it makes it easy to use Table Storage as a graph database.

Installation

Install using the nuget package:

PM> Install-Package AzureGraphStore

Example Usage

Create a graph

var account = CloudStorageAccount.DevelopmentStorageAccount;
var graphClient = account.CreateCloudGraphClient();
var graph = graphClient.GetGraphReference("example");
graph.CreateIfNotExists();

Add triples to the graph

// insert subject, property and value directly:
graph.Put("Richard", "Loves", "Cheese");

// insert a triple
var triple = new Triple("Richard", "Hates", "Marmite");
graph.Put(triple);

Query the graph

// query a single triple
var triple = graph.Get("Richard", "Loves", "Cheese").First();

// query using any combination of subject, property and value, i.e.
var triples = graph.Get(subject: "Richard");
var triples = graph.Get(property: "Loves");
var triples = graph.Get(values: "Cheese");
var triples = graph.Get(subject: "Richard", property: "Hates");
var triples = graph.Get(property: "Hates", value: "Marmite");
var triples = graph.Get(); // retrieving the entire graph is not recommended!

Delete triples from the graph:

graph.Delete("Richard", "Loves", "Cheese");
graph.Delete(triple);

AzureJsonStore

A strongly typed object store, using JSON to persist data in blob storage.

Installation

Install using the nuget package:

PM> Install-Package AzureJsonStore

Example Usage

We can use any POCO class, as long as it can be serialized to JSON. For this sample, we'll use this 'Foo' class:

class Foo
{
    public string Bar { get; set; }
    public int Baz { get; set; }
}

Create a store

var account = CloudStorageAccount.DevelopmentStorageAccount;
var jsonStoreClient = account.CreateCloudJsonStoreClient();
var store = jsonStoreClient.GetJsonStoreReference<Foo>("foostore");
store.CreateIfNotExists();

Add objects to the store

store.Put("foo1", new Foo{ Bar = "Hello", Baz = 3});

Get objects from the store

var foo = store.Get("foo1");

Query the store for objects

var foos = store.Query();

Delete objects from the store

store.Delete("foo1");

License

MIT

azurestorageextensions's People

Contributors

richorama avatar

Stargazers

Aversa Consulting avatar Nathan Rogers avatar Halid Cisse avatar Yuze avatar Simon Opper avatar Jeff West avatar  avatar Matias Quaranta avatar Tony Abell avatar Wiebe Tijsma avatar smartindale avatar Chris Patterson avatar Nick Rempel avatar Will Curran avatar  avatar Jerin avatar Hossam avatar Peter Provost avatar

Watchers

 avatar  avatar  avatar James Cloos avatar Tony Abell avatar  avatar

azurestorageextensions's Issues

Looking for production implementation

Hi!
I was looking for Graph storing alternatives on Azure for a X-IsInterestedIn-Y scenario and wondered if your extension has been used before on a production environtment.

Right now my alternative is DocumentDB but your approach sounds a bit more suitable.

This is for a product not yet created, so it's not something that involves migrations of data of anything like that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.