![]() The sequence diagram shows the order in which messages have been sent and handled by endpoints in the system.Īs endpoints are selected, the other views within ServiceInsight respond and filter the information to show only messages pertaining to the selected endpoint.Ī messages body is searchable only if the body size is under 85kB, under the ServiceControl/MaxBodySizeToStore size limit, and is a non-binary content type. The Saga view illustrates the start of a saga, the timeouts, and interactions. This view shows the flow in the system, which endpoints raised specific events, and sent or handled messages. The flow diagram provides a detailed visual overview of the messages, collated by conversation. Using information collected in ServiceControl, ServiceInsight enumerates the endpoints and provides detailed message and relationship data, with formatted views of XML, JSON, and binary messages. The ServiceInsight user interface provides multiple views of a distributed system. More detailed information, such as message headers and message metadata, is also shown. It's quicker and easier to spot anomalies and incorrect behavior in a system using message flow diagrams, sequence diagrams, and other visualizations provided by ServiceInsight. ![]() It provides advanced debugging, visualizations of messages flowing through the system, saga state changes, and more. ServiceInsight is a desktop application designed for developers. ![]() Before continuing, a quick disclaimer: Durable Functions are extremely new.This article is part of the NServiceBus Learning Path. This is just a few engineers throwing thoughts against the wall. Our position is guaranteed to evolve over time. There's definitely some similarities between durable functions and sagas. One big difference is that a durable function is a non-message-bound orchestrator for other functions or processes.Īfter all, an NServiceBus saga is essentially an NServiceBus message handler with durable state, and a durable function is an Azure Function with durable state. That means continuation of the durable function is driven by awaits, not by additional messages. You can trigger durable function continuations using external events but the mechanism is certainly less seamless than with NSB. You have to define a message handler and then raise the event. There is no nice way to find the running function like NSB does with Saga finding. So with durable functions you need to be careful that your orchestrator's implementation is deterministic. DateTime.Now, random numbers, Guids, etc. will get you into trouble! ()Ī Saga will typically focus on the interaction of one or two messages at a time. When thinking about a large process flowchart, one Saga will typically govern just the interactions at one point on the flowchart, not the entire process. On the other hand, with a durable function, it's easy to have an entire process represented as one durable orchestrator function that can call other functions. This is both a strength (easily seeing the big picture) and a weakness (lots of coupling, can grow very complex).Īdditionally, if you're trying to divide your system along service boundary lines (the vertical slices with independent databases mentioned in article) a giant orchestrator function covering an entire process flowchart makes this really difficult. This seems like another place where sub-orchestrations could come into play. Probably a better approach is to have a Durable Function simply drop messages on a queue which will trigger other functions which may or may not be durable. This provides the logical separation similar to what you'd get with a series of sagas in NSB.Ī Saga on the other hand is a kind of "policy" object which statefully handles a few interrelated messages. It is completely isolated in its own vertical slice, and can communicate with other vertical slices in a lightly-coupled manner by publishing events. The dangers of an all-encompassing durable function could be mitigated somewhat by doing all the real work in normal azure functions which are called from the orchestrator, and having the durable function be very lightweight, but this is a bit of a slippery slope. Speaking of calling other functions, to do that you use the DurableOrchestrationContext's CallActivityAsync("FunctionName"). ![]() This requires the use of "magic strings" for the function names, definitely not refactoring-friendly. This is a limitation I've called out on twitter and in my durable functions talks. There are a few hacks you can use like leaning on nameof but they're not satisfactory. I've been working on a Roslyn Analyzer which will detect incorrect names, wrong parameters and broken return types. This is an addon nuget package, though, and not something that comes out of the box (unless I can convince the team to include it in the template). ![]()
0 Comments
Leave a Reply. |