Hello all,
I am currently in the process of rebuilding uHangout.co.uk website that heavily relies on the YouTube API.
My thought with the new site is not to use YouTube's direct API feed to power the website but to use an Azure WebJob to poll the YouTube API say once an hour and use the WebJob to import nodes into Umbraco, so extra meta information can be added that YouTube does not allow me to specify.
With this extra meta information stored on videos will make for much better searching using Examine to help people find the videos that they are looking for.
So I have no experience and very little understanding of how WebJobs works but from my limited knowledge I understand that there are two types. Queue based with a continuous running application listening for items in the queue or to use an application that runs and stops on a scheduled basis.
The scheduled WebJob approach is what I want to try and achieve. So Azure WebJobs are basically console applications under the hood. I need to know how I can use the Umbraco Service APIs in a console application to allow me to create and publish content nodes in my site.
If it is not possible my other thought, but seems a bit hacky/messy is to get the console application to do a HTTP POST to an Umbraco WebAPI route which then will allow me easily to then take the data and create the content node with the services as I will have a HTTP context.
So I would love to hear your thoughts on this and what could be done to help solve my problem of moving the constant polling of YouTube's APIs to less frequently and storing extra meta data in content nodes for better searching.
Not worked with Azure WebJobs before so can't give any input on that but would this be of any help for the console application, should give you a good idea of how to create content etc.
I think you will be much better off exposing an api endpoint of some kind within your Umbraco website (secure of course), and then call that from your WebJob. It'll be much easier to deal with then creating a console app that uses the Content Service API outside the context of Umbraco.
I would agree on the WebAPI route. I've created a console app in the past that took an external xml feed, posted the data to umbraco via the api, and then created / deleted the nodes required. I did try doing it all from inside the console app but never got past the umbraco context issues.
I know this is an old thread, but I just started looking into this myself. Is it still the best idea to just use a WebAPI call with some authentication? It's a little annoying; I'd prefer to just run it all from the background thread of the webjob, but if it's going to be a hassle, I guess I can just do it from the main application.
Using Umbraco with Azure WebJobs
Hello all,
I am currently in the process of rebuilding uHangout.co.uk website that heavily relies on the YouTube API.
My thought with the new site is not to use YouTube's direct API feed to power the website but to use an Azure WebJob to poll the YouTube API say once an hour and use the WebJob to import nodes into Umbraco, so extra meta information can be added that YouTube does not allow me to specify.
With this extra meta information stored on videos will make for much better searching using Examine to help people find the videos that they are looking for.
So I have no experience and very little understanding of how WebJobs works but from my limited knowledge I understand that there are two types. Queue based with a continuous running application listening for items in the queue or to use an application that runs and stops on a scheduled basis.
The scheduled WebJob approach is what I want to try and achieve. So Azure WebJobs are basically console applications under the hood. I need to know how I can use the Umbraco Service APIs in a console application to allow me to create and publish content nodes in my site.
If it is not possible my other thought, but seems a bit hacky/messy is to get the console application to do a HTTP POST to an Umbraco WebAPI route which then will allow me easily to then take the data and create the content node with the services as I will have a HTTP context.
So I would love to hear your thoughts on this and what could be done to help solve my problem of moving the constant polling of YouTube's APIs to less frequently and storing extra meta data in content nodes for better searching.
Cheers,
Warren :)
Hey Warren,
Not worked with Azure WebJobs before so can't give any input on that but would this be of any help for the console application, should give you a good idea of how to create content etc.
https://github.com/sitereactor/umbraco-console-example
Cheers,
Tom
Hey Warren,
I think you will be much better off exposing an api endpoint of some kind within your Umbraco website (secure of course), and then call that from your WebJob. It'll be much easier to deal with then creating a console app that uses the Content Service API outside the context of Umbraco.
Hope this helps,
Morten Christensen
Hey Morten,
I think you are probably right when with the advice and go with a WebAPI POST endpoint with some authentication on it.
Will make life a lot easier for sure, as I would not have a clue where to start with the pure console application method.
Cheers,
Warren :)
Hi Warren,
I would agree on the WebAPI route. I've created a console app in the past that took an external xml feed, posted the data to umbraco via the api, and then created / deleted the nodes required. I did try doing it all from inside the console app but never got past the umbraco context issues.
Cheers Ian
I know this is an old thread, but I just started looking into this myself. Is it still the best idea to just use a WebAPI call with some authentication? It's a little annoying; I'd prefer to just run it all from the background thread of the webjob, but if it's going to be a hassle, I guess I can just do it from the main application.
is working on a reply...