3 ms·
I've been trying to build real systems with Microsoft's Durable Functions. I've been utterly fascinated by the patterns that have emerged on some of them.
by withinboredom 7y ago
I've been trying to build real systems with Microsoft's Durable Functions. I've been utterly fascinated by the patterns that have emerged on some of them.
- w3mmpp 7y agoWhat are those patterns? I've used Azure functions a lot but never had (I think) a use case for durable ones.
- withinboredom 7y agoI’ve come up with the following: Watchdog Pattern: A orchestration needs to succeed. A watchdog entity checks up on it to make sure that failures are reported and dealt with appropriately (ie, refunding a payment if it fails catastrophically) Circuit Breakers: Polly has their own implementation, but I found it easy enough to implement my own (don’t recommend in production, just use Polly) No database: it’s a bit slow to get things done, but it’s amazing to create entities that don’t need to store state in a database. Paired with the watch dog pattern or preloading, you can have entities running “in memory” which may be faster than a dB lookup or the data could be projected to a db for analysis. I’ve been exploring this most recently. Aggregate entities: these just count things, or store references to important entities that they count. This works amazingly well instead of COUNT DISTINCT queries.