Giter VIP home page Giter VIP logo

eventbroker's Introduction

!!!! NOTE: THIS IS THE OLD VERSION !!!! The repository was split into a repository per component. Please see the repositories in www.github.com/appccelerate.

Accelerate your .Net application development.

For whom it is

For software engineers who want to build flexible, extensible and maintainable software systems, Appccelerate is an open source library of software components that makes building multi-threaded, event-based and loosely coupled systems easy. Unlike other open or closed source solutions we offer proven concepts that are used in our real world projects.

What it contains

  • Bootstrapper for starting and stopping applications
  • State Machine for building finite state machines with a fluent definition syntax
  • Event Broker for synchronous and asynchronous notifications
  • IO Abstraction for testability of operations interacting with the file system
  • Evaluation Engine for evaluating results based on aggregators and expressions with support for hierarchies and plug-ins

and much more...

Documentation

You can find the documentation at www.appccelerate.com

Your Appccelerate team

eventbroker's People

Contributors

michaelestermann avatar ursenzler avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eventbroker's Issues

Package available for .NET 4.0?

Sorry for using the issue tracker to ask a question :( Do you have a version compiled for .NET 4.0 or ist 4.5 the minimum requirement for the EventBroker?

Regards,

Christian

request / response setup

Hi,

great product, let me start with that! I was wondering if you ever though about some kind of request / response for the library also? Which doesn't have to be async. In my software i have a plugin setup. So if a plugin needs something it will now just do a settings request and plugins that are attached to that event will check if they have got data for the requested setting and respond to it. It would be great if i could somehow create such a system with the event broker.

Regards,

Per

Request to have version of assembly included in Publication/Subscription DescribeTo

Hello Urs/Appccelerate team,

I hope things are well with you all.

I have a small request that would help us out in our product quite a bit. What we would like is to include the assembly version in the Publication/Subscription DescribeTo output.

Our issue is that in our product we often have multiple versions of assemblies loaded in memory and when we get an subscription/publication error such as:

2016-07-11 13:58:57.0974 (431) Error 5775 [EventBroker] Error registering instance Connexion.Device.CustomDevice with the EventBroker. Event Hooks will not function properly for this instance. [EventTopicException] Publication
MModal.FluencyForCoding.Integration.ConnexionDevice.R14.EncounterFilerDevice.EncounterFilerDevice, Event = BeforeClinicalDataStoreCommitHandler, matchers = , EventHandler type = System.EventHandler<MModal.FluencyForCoding.Integration.ConnexionDevice.R14.EncounterFilerDevice.ClinicalDataStoreCommitEventArgs>
does not match with subscription
Connexion.Device.CustomDevice, Handler method = OnBeforeClinicalDataStoreCommit, Handler = Appccelerate.EventBroker.Handlers.OnPublisher, EventArgs type = MModal.FluencyForCoding.Integration.ConnexionDevice.R14.EncounterFilerDevice.ClinicalDataStoreCommitEventArgs, matchers =

It hard to tell, but the actual issue is that in ThrowIfPublisherAndSubscriberEventArgumentsMismatch

The publication and subscription are from 2 different assemblies. This error is difficult to track down because everything looks ok from the DescribeTo information. As such if you could add the version of each EventArgsType in the respective DescribeTo, that would be very helpful. For example in Publish.DescribeTo I have added the last 2 lines of code

public virtual void DescribeTo(TextWriter writer)
{
Ensure.ArgumentNotNull(writer, "writer");

        if (!this.publisher.IsAlive)
        {
            return;
        }

        writer.Write(this.Publisher.GetType().FullNameToString());
        writer.Write(" ");
        writer.Write(this.Publisher.GetType().Assembly.GetName().Version);

Otherwise, this could be done in ThrowIfPublisherAndSubscriberEventArgumentsMismatch. Something like:

    private static void ThrowIfPublisherAndSubscriberEventArgumentsMismatch(ISubscription subscription, IPublication publication)
    {
        Type publisherEventArgsType = publication.EventArgsType;
        Type subscriberEventArgsType = subscription.EventArgsType;

        // check that the T in EventHandler<T> is matching, the IsAssignableFrom method return false event if types can be assigned
        // e.g. EventHandler<CustomEventArgs> is not assignable to EventHandler<EventArgs> when using IsAssignableFrom directly on event handler type
        // therefore do the check on the event arguments type only.
        // subscriberEventArgsType can be null if the handler method has no parameters.
        if (subscriberEventArgsType != null && !subscriberEventArgsType.IsAssignableFrom(publisherEventArgsType))
        {
            using (var writer = new StringWriter(CultureInfo.InvariantCulture))
            {
                if (publisherEventArgsType.Assembly != subscriberEventArgsType.Assembly)
                {
                  writer.Write("Publisher and Subscriber come from different assemblies. Publisher=");
                  writer.Write(publication.EventArgsType.AssemblyQualifiedName);
                  writer.Write("Subscriber=");
                  writer.Write(subscription.EventArgsType);
                }

Or, perhaps add a hook that I can get notified of the error and provide more details myself.

Thank you in advance for any consideration on this.

Jonathan

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.