Giter VIP home page Giter VIP logo

nservicebus.nhibernate.samples's Introduction

NServiceBus.NHibernate.Samples

This repository contains samples that use NHibernate as its persistence for storing subscriptions, sagas and timeouts.

##VideoStore.Msmq

This sample implements the following workflow of a fictional video store and uses NHibernate as the persistence mechanism for storing the subscriptions, sagas and timeouts in the configured SqlServer database.

See this article for more information on how to configure NServiceBus to use relational database as the persistence model: http://particular.net/articles/relational-persistence-using-nhibernate---nservicebus-4.x

In this sample: Users can order videos from the website. Once orders are submitted, there is a window of time allocated for handling cancellations due to buyer's remorse. Once the order has been accepted, they are provisioned and made available for download. In implementing the above workflow various aspects are highlighted:

  • The Sales endpoint illustrates the use of the Saga pattern to handle the buyer's remorse scenario.
    The CustomerRelations endpoint illustrates how in-memory events (domain events pattern) can be defined and subscribed to.

  • The request/response pattern is illustrated for the video provisioning between the ContentManagement endpoint and the Operations Endpoint. The ECommerce endpoint is implemented as an ASP.NET MVC4 application which uses SignalR to show feedback to the user.

  • This sample also illustrates the use of Unobtrusive message conventions to let NServiceBus know in order to identify commands, events and messages defined as POCOs which avoids having to add a reference to the NServiceBus libraries in the message definition dlls.

  • The use of message headers and message mutator is also illustrated when the user clicks on the Check box on the ECommerce web page, which conveniently stops at the predefined breakpoints in the message handler code on the endpoints.

  • The use of encryption is illustrated by passing in the Credit Card number and the Expiration date from the ECommerce web site. The UnobtrusiveConventions defined in the ECommerce endpoint show how to treat certain properties as encrypted. Both the ECommerce and the Sales endpoint is setup for RijndaelEncryption and the encryption key is provided in the config file. If the messages are inspected in the queue, both the Credit Card number and the Expiration Date will show the encrypted values.

nservicebus.nhibernate.samples's People

Contributors

indualagarsamy avatar

Watchers

 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.