GithubHelp home page GithubHelp logo

mikaelo / eventdriventhroughcloudyskies Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joaofbantunes/eventdriventhroughcloudyskies

0.0 0.0 0.0 373 KB

Event-driven through cloudy skies

License: MIT License

C# 94.35% HTML 5.65%

eventdriventhroughcloudyskies's Introduction

Event-driven through cloudy skies

Repository for the presentation "Event-driven through cloudy skies".

NOTE: it should go without saying that the provided sample code is not production ready.

About the solution

The solution is comprised of 4 projects

  • StoreFront - web application that allows for the creation, delivery or cancellation of orders. Performing these actions will result in events being published.
  • Operations - Subscribes to order events, applying a (tremendously oversimplified) kind of streaming logic, to act upon the way the store is working.
  • Rewards - Subscribes to order events in order to keep the information about customers purchases updated (eventual consistency), using that information to attribute rewards to loyal customers.
  • Events - Contains the events that are used in the solution. Also contains interfaces (and implementations) for publishing and subscribing to events.

Again, don't take this structure as something particularly thought out, it's just a relatively simple way to see things in action.

Main topics

The main topics to be observed in this solution are:

  • Loose coupling by integrating through events
  • Outbox pattern to ensure at least once delivery
  • Event stream analysis (even if very over-simplified)
  • Eventual consistency
  • Idempotency, by ensuring the same event isn't handled multiple times

Running in Azure

  • Create a resource group:
az group create --name YourResourceGroupName --location westeurope
  • Deploy ARM template
az deployment group create --resource-group YourResourceGroupName --name YourResources --template-file infrastructure/azure-deploy.json --parameters administratorLoginPassword="YourPassword"
  • Deploy web applications

(see GitHub Actions deploy workflow)

Running locally

In the root of the solution, there's a Docker Compose file to spin up the necessary dependencies, which are SQL Server and Kafka.

Then the projects can be run as usual from Visual Studio, JetBrains Rider, .NET CLI, etc.

eventdriventhroughcloudyskies's People

Contributors

joaofbantunes 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.