Giter VIP home page Giter VIP logo

orleanseventjournal's Introduction

OrleansEventJournal

Simple calculator demonstrating a Web-based console & an Event Sourcing implementation for Project Orleans.

Repos without any explanation suck, so here goes.

This is a demo project, demonstrating some things which we've been developing.

Console

The first thing it shows is a Web-based terminal for Orleans. The idea is that you can perform arbitrary operations on actors. The console uses runtime code generation to create an efficient interface with the actor system.

In the console, type to <actor kind>/<actor id> to change scope to a new actor - tab-completion helps you discover the actor type names. The names are derived from the actor interface name, by default. Use the Actor attribute to override actor names. Only Guid ids are supported (i.e, actors deriving from IGrainWithGuidKey).

Once an actor has been set using the to command, use tab-completion to discover the actor methods. An example might be setDisplayName bob, which would correspond to a SetDisplayName(string name) method on an actor. Command names can be overridden using the (poorly named) Event attribute. Complex commands (which require JSON object, for example) can be input using the js mode.

The console POSTs command to a very basic "invoke" endpoint (ASP.NET Web API self-hosted via OWIN). The demo avoids authentication and authorization. That stuff has been implemented in our private code, but didn't apply to the demo. You can still see some auth code in console.js.

Event Sourcing

The other thing which we demonstrate here is a terse Event Sourcing API. The API is based around a single consumer-facing method with various overloads to handle async, etc:

protected Task Event(Action validate, Func<IActorInterface, Task> emit,  Action apply);

The event sourcing API is conceptually explained in this comment, where I've tried to clarify some misunderstandings and lay out the future plans.

orleanseventjournal's People

Contributors

attilah avatar reubenbond avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.