Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Durable Entities #96

Closed
anthonychu opened this issue Mar 29, 2020 · 14 comments
Closed

Add support for Durable Entities #96

anthonychu opened this issue Mar 29, 2020 · 14 comments

Comments

@anthonychu
Copy link
Member

Would you like to see Durable Entities supported in Python? Let us know here! If possible, include details about how you plan on using them. Thanks!

@exit-code0
Copy link

I'm hoping to use durable entities for a simple heartbeat monitor of IoT devices - heartbeat messages would get routed to a service bus queue, which triggers the durable function to save the device info and heartbeat timestamp and check against the age of the last heartbeat received.

@eavanvalkenburg
Copy link

I built something now that uses events in a orchestrator but that should be using a entity to understand where it is and what's happening, that would also allow more complex patterns, with the entity being updated, running some activities at different points for different states etc.

@asipras
Copy link

asipras commented Aug 22, 2020

We use durable entities simply to count the number of activities called during the durable function execution. This is preventing us from migrating the .net c# durable function to python durable function.

@anthonychu
Copy link
Member Author

Great! The work to add entities to Python is well underway! @davidmrdavid

@davidmrdavid
Copy link
Collaborator

@asipras , oh I have some good news for y'all then 😄

Indeed, Durable Entities for Python are coming and they appear to be working on my local branch. I'm actually expecting to open a PR for those today, although I still need to incorporate a few unit tests for them. Regardless, I believe you can expect them becoming available in the very near future! ⚡ ⚡

@davidmrdavid davidmrdavid moved this from GA items to In progress in Python Durable Functions GA Aug 26, 2020
@JosXa
Copy link

JosXa commented Sep 28, 2020

Nice work, I am used to having durable entities available in C# by now and I'm just adding my voice here without a real use case other than "I really want to play around and see what I can do with them in Python🚀"! Glad to hear it's coming soon!

@aminekaabachi
Copy link

Any news or ways we can contribute to make this possible?

@davidmrdavid
Copy link
Collaborator

@aminekaabachi The Durable Entities PR already exists and has been ready for some time now here: #184

We're just waiting for an azure functions python worker release to take place for that to get merged and shipped asap. That worker contains some lower-level changes necessary for the Entities PR to actually run. Unfortunately, for stability reasons, that worker release schedule is currently much slower than ours.

The good news is that the worker is already in the process of releasing and I understand that it should be available in a matter of weeks now. Sorry this has taken so long, I also can't wait to finally merge this and get it out the door!

I'll continue updating this post with updates! Thank you for your interest and your patience ⚡ ⚡

@davidmrdavid davidmrdavid moved this from In progress to Completed (but waiting on dependecy) in Python Durable Functions GA Oct 29, 2020
@davidmrdavid davidmrdavid moved this from Completed (but waiting on dependecy) to Done in Python Durable Functions GA Dec 7, 2020
@davidmrdavid
Copy link
Collaborator

Released!

@gromag
Copy link

gromag commented Jan 22, 2021

I'm using VSCode attached to a local container image (mcr.microsoft.com/azure-functions/python:3.0-python3.8-core-tools) In there I have installed azure-functions-core-tools-3 (3.0.3233-1) and in the IDE I have the extension ms-azuretools.vscode-azurefunctions v1.1.0.
When I try to create a new Durable Function it lists only Activity, Orchestrator and Starter type of functions.

I understand the azure-functions-core-tools-3 is responsible for providing the list of available durable functions in the VSCode menu and Iassume that this has not been updated yet to include the Durable Entities.
Using intellisense I can see the DurableEntityContext and other related classes, is there any documentation to guide on the use of Python entity functions?
Thanks

@martijnlentink
Copy link
Contributor

I think that the counter_entity sample will help you getting started with durable entities:
https://github.com/Azure/azure-functions-durable-python/tree/dev/samples/counter_entity

@davidmrdavid
Copy link
Collaborator

Thanks for the suggestion @martijnlentink!
Hi @gromag, if you update your extension bundles to be in the V2 range, as in here: https://github.com/Azure/azure-functions-durable-python/blob/dev/samples/fan_in_fan_out/host.json
then you should be able to see the entity templates in VSCode, assuming you have the latest update of core-tools.

Also, we have documentation pages for entities on the way! They're just not public yet, but I'm happy to help with any issues you have if you open a new ticket :) . Thanks!

@gromag
Copy link

gromag commented Jan 25, 2021

Thank you @davidmrdavid, although I had the latest extension bundle and core-tools it did not show in the list until I changed the Azure Function template filter from "Verified" to "All", It is in the menu now! 😅

@davidmrdavid
Copy link
Collaborator

Hi @gromag, glad to hear you were finally able to see them. Strange that they were not under "verified" though.
I'll ask around to see if others encounter this problem as well. If you encounter any more issues with entities, feel free to raise them in a new ticket and I'll address them asap!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

9 participants