In this PnP Web Cast we concentrated on asynchronous operation pattern with Office 365 using Azure WebJobs. This is really powerful pattern for performing scheduled and on-demand operations, which is commonly needed for long lasting operations. Pattern is taking advantage of continuously running Azure WebJob model with communications using Azure storage queues.
Typical use cases for asynchronous operations would be for example following:
- Long running AppInstalled events
- Long running remote event receiver events
- Site collection or site provisioning
- Long running integration scenarios for example to on-premises
- Governance tasks towards sites and other Office 365 content
During the web cast we demonstrated the process with simplistic sample from the PnP sample gallery called Core.QueueWebJobUsage. This sample concentrates on showing the actual pattern without any additional complexity.
Notice. Key reason for using the asynchronous pattern is simply time out handling either in SharePoint or in Azure web sites. Good example of this challenge is for example site collection provisioning which you cannot execute in the process of Azure web site, since Azure web site has 60 second time out for the process execution. This means that you’ll need to offload the business logic execution to back end process which could be for example an Azure WebJob.
Presentation used in this web cast is available from http://docs.com/OfficeDevPnP.
See following PnP videos for covering branding with add-in model topics.
- PnP Add-In Transformation Training module 5: Using Remote Event Receivers and Remote Timer Jobs
- Asynchronous on-demand operations in Office 365 with Azure storage queues and WebJobs
- Asynchronous remote provisioning solution for self service site collection creation
See following samples from the PnP library for additional reference around the covered topics.
- Core.QueueWebJobUsage – Sample used in the video for showing the process with Azure WebJobs
- Provisioning.Cloud.Async.WebJob – Self-service site collection provisioning sample, which is using exactly the same pattern as shown in the video
See following references for additional details around Azure WebJobs
- Run Background tasks with WebJobs
- Getting started with WebJobs and the WebJobs SDK
- How to use Azure queue storage with the WebJobs SDK
- Microsoft Patterns and Practices – Background jobs guidance
What is Office 365 Developer Patterns and Practices (PnP) web cast series?
Office 365 Developer Patterns and Practices (PnP) web cast series cover different patterns, practices and topics around development with Office 365 and SharePoint. Majority of the topics are valid for the Office 365 and SharePoint on-premises. Our objective is to release new around 30-45 minute long web cast each Monday with few slides and live demo on the covered topic. All web casts are published at the PnP Channel 9 video blog with additional references on the existing materials.
PnP is community driven open source project where Microsoft and external community members are sharing their learning’s around implementation practices for Office 365 and SharePoint on-premises (add-in model). Active development and contributions happen our GitHub project under Dev branch and each month there will be a master merge (monthly release) with more comprehensive testing and communications. Latest activities and future plans are covered in our monthly community calls which are open for anyone from the community. Download invite from http://aka.ms/OfficeDevPnPCall.
This is work done by the community for the community without any actual full time people. It’s been great to find both internal and external people who are willing to assist and share their learning’s for the benefit of others. This way we can build on the common knowledge of us all. Currently program is facilitated by Microsoft, but already at this point we have multiple community members as part of the Core team and we are looking to extend the Core team with more community members.
If you have any questions, comments or feedback around PnP program or this blog post, please use the PnP Yammer group at http://aka.ms/OfficeDevPnPYammer.
“Sharing is caring”
Vesa Juvonen, Senior Program Manager, Office 365, Microsoft