HNHacker News
TopNewBestAskShowJobs

marcduiker

3 karma · joined January 11, 2022

submissionscomments
marcduiker··on Understanding the Dapr Workflow engine and authoring workflows as code
Dapr, the open-source CNCF project that accelerates microservice development, has a new building block API that enables you to author and run resilient and long-running workflows. I’ve written this blog post to explain how the workflow engine works, and to show how to author a workflow as code using C#. Other workflow authoring languages will become available with new Dapr releases this year.
marcduiker··on Show HN: Serverless Pizza Workflow Visualizer
Thanks! Each visitor sees their own order. The channel is based on the orderId so each visitor has a dedicated channel for their order.

I do plan to extend this demo and create a dashboard for the kitchen that shows all orders coming in.

marcduiker··on Show HN: Serverless Pizza Workflow Visualizer
I'm the creator of this silly visualizer (created the pixelart myself!). It's an example of how to create a realtime dashboard to visualize the progress of a serverless workflow.

Tech stack:

- Azure Static Web Apps that hosts a VueJS web app.

- Azure Function App that uses Durable Functions for the workflow.

- Ably (WebSockets as a Service) for pubsub messaging from the back-end to the front-end.

More info in this blog post: https://ably.com/blog/visualize-azure-serverless-workflow-pr...

marcduiker··on Using Serverless WebSockets and Azure Functions to create realtime experiences
No, since the functions are short-lived it doesn't add much value to setup a WebSocket connection. You could choose for the premium tier or even a full AppService tier for Azure Functions and then you do have instances that are staying alive. But in my opinion that makes it less serverless.
marcduiker··on Using Serverless WebSockets and Azure Functions to create realtime experiences
Yes, the Ably REST API is used within the Azure Functions to publish a message. The Ably platform then uses WebSocket connections to the connected player devices to deliver the messages.
marcduiker··on Using Serverless WebSockets and Azure Functions to create realtime experiences
Good question, the flow is like this:

1. Clients trigger HTTP function endpoints (add a player, do an attack).

2. Centralized state is being updated (based on Durable Entities).

3. The Azure Functions publish messages to the realtime channel (via a REST based client).

4. Clients are subscribed to the realtime channel (using a WebSocket based connection) and respond to the messages (update player health etc).

So clients are only subscribing to messages that the Azure Functions are publishing.

marcduiker··on Using Serverless WebSockets and Azure Functions to create realtime experiences
Hi everyone, I'm the author of this article. Let me know if you have any questions or comments about this. You can play the game mentioned in this article here: https://quest.ably.dev/