.NET Core Microservices – DShop

It’s been a while since I published the latest article, but it’s high time to finally get into the topic of microservices for real. Does open source, .NET Core, distributed system, Docker and other cool words sound good to you? If that’s the case, stick with me and let me guide you through the world (or at least part of it) of microservices. This is going to be the very first article (an introduction) of the upcoming series.



A few months ago, I had an idea to publish a detailed course about implementing microservices in .NET Core. It turned out, that a friend of mine, Darek, thought of a similar concept – so we teamed up, created the distributed application (available on GitHub) and gave a few lectures (close to 10) during IT events and conferences, here in Poland. The idea of the recording a video course is still there (and sooner or later, it will be published), yet for now, we need to polish some remaining bits of the application.

Nevertheless, whether you are a microservice expert or beginner, read a book published by Microsoft and studied the eShopOnContainers repository (or not), let me introduce you the DShop (Distributed Shop), a brand new solution, containing over 15 repositories, including API Gateway + 8 microservices written totally from the scratch using the latest version of ASP.NET Core (2.1.1), hopefully, a starting point for some of you, who wanted to get into the world of microservices hype but had no idea where to start, or got stuck somewhere during the journey.


As before mentioned, DShop stands for an acronym of Distributed Shop, simple as that.
Why another online shop? For a single reason – this domain is usually understood by all of the people (including developers) at least at its very basic level – products, shopping carts, orders etc. If you’re into the world of DDD, these are also pretty good bounded contexts, that can be treated as separate microservices. And trust me – we (Piotr and Darek, the core developers behind the project) made everything as simple as possible (besides some generic reflection magic and other quirks), so you should be able to understand quite fast what’s going on, simply by looking at the domain models or application services (handlers).


The whole idea behind DShop was to make it for you – the programmers, so that you can take a look at the code, play with it, validate your own ideas, copy our code and use it in your own projects, or point out our mistakes – whatever makes you a better software developers and provide the valuable content. Thus, you can download the whole source code from GitHub, just keep in mind that we update the repositories from time to time, fix bugs, refactor the code and extend some features – it’s an ongoing project.


One of our goals was to make the solution agnostic from cloud providers that offer some special services (e.g. Azure Service Bus or AWS Lambda). Basically, you can run DShop anywhere – on local machine, private server or in any cloud. Let’s have a glimpse, what technologies and tools are being used to make it work:

  • .NET Core – API Gateway and all microservices are written in C# and ASP.NET Core (2.1.1)
  • RabbitMQ – one of the most popular message buses out there and RawRabbit as client library
  • MongoDB – NoSQL databse to store the services data
  • Redis – extremely fast caching server, an ideal choice for distributed systems
  • Docker – containers are everywhere, so Dockerfile for each service and Docker compose on top of it
  • Travis CI – build service, free to use for open source projects hosted on GitHub
  • Docker Hub – Docker images repository, where DShop images are being published
  • Rancher – enterprise management for Kubernetes, open source and easy to use

There are of course some other tools or libraries being used e.g. Angular 6 for the web application (not finished yet), but let’s leave it for now, we’ll talk about them in the next posts.


Each project has its own repository. We’ll discuss the solution structure in the upcoming articles, but these are the most important projects (besides the bash scripts, that were simply copied from the base DNC-DShop repository).

DShop projects

DShop projects

In order to start DShop you need to have RabbitMQ, MongoDB, and Redis up and running (not to mention the latest version of .NET Core SDK). You can also easily start these through Docker – just take a look at the following script.

Once the required services are available, you can start either one by one or via Docker all of the microservices (projects named DShop.Services.Xyz, a total number of 8) and the API Gateway (DShop.Api). You can also make use of this script that loops through each repository and starts the project – just keep in mind to put that into the root directory, where the remaining projects are (as shown on the screen above).

Assuming that everything is up and running, you shall find the DShop.rest file that uses REST Client extension for the VS Code – give it a try and send a few HTTP requests to the API.

That being said, I encourage you to explore the source code and play with it. Stay tuned, as in the next posts we’ll go through the particular microservices implementation, talk about the distributed systems pros & cons and many, many other concepts that sometimes are not clearly visible at the first glance.

Oh, and finally – check out the DevMentors.io and subscribe to our social media channels, if you want to know once the video course will be completed.


If you know Polish, take a look at the following video that was recorded quite recently – here, we talk about the DShop and core aspects of microservices.

87 Comments .NET Core Microservices – DShop

  1. Pingback: .NET Core Microservices – DShop project - How to Code .NET

  2. Pingback: Dew Drop - July 5, 2018 (#2759) - Morning Dew

  3. tonymk

    Greate article! Looking forward to the continuation of the series. One request would be english subtitles on the video(s).

  4. Pingback: The Morning Brew - Chris Alcock » The Morning Brew #2621

  5. Karthick Thoppe

    Good one; the Devil is in the details, will take a look at the code. Is Polyglot aspect of the Microservices in your agenda for the future articles? Also, can anyone contribute to your DShop project or is it purely for demo purposes & showcase?


    1. Piotr Gankiewicz

      I used to implement services in different technologies, however, in DShop, we wanted to focus purely on .NET Core. Speaking of contribution – feel free to submit any PRs, just please keep in mind that eventually, we are going to record video course about it, thus we’d like to introduce rather small adjustments (at least for now) :).

  6. Radek Maziarka

    Thanks Piotrek for this great series of articles and repositories!

    I have a question regarding user authorization – how would you handle sharing user context between services? For example – we are removing user XYZ from Admin role by running an action in Identity service. How would other services know that this action took place?

    1. Piotr Gankiewicz

      Hi Radek, thanks!

      It really depends on what’s the end goal – if other services really have to be aware of such behavior, Identity Service could simply publish an event such as ‘UserRoleChanged’. Sharing user context – again, this can be done via ICorrelationContext (which contains UserId property) being a metadata type attached to all of the messages that are being published. Nevertheless, since the API is responsible for dispatching the actions properly and ensuring that user has required claims there’s rarely a need to share such information :).

  7. Pingback: .NET Core Microservices – theory, DShop solution structure | Piotr Gankiewicz

  8. Asad


    If you are going for micro service than each service should be a decouple components and should have its own UI as well . In your article there is no UI composition. If you modify your UI because a micro service changed than you need to test all of your UI which means you are testing all the micro services, second you are taking about gateway pattern, it means if you add and modify your micro service’s contract than you need to modify or deploy your gateway as well. You are not splitting monolithic application vertically and going for horizontally which I think is not a good approach.

    1. Piotr Gankiewicz

      I disagree, why would each microservice have its own UI? It doesn’t make much sense – you create a single API Gateway and then a special application on top of that (mobile, web, desktop) that communicates only with this API. Microservices should be kept internally.

    2. Mohit Munjal

      What we can do is we can create Angular elements based on micro services and use them but overall the use case is almost same.

  9. Pedro

    You guys rock! Thanks for your effort of writing sample microservices repository. Love from Manila Philippines.

  10. Nehmia

    This is just amazing. I have been looking for a complete distributed sample application using .NET Core, Angular 6, Docker and Kubernetes. I tried to go through the Polish video overview, eventhough I don’t understand Polish at all, just to see the architecture diagram. One thing I would like to ask is why it was needed to go through two handlers for create/update commands. From the video I saw that the Gateway ‘Create’ API publishes to Product Handler and then this handler published to Product Storage Handler to call repository to create the Product. Couldn’t the API directly publish to the Storage Handler by passing the Product Handler? Because for GET requests, we’re directly calling the Storage Service from the API. Just wanted clarification on this since I might have misunderstood the architecture.

    I can’t wait for the English version of this.

    Thank you!!

  11. Pingback: Friday Five: MVPs with Fresh Insights on .NET Core and More! – Microsoft MVP Award Program Blog

  12. Pingback: LAPS, Surface Peripherals, a GDPR Field Guide, an MVP Journey, and more on the Friday Five! – Microsoft MVP Award Program Blog

  13. Dragon

    Is really good help for me .I have been looking for the article of Microservice,but most of them are not helpless,untill I read the RawRabbit in somewhere,so I feel find it!

  14. Pingback: Distributed .NET Core – Teaser | Piotr Gankiewicz

  15. hp canada

    Dshop is a project of .NET which is very nicely explained in this blog about the whole process of D shop using Core Microservices. This is very effective for the .NET programmers.

  16. hp canada

    Dshop is a project of .NET which is very nicely explained in this blog about the whole process of Dshop using Core Microservices. This is very effective for the .NET programmers.

  17. Facebook customer service number

    Facebook provides the best conversation features such as Video calling, voice call, and chat. If you have the Facebook account then you can easily use these services. In case, you face some technical problems while using these Facebook services.

  18. HP Printer Support

    HP brand is one of the most usable brands in the world. User buys HP laptop, desktop, and printers and sometimes a technical issue occurs in your HP device. Don’t worry, an HP support expert are sat there to provide you HP support

  19. dialprintersupport

    We all live in a modern era, where technology has taken its entire place. Technology has made many lives easier and organized. There are numerous numbers of devices which are available in the market such as Desktops, Mobile Phones, Cameras, Laptops, Scanners and Printers. All these devices have made our life easier and let us connect to any part of the world within the time fraction.


    HP devices. Be it any question or any technical glitches, we’ve the simplest school specialists to assist you out with the problems. we have a tendency to skillful in breakdown any issue you may be facing along with your HP merchandise like laptops, printers, tablets, scanners, Omen, Envy, Omni book, Probook, Chromebook, Notebook different HP devices HP Tech Support

  21. Hasilbertapa

    I ‘d mention that we site visitors are extremely lucky to live in a fantastic community with very many awesome people with interesting principles. I feel very happy to have seen your weblog and look forward to some more cool moments reading here. Thanks once again for all the details.

  22. Sara Manuel

    HP brand is one of the most usable brands in the world.HP devices. Be it any question or any technical glitches, we’ve the simplest school specialists to assist you out with the problems.

  23. Apple support phone number

    As we know today’s era is a digital era where people like to be in touch through a digital medium there are many social media platforms are available like facebook Instagram LinkedIn twitter with the help of which two people can interact with each other without making or seeing each other physically or if we talk about skype or video calling so through that medium we can even see each other while both the person are far away from each other

  24. dialprintersupport

    I ‘d mention that we site visitors are extremely lucky to live in a fantastic community .If you need any kind of technical support for Canon Printer whether it is regarding setup installation or driver issues you are free to call at Canon Printer customer support number that stays available 24 7 for your assistance. Canon Printer Technical Support

  25. kaspersky support number

    A micro service is a software development technique—a variant of the service-oriented architecture architectural style that structures an application as a collection of loosely coupled services. In a micro services architecture, services are fine-grained and the protocols are lightweight.

  26. jonnmm

    Online Pharmacy Pills is a online medicine store where you can buy soma 500mg to over come the issue of muscle pain and discomfort. It works by helping to relax the muscles.

    if you are looking for free shipping all over USA for soma pills 500 mg and soma pills 350 mg then you have no need to wait and order from online pharmacy pills. Online pharmacy pills is a trust worthy online store.

    For better Living we have a best and fast relief from pain in muscles so you can buy soma pills 500 mh from your home we are shipping order at your with free shipping.

    if you want To buy soma pills from trusted online store, online pharmacy pills must be your first choice because online pharmacy pills providing free shipping on soma pills, tramadol, provigil etc.

  27. jonnmm

    if you are looking for free shipping all over USA for soma pills 500 mg and soma pills 350 mg then you have no need to wait and order from online pharmacy pills. Online pharmacy pills is a trust worthy online store.

  28. Brother printer support

    Brother Printer Support is a one stop solution for printer services. We are proud of delivering instant and highly effective services at any hour of day and also the issue is being rectified as well as corrected in real time right in front of you. We are available 24×7 at +1-888-621-0339.

    Brother Printer Support

  29. Factory reset Hp laptop

    Hello, introduction to developing micro services-based applications and managing them using containers. It discusses architectural design and implementation approaches using .NET Core and Docker containers.if you want any help regrading factory reset hp laptop you can visit our site .

  30. Safe Milli

    This is really awesome, am so glad to read this informative article. I must confess this one of the exceptional blog that I have ever come across. Keep sharing this kind of information to users.

    I’m a freelancer by profession, incase you may need a professional writing service, here is one of my articles:
    Quick tips on Email marketing tips

  31. jonsmith

    Online Pharmacy click here Pills is a very user friendly online medication shop. Our team is constantly working to

    give our customer best service. Total fourteen types of medicines for three different problems like pain, erectile dysfunction and cognitive enhancement. Our mission

    is to make medicines discover-able, affordable and understandable.So that you can know about online pharmacy pills. You can shop for all your medicines that you need

    from the comfort of your home or office.

    Online Pharmacy Pills is the best place to order your remedial drugs at affordable cost.Online Pharmacy Pills is the best place to order your remedial drugs at

    affordable cost.

  32. kindle paperwhite registration

    it is also the only way to get in touch with them. The next best way to talk to their customer support team, according to other Kindle customers, is by telling GetHuman about your issue above and letting us find somebody to help you.

  33. Saim Thomus

    the article is so amazing but do you have any idea about the why should we use .net core .NET Core is an extraordinary improvement device for some, reasons, including that it’s open source and is exceptionally useful in growing elite and versatile frameworks. It bolsters cross-stage runtime, so in the event that you make an administration utilizing .NET Core, it very well may be kept running on any stage. .NET Core is likewise useful for quicker improvement, and also supporting inherent reliance infusion and a cloud-based condition arrangement. .NET Core likewise has Docker bolster, however, take note of that it doesn’t bolster SQL Server Version 2005. Telstra Phone Contact

  34. register kindle fire

    It’s not always clear what is the best way to talk to Kindle representatives, so we started compiling this information built from suggestions from the customer community. Please keep sharing your experiences so we can continue to improve this free resource.

  35. dialprintersupport

    HP Printer Technical Support is a repair service organization available across the globe. This team of technical experts are a pro in dealing with all you HP printer issues. Call Us for help or suggestions on HP Printer Technical Support number which is toll-free-1888-621-0339.

  36. Biber

    canon printer support
    Canon Printer Support +1-855-924-4222 available 9 am to 6pm as per PST. In Canon Tech Support highly certified and trained engineers are working. Specially trained to handle any sort of canon printing hardware or software problem. Canon printer provides remotely assistance.
    Canon Printer support

  37. Felix

    Some of the basic issue fixed by Aol email Technical support Phone number -1-855-924-4222 are:
    Fix aol gold browser errors.
    Help in password recovery.
    Helping to create new account.
    Instructions to change account credential.
    Sign in
    Account locked up.
    aol email support phone number

  38. Ronnie

    Things to remember while calling AOL Email Customer Support+1-855-924-4222
    Acount holder needed to authorize the call.
    Make sure secret question which were filled while making account.
    Find the right AOL Email Customer Support from bing or google any search engine.
    aol email customer support

  39. maya

    Some people reported a purple or blue haze around the edges of the Kindle Fire HDX screen, which is particularly noticeable when the background is white. It seems to vary in intensity on different devices.

  40. MANISH

    When the HP Envy 4520 printer says offline in windows 10 because printer wireless system is not working properly or there might be computer related issues.

  41. ALexaBeth

    Great Information and nice your posting Thanks! Please look at my blog.
    Global Online Pills Global Online Pills is Word’s No. 1 Trusted Website to buy

    online Prescription Drugs. One Place for all of your Medicines needs. we provide 100% Genuine Medicines at Cheap Rate.

    wherever you stay you can buy medicines from your home.

  42. agam bhatnagar

    Netgear Genie has become an inevitable part of every tech savvy’s life. As important is the internet for us, so is its maintenance. Imagine a world where the internet is not working and one is denied access to emails, Google and other apps. Hence, it is imperative to maintain the connection and monitor it constantly. This app offers a dashboard that aids in monitoring and repairing any kinds of problems related to networking. And the best part is that one can do it remotely by connecting smartphone or tablet.

  43. Avg Support phone number

    AVG antivirus. Some of the main features of AVG antivirus software are as given below:

    Provides safety from harmful and suspicious web pages
    Provides protection from such emails that contains malware or other security threats
    Auto scanning to protect your computer


Leave A Comment

Your email address will not be published. Required fields are marked *