The particular service platform – Service and event publisher

In my last post I gave an overview about the problem domain we are going to tackle with ServiceMatrix called R.I.P.D. In this blogpost I want to build that crazy sample from the ground up. So let’s do it! In my blogposts about CompositeUI for Service Oriented Systems I called about services or “things”. I don’t cover that theory here. I encourage you to read those blogposts. On the canvas of ServiceMatrix we can first create a new service and give it a proper name. Because we are building the Rest In Peace Department I chose to design that department as a service itself.

ServiceMatrix6
ServiceMatrix7

After having created the service we’ll build the PoliceOfficerDied event. Just click on the service and choose Publish Event.

ServiceMatrix8

We assign the event the PolicerOfficerDied event name and create it by clicking “Done”.  But defining an event without an event publisher wouldn’t make any sense. That’s why ServiceMatrix just creates one for us!

ServiceMatrix9

Because I want to give it a more meaningful name than the name derived by convention I can hit “F2” and rename the sender.

ServiceMatrix10

Beautiful how we use Domain Driven Design. WarehouseRaid, I just love it and everyone who watched the movie automatically knows the context.

ServiceMatrix11

But of course we need to fill out the necessary properties on the newly created event type. Nothing easier than that! We can click on the event type and choose View Code.

ServiceMatrix12

ServiceMatrix let’s us type in normal C# code as we like. We can also use our loved Refactoring Tools such as Resharper directly in that Code window. Deep integration in Visual Studio and your normal developer workflow makes mixing code and visual drag&drop design of your distributed system a breeze. That’s it for today. The next post will cover how to deploy the publisher to an endpoint and how to wire the publisher with a subscriber. Stay particularly tuned.

About the author

Daniel Marbach

1 comment

By Daniel Marbach

Recent Posts