Skip to main content

Posts

Showing posts with the label Azure

Azure Table Storage Batch Insert Within Operations Limit

When working with Azure Table Storage and needing to bulk insert a number of records, it's more efficient and reliable to do so by inserting a batch of records in one step, rather than one at a time. On a recent project we've been using table storage as a location to record the log for an import operation migrating information from one content management system into another. As each field was imported a couple of log lines of information were recorded - which were useful for auditing and debugging. Rather than inserting each log line as it was generated, we've batched them up, and then loaded them into table storage in the finally part of a try/catch that sits around the import logic. In this way, we store all the log information in one go. For a few imports though, we found this error being recorded in the application logs: Error processing message, message: An error has occurred. Exception message: The maximum number of operations allowed in one batch has been ...

Pluralsight Course: Azure Custom Vision Service

Over the past few months I've been working on authoring a first course for Pluralsight on the topic of the Custom Vision Service , part of the Cognitive Services suite provided by Microsoft and hosted on Azure. It was released a couple of days ago, and those with subscriptions or a free trial, can access it here:

Streaming mp3s from Azure blob storage gotcha

Have been wrestling with an issue one and off for a few weeks where have found mp3 files that previously played correctly in a web browser were having some issues relating to streaming. There's an example here . What I found - hopefully resolved now if you try the link - was that the audio would play, but the play bar that updates the position on the track wouldn't move, nor could the user navigate to parts of the audio to review it. We're using jplayer and have the mp3 files hosted in Azure blob storage. All had worked fine for several years, but recently could see this issue on Chrome, even though they still played as expected in Edge. So must have been related to a relatively recent Chrome update. The resolution though turned out to be a setting on the blob storage account, that I was led to via this Stackoverflow answer , that indicated setting the DefaultServiceVersion to an appropriate value might resolve it. And sure enough, when querying the current value...

Tackling Common Concerns with Azure Function Patterns

I've recently had (or perhaps am about to have if you have found this early) the pleasure of talking at the Intelligent Cloud Conference in Copenhagen, in May 2018, on the topic of Tackling Common Concerns with Azure Function Patterns I've collated here a few links to resources discussed in my session. First, find a copy of the slides here (in pptx, so you may find fonts a bit off without our company one) , or, perhaps better, as a PDF here . Then links to GitHub repos containing the full implementations of the patterns discussed in the talk, and from where the code samples presented are drawn. Azure functions demos Queue based load levelling demo Some tools mentioned in the talk: Azure storage emulator Azure storage explorer Lastly, the Azure functions documentation .

Queue based load levelling using Azure Functions

On a current project I've been looking to employ a cloud design pattern known as queue based load levelling , and to implement it using Azure storage components and functions. The Queue based load levelling pattern The pattern is useful in a range of situations where there's a need for timely and reliable integration between different software systems. In short, the pattern utilises a queue service as a buffer for messages from one system to the other, allowing them to be passed to the destination system for processing in a controlled manner, and at a rate that won’t overwhelm available resources. It can be adopted where one software system must send messages to another but for various reasons we want to avoid a direct connection between the two. One good reason we might want to do this is simply to reduce coupling – the two systems will need to agree on a message format, but ideally we don’t want to tie them to each other’s implementation details any further than that. ...

Let's Encrypt on Azure Web Apps - Key Expiration Issue

I run a side-project website on Azure PaaS, for a music library business called The Perfect Music Library . For a year or so this has had an SSL certificate provided by Let's Encrypt . The certificates provided for this service expiry relatively quickly, and so in order to keep this updated I've set up and deployed a site extension and web job using the excellent instructions provided by Nik Molnar. Recently though I noticed that the most recent update had failed which meant browser warnings of an outdated certificate were being seen by visitors that attempted to access the site. It turns out the issue was a key that's created as a process of setting up a "service principal" (step 5 of instructions linked above) had expired after a year or so. To diagnose this I opened up the Azure portal, located the web application in question and navigated to the list of web jobs. Within that, right-clicking on the letsencrypt.siteextension.job allows the view of the...