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.
Foreword
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.
DShop
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).
Source
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.
Tech
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.
Start
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).
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.
P.S.
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.
Pingback: .NET Core Microservices – DShop project - How to Code .NET
Pingback: Dew Drop - July 5, 2018 (#2759) - Morning Dew
Greate article! Looking forward to the continuation of the series. One request would be english subtitles on the video(s).
Pingback: The Morning Brew - Chris Alcock » The Morning Brew #2621
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?
Thanks!
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) :).
Awesome, can’t wait for the whole series !!!
Thanks!
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?
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 :).
Pingback: .NET Core Microservices – theory, DShop solution structure | Piotr Gankiewicz
Hi,
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.
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.
Hello,
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.
Piotr, it’s a huge contribution to the community, something that can’t be taken for granted.
Great job guys!
Thank you Alexander :).
You guys rock! Thanks for your effort of writing sample microservices repository. Love from Manila Philippines.
Thanks! The Philippines – would definitely like to visit someday :).
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!!
Pingback: Friday Five: MVPs with Fresh Insights on .NET Core and More! – Microsoft MVP Award Program Blog
Pingback: LAPS, Surface Peripherals, a GDPR Field Guide, an MVP Journey, and more on the Friday Five! – Microsoft MVP Award Program Blog
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!
Thanks!
Pingback: Distributed .NET Core – Teaser | Piotr Gankiewicz
Thanks for sharing
AVG software can be fixed by calling us at our AVG Customer Support Phone Number. Some of the most common issues in AVG antivirus are as given below:
Installation issues
http://www.incredimailcom.support/how-to-contact-incredimail-customer-support/
Just apply online Indian visa and go around the whole country where you want.
Wow superb. Do you have newsletter feed to follow up by email?
I appreciate you for sharing this article and it is really useful for everybody. I agree with all the segments that you were sharing in this article.
Canon Printer Support Phone Number
Canon Printer Support Phone Number
Canon Printer Support Number
Canon Printer Technical Support Number
Canon Printer Technical Support Phone Number
Canon Printer Technical Support
Canon Printer Tech Support Phone Number
Canon Support
Canon Priner Technical Support Number
Canon Priner Technical Support Phone Number
Canon Priner Technical Support Number
Canon Priner Tech Support Phone Number
Canon Priner Tech Support Number
Canon Printer Customer Support Number
Canon Printer Customer Support Number
Canon Printer Customer Helpline Number
Canon Printer Helpline Number
Canon Printer Helpline Number
Canon Printer Helpline Number
Canon Printer Helpline
Canon Printer Toll Free Number
Canon Printer Toll Free
Woah! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “ perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.
Buy Generic Medicine is an online store that offers medicines for customers at an affordable price.
We are providing Whatsapp Marketing Software for business marketing
purpose, Our Software helps to marketing your business through whatsapp.Whatsapp Marketing software is very fast tool for sending bulk whatsapp. Bulk Whatsapp marketing software is a tool to send whatsapp messaging very
fast and very effective way. By this software you can boost your business with very high. That helps to promote your business. Software Name is Q sender
HOme PAGE
Epson Printer Support Phone Number
Epson Printer Support Number
Epson Printer Customer Support Number
Epson Printer Customer Support Number
Epson Printer Technical Support
Epson Printer Tech Support Phone Number
Epson Support
Epson Printer Technical Support Number
Epson Printer Technical Support Number
Epson Printer Technical Support Phone Number
Epson Printer Tech Support Number
Epson Printer Tech Support Phone Number
Epson Printer Support Number
Epson Printer Support
Epson Printer Helpline Number
Epson Printer Customer Helpline Number
Epson Printer Customer Support Number
Epson Printer Customer Support Phone Number
Epson Printer Toll Free Number
Epson Printer TollFree Number
Woah! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “ perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.
Buy Generic Medicine is an online store that offers medicines for customers at an affordable price.
Buy soma 350 mg online
Buy soma pill online
Cheap soma medicine online
Soma pill online
That’s reorganization full of insight!
There are circumstances when users are not able to Magellan GPS Customer Service Phone Number and for all this, you don’t have to be concerned and right away take help from our team of specialist professionals.
HP EliteBook camera error code 0XA00F4244 by concerning with our technological expert team. We not just fix the exact kind of error but also contract with an extensive number of issues confined to HP EliteBook laptops.
Hello! This is my first visit to your blog! This is my first comment here, so I just wanted to give a quick shout out and say I genuinely enjoy reading your articles. Your blog provided us useful information. You have done an outstanding job.
Ultimate Odyssey Travel Joint Stock Company is a professional company possessing extensive knowledge, expertise and resources, specializing in the design and implementation of Vietnam Package Tours and Indochina Package Tours
An intelligent point of view, well expressed! Thanks!
While using the Canon, in such case feel free to contact us on our Error 5b00 canon ip2770 Printer anytime.
Hello! This is my first visit to your blog! This is my first comment here, so I just wanted to give a quick shout out and say I genuinely enjoy reading your articles. Your blog provided us useful information. You have done an outstanding job.
Ultimate Odyssey Travel Joint Stock Company is a professional company possessing extensive knowledge, expertise and resources, specializing in the design and implementation of Vietnam Package Tours and Indochina Package Tours.
HP ISPE is a suite of troubleshooting tools for desktop computing and printing products that includes instant support for your printers. These tools free you from time-consuming diagnostic chores so you can focus on more important business activities.HP Printer Helpline Number
Nice Blog, Excellent Thanks for sharing. HP Mono 1100a Technical Support Number is here to help you. If you want to solve by the HP Mono 1100a issue. Then here we give to the best outputs as the blog is very helpful and convenient for the users. In the same way, for more valuable help you may land a call at HP Mono 1100a Customer Support Number
If you feel any kind of insecurity and facing any kind of problem then use Yahoo customer service number and get instant help.
Avira Antivirus provides full security to the systems of the users. Sometimes Avira gives a lot of technical problems while using. We provide all your problems solution in our blog. For immediately help contact support team and get your queries solved.
http://www.avirasupporttech.com/blog/avira-technical-support/how-to-perform-manual-reinstallation-of-avira-antivirus-product-via-avira-phone-number/
If you are seeking help on Some of the Common Issues that are solved by How to Solve the Issue of MSN Hotmail Sign in Problems then here we are going to give the best outputs as the blogs are helpful & convenient for the users. In the same way, for more help you may call at Hotmail Technical Support Number
Nice and impressive blog, thanks for sharing. You can get complete solutions for the issues regarding Dell Support Customer Service Phone Number
Very Nice Blog, Incredible job Thanks for sharing. Quicken Customer Support Phone Number is here to help you. Visit our Website If you are facing any issue regarding Quicken then Take help from our Quicken Customer Support Phone Number
http://www.800contactnumber.com/pogo-games-support-phone-number/
Video post and get gain lot of knowledge from it keep up the good work sir
it’s a very informative blog thanks for sharing if you are encountering any issues related to Rand McNally like How to Rand McNally Truck GPS Update then in that situation visit our website and read this blog for instant solutions. http://www.randmcnallymapsupdate.com/how-to-rand-mcnally-truck-gps-update/
Nice blog thanks for sharing yahoo customer service number is here to help you if you are facing any issue regards yahoo customer service care. Then feel free and get in touch with our experts via yahoo customer support number.
Thanks a lot for the information.
canon printer support phone number
hp printer support number
epson printer support phone number
canon customer service phone number
epson printer customer service number
Do you have a newsletter to follow up by e-mail?
http://nggrandong.xyz/angka-mistik-togel-2019/
The Best Website In THE WORLD!
Poker88
Poker99
Poker88 asia
Mobapoker
Pokergolden
Freebet
Situs Judi Online
Cerita Sex
Nonton Anime
Thanks for sharing this valuable article. Yahoo customer service is here to help you when facing any issues regards yahoo customer service care. fell free and get in touch with our experts via yahoo customer care. For more info: http://www.mycustomersupports.com/yahoo-customer-support-number/
Clear, informative, simple post here
There are various problems facing Adobe products but don’t forget, you will be provided with proper Adobe Customer Care number and you will also find detailed information about other products of Adobe.
nebraska orthopaedic & sports medicine
miller orthopedics council bluffs ia
prosthetic orthotic center
hangers ortho
center for orthotics
sports rehab lincoln
central nebraska orthopedics grand island
Bedste frisør Frederiksberg. Vi er eksperter i mange slags hårskår, så giv en chance og få dit yndlingshår.
http://orthoshed.com/
http://orthoshed.com/product-category/allied-products/
http://orthoshed.com/product-category/body-belts-and-braces/
http://orthoshed.com/product-category/cervical-aids/
http://orthoshed.com/product-category/finger-splints/
http://orthoshed.com/product-category/fracture-aids/
http://orthoshed.com/product-category/neoprene-products/
Thanks for sharing information it is very helpful.
Canon Printer Support Number
Canon Printer is the best among the printers in the market. If you face any kind of issues in your printer and you are not whiling to go out to service center, we are here for you. Contact our Canon Printer Customer Support Number and get instant solution. We are available 24*7 for our valuable customers.
Canon Printer Support Number team.
Thanks for the topic its very informative. Avira is the best free antivirus in the current software industry.According to its usage, its users sometimes face weird issues like error code 556,12,45,550, to solve it you need to contact the support team. They will help you get your problem solved immediately.
Avira Support Number Avira Support Number
Hi…… thanks for sharing this article yahoo customer phone number is here to help you if you are facing any issue regarding yahoo customer service help number. Then feel free and get in touch with our experts via yahoo customer service number
India has many natural things, so you want to visit India then apply for online visa India. It is a very easy and instant way to get a visa.
For more help visit here:- https://www.e-visaindiaonline.com/e-tourist-visa-india-online.html
I reed your post and gain lot of knowledge keep up the good work and god bless for technical help for your devices come on this Website
http://www.800contactnumber.com/norton-antivirus-customer-support-number/
The country named India is its own gem. The beauty of India cannot be described in mere words. It resides in the expression of the faces of the people who are enjoying street food and making the weirdest faces. It resides in the grace of the dance forms in each state. To experience this, get your e-visa India today and get started with the procedure to come here.
e-Visa India
India e-Tourist visa
e-Visa India
apply Indian tourist e visa
e-Tourist visa
India tourist visa
Hi, thanks for the information. This is a very helpful post. Avira is the best Antivirus for Security of your pc, laptops, or tables from a harmful virus. Sometimes users face windows registry error code 7 on Avira antivirus. Visit our Blog and contact Avira Phone Number to get an instant solution.
delhi hospital
best orthopedic doctor in delhi
skin specialist doctor
neurologist in delhi ncr
best pediatric neurologist in delhi
best neurosurgeon
hair specialist in delhi
hair treatment in delhi
online doctor chat
eye specialist in gurgaon
heart specialist hospital in delhi
If you are getting any installation and setup issue on your HP account or Hp device. Finally call HP customer help number (+1)-877-771-7377 for top solution. Our HP Support Number is constantly reachable to help you and supply you with the best answer. So here are some common technical errors which HP user can face throughout the access. A couple of regular errors found in HP devices are listed below: HP Printer Support Phone Number
Nice and Effective Blog. Thanks for Sharing. For some quick solutions, you can also visit our website and get proper solutions for the process to UpdateHow Can You Fix Avast Error Code 7005?
Your blog is meaningful, I have read many other blogs, but your blog has hit me, I hope you will have more great blogs to share with readers.
Thanks for the topic its very informative.We are providing you the best solution regarding all kinds of printers related problems issues.Get instant printer technical support online and chat support with expert assistance in Florida. Visit Here:- Printer Customer Support Florida
I am extremely exceptionally grateful to you for furnishing with such brilliant online journals and articles. On the off chance that you need more data with respect to the printer you can likewise visit:Printer Customer Support and can resolve your printer disconnected or setup related issues effectively.
Prediksi Bola Idrbolaprediksi.stream Prediksi Jitu Dari Idrbola
Poker Online
title=” OVOQQ – Agen Poker Online Indonesia Terpercaya”/a>
Thanks for sharing such a useful post. Our toll-free number is accessible throughout the day and night for the customer if they face any technical issue in Printers.Printer Customer Support Ohio
Daftar dan dapatkan bonus dan jackpot terbesar, hinggah ratusan juta rupiah setiap harinya, hanya ada Di Royalflush88.com segerah daftarkan diri anda.
link alternatif poker online
daftar poker online terpercaya