Coder Social home page Coder Social logo

zaz's Introduction

Zaz Command Endpoint

IMPORTANT : For now I am assuming that I am the only user of this lib, so contracts are changing without any notice or backward compatibility. If you are intersting in using this lib, let me know.

Simple HTTP Command Endpoint. Based on simple HTTP protocol. Very opinionated. Provides minimum configuaration, but maximum extensibility points. One of the goals is to have multiple clients like .NET client, PowerShell and JavaScript.

HTTP protocol is implemented with WCF Web API. JSON serialization provided by JSON.NET.

Features

  1. Send and Recieve commands over HTTP

Example

Client is simple (more details in SampleApp):

var bus = new CommandBus("http://localhost:9302/Commands/");            
bus.Post(new PrintMessage
			{
				Message = "Hello world"
			});

Server side (more details in SampleEasyRemoteApp):

// Global.asax
public class Global : HttpApplication
{
    protected void Application_Start(object sender, EventArgs e)
    {            
	    RouteTable.Routes.MapCommandsService("Commands");            
    }        
}

Installation

To install Client execute:

Install-Package ZazClient

To install Server execute:

Install-Package ZazServer

If you need other distribution, pls contact me.

Upgrade

In case if you have updated to the latest version you would have compilation errors. The following changes been introduced while upgraded the project to the new Web API.

Instead of routes based initialization

RouteTable.Routes.MapCommandsService("Commands",
    new ServerConfiguration
    {
        Registry = registry,
        Broker = new NventreeCommandBroker()
    });

New central initialization class been introduced

ZazServer.ConfigureAsWebHost("Commands", new ServerConfiguration
{
    Registry = registry,
    Broker = new NventreeCommandBroker()
});

License

Licensed under the MIT

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.