GithubHelp home page GithubHelp logo

rbanks54 / microcafe Goto Github PK

View Code? Open in Web Editor NEW
119.0 23.0 50.0 3.88 MB

Sample code to show microservices using NET, in the context of a cafe

C# 16.15% PowerShell 2.69% CSS 17.26% JavaScript 57.24% ASP 0.01% HTML 6.65%

microcafe's Introduction

Build Status

Build Status

Micro Cafe

Sample code to show microservices using NET, in the context of a cafe

Code should be used for inspiration, not duplication.

The code here is currently a work in progress. The admin microservice is functional, but the cashier and barista services are not finished and don't compile. I'm happy to take a pull request :-)

##Slides

If you're interested in the slides related to this code, they're on SlideShare

P.S. I'm hacking around with making a .NET Core, Dockerised version of this sample code as well. Stay tuned (or submit a pull request if you can't wait for it)

microcafe's People

Contributors

rbanks54 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

microcafe's Issues

Port to .NET Core

(replacing #3)
Now that VS2017 is RTM, it's time to move this to .NET core.

Also, given https://github.com/gautema/cqrslite is a framework based on the same fundamentals that this code uses we'll move across to that and make this code more about the services themselves and less about the plumbing.

Snapshotting with event store

In the domain services, to avoid long rebuilds of model state show how snapshotting can be used.

For the sample we might do snapshotting at every 5 events.

Discovery service

Even though it's not really needed because there's so few services, add a discovery service to show how it works.

Consul.io and Microphone, for example

Improve the UI

Make the UI more dashboard-y so we can show how different read models and domain services can be fronted by an API gateway, and how a single page can be rendered using data from different contexts.

.NET Core, Linux and Docker

Port code to .NET core, deploy to Linux based containers.
Use dockerised versions of RabbitMq and Redis as well

Problem running powershell scripts, such as

Hi,

Thanks ahead of time for any help. This is not a microcafe issue per se, but I'm new to powershell and receive the errors below when invoking the .ps1 scripts from a PS cmd line.

When running the Build-Microservices.ps1 (after invoking powershell via command line), received the following error message (which is probably due to the powershell setup on my machine):

`Import-Module : The specified module '\Invoke-MsBuild.psm1' was not loaded because no valid module
file was found in any module directory.
At D:\dev\projects\aspnet_core_akka_net\microcafe\Build-MicroServices.ps1:4 char:14

  • Import-Module <<<< -Name "$PSScriptRoot\Invoke-MsBuild.psm1"
    • CategoryInfo : ResourceUnavailable: (\Invoke-MsBuild.psm1:String) [Import-Module],
      FileNotFoundException
    • FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCom
      mand

Import-Module : The specified module '\Invoke-NuGetPackageRestore.psm1' was not loaded because no valid module file was found in any module directory.
At D:\dev\projects\aspnet_core_akka_net\microcafe\Build-MicroServices.ps1:5 char:14

  • Import-Module <<<< -Name "$PSScriptRoot\Invoke-NuGetPackageRestore.psm1"
    • CategoryInfo : ResourceUnavailable: (\Invoke-NuGetPackageRestore.psm1:String) [Impo
      rt-Module], FileNotFoundException
    • FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCom
      mand

Method invocation failed because [System.Object[]] doesn't contain a method named 'IndexOf'.
At D:\dev\projects\aspnet_core_akka_net\microcafe\Build-MicroServices.ps1:54 char:82

  • $success = BuildSolution $solution.Path $solution.Solution $solutions.IndexOf <<<< ($solution
    

) $solutions.Length
+ CategoryInfo : InvalidOperation: (IndexOf:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
`

Topshelf process not really quitting

Hi,

What could be done in order for the command window to close when the Topshelf service is disposed? I'm not able to find any information on that in the Topshelf documentation. Say, the "Admin.Service.exe" is running, I want to stop it, so I go to the window hosting it and press CTRL+C. This shuts down the service, but the executable is still running (e.g. I can see it in Task Manager). How can I avoid that?

Thanks! And great project, it gave me lots of insight on microservices in .Net.

Run services in windows containers (docker)

Instead of running the services as a number of self-hosted console apps, get them running in containers.

For this one, I want to target Windows Containers using nanoserver as the base image, running on Windows 10 (anniversary update required).

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.