Anthony Chu Contact Me

Add Related Posts to a Jekyll Blog Using Azure Search

Sunday, April 5, 2015

Jekyll generates related posts for every blog post; but quite often the results are not relevant. Using the --lsi (latent semantic indexing) flag produces higher quality results but it takes several minutes to generate the index. Since I am already using Azure Search on this blog, I can use its new "more like this" feature to generate related post links instead.

For details on how to set up Azure Search on your blog, check out my previous article: Add Search to a Jekyll Blog for Free with Azure Search.

Continue Reading...


Realtime Event Processing with Azure WebJobs and Reactive Extensions

Monday, March 30, 2015

Not all events are created equal; and often they need to be processed differently. For example, imagine a web application that generates errors and warnings. Perhaps we want to be notified whenever an error occurs, but we want to ignore warnings unless they exceed a certain threshold over a period of time.

This sort of logic is pretty difficult to write in a web application because we need to aggregate data across different requests. What we need is a background job to process these events, and a programming model that simplifies event processing and aggregation. I recently created a demo that I presented at the Vancouver Azure Meetup that performed event processing using Azure WebJobs and Reactive Extensions, and displayed realtime results on a dashboard built on ASP.NET SignalR.

Continue Reading...


Add Search to a Jekyll Blog for Free with Azure Search

Saturday, March 14, 2015

One limitation of a Jekyll-based blog is the lack of server-side code. There are some services that will provide server-side functionality via JavaScript, such as comments with Disqus.

But what about search? Recently, Microsoft released Azure Search. It's a search-as-a-service platform that allows you to add documents (such as blog posts) to an index and run full-text search on them. The amazing thing is it's completely free for under 10,000 documents!

Today we'll walk through how to add basic search functionality to a Jekyll blog using Azure Search. It's also possible to use more advanced features such as autocomplete suggestions, faceting, scoring, and "more like this"; but we'll save those for another day.

Continue Reading...


Free Jekyll Blog Hosting with Amazon S3 and CloudFlare

Saturday, March 7, 2015

For the past year, this blog ran on the MiniBlog engine and was hosted on a low-cost ASP.NET web host. While it served its purpose, the host was far from reliable — most recently experiencing a 7-hour outage due to an IIS misconfiguration.

I had also become accustomed to creating content with Markdown on StackOverflow and GitHub; so using Windows Live Writer to write blog posts became less and less appealing to me.

With those requirements in mind (and now that I use a Mac), the Ruby-based Jekyll static site generator is a perfect fit. Its blog posts are simply Markdown files, and the layout is easy to customize. And because it generates a completely static site, I no longer need a web host that supports a certain technology; anything that can serve static web pages will do.

Ironically, the solution to the unreliable $5/month web host problem is (essentially) free. This site is now hosted in an Amazon S3 bucket with CloudFlare as its DNS service. So far, so good.

Continue Reading...


Using Knockout View Models in an AngularJS App

Wednesday, November 19, 2014

Angular 1.3 added an ngModelOptions directive that brings some flexibility in the way ngModel does databinding. One interesting option is getterSetter, which tells Angular that the model is actually a getter/setter function.

Before I got into Angular over a year ago, my frontend framework of choice was Knockout. Knockout’s view models consist of observables, observable arrays, and computeds, which are all implemented as getter/setters. So when I saw that Angular added support for binding to getters and setters, I knew I had to try to see if I can use Knockout view models in an Angular app.

Continue Reading...