Creating Microservices with NServiceBus, Docker, and .NET Core

By Mike Sigsworth

Elevator Pitch

I will walk the audience through the steps required to create scalable and independent microservices using NServiceBus, .NET Core, and Docker. Audience members will leave with a greater understanding of message driven architecture as well as the many powerful features provided by NServiceBus.

Description

What did the REST API say to the microservice? 500 Internal Server Error (pause for laughter)

Despite that being the single greatest joke ever told, I’m sure you won’t be laughing the next time it happens to you.

So how do you handle this situation? Do you throw an exception? Throw your hands up and rollback the transaction? Or, maybe you should retry the call? But then, how many times do you retry? What if the other service is down for like 10 minutes? What then? What if you don’t even control the other service?

If only your services weren’t so tightly coupled! If only you weren’t using REST to communicate between services!! There must be a better way!!!

Hi, I’m Troy McL…err, Mike Sigsworth. You may remember me from such classics as Writing Chatbots with F# and Azure Functions, or How to Build a Todo List App With the Latest JavaScript Framework, or that one Stack Overflow answer I have with over 100 points.

I’m here to tell you that there is a better way. Start writing your microservices today using NServiceBus to quickly and easily leverage the power of Event Driven Architecture. What if I told you that you’d never have to write another try-catch block ever again? Or that you could quickly and easily configure automatic retries to continuously call a failed remote resource over minutes, hours, or even days. What if I told you that Sagas are the one true way to enlightened business logic?

Writing scalable and independent microservices using NServiceBus is easy. Hosting your services on Linux containers using .NET Core and Docker is even easier! Come see what all this awesomeness is about! You’ll never look at REST the same way again.

Notes

I have been working with NServiceBus for the better part of the last 2 years. I’ve helped create and maintain a large distributed system spanning dozens of microservices. For the last several months we have been migrating all of our services to .NET Core and containerizing the whole lot. We’ve recently dived into the complexities of getting this whole mess to run in Kubernetes on AWS. It is no small task. But one thing’s for sure. NServiceBus takes a lot of the headache out of managing a distributed system like this. I want to enlighten people about this great framework, and show them how they can use it, along with modern development tools and the cutting edge .NET Core framework to build new systems, and migrate from old ones.