Babbel Bytes

Insights from the Babbel engineering team

GitHub Service Hook for AWS OpsWorks

Jan

TL;DR: Trigger a deployment of an app in AWS OpsWorks via a GitHub service hook when pushing a branch to your repository.

There are use cases where you want to deploy something straightforward, just by pushing your changes to a git repository, e.g. an update of an internal tool or a typo in a blog post.

For web applications, Heroku has such a workflow. You configure a Heroku remote repository, push to its master branch, and Heroku’s after-push hook takes care to roll out the new version of your application.

For hosting of static pages (or simple blogs like this one), GitHub Pages provide the same approach. If you push the content of your page organized as Jekyll project to a special branch called gh-pages then GitHub Page will compile the templates and host the result.

We wanted to have the same comfort for AWS OpsWorks. Most of our web applications and internal tools are running on OpsWorks, and at least for the internal tools, the deployment through Capistrano or the AWS Console has been too cumbersome.

We’ve proposed a service hook to GitHub which can trigger an application deployment on OpsWorks. And GitHub has integrated it.


Continue reading…

Dynamically Built Regular Expressions

Jan

TL;DR: If you need to build dynamically regular expressions memoize them. Compiling them is expensive.

I don’t like memoizing methods, or caching in general. Obviously, caching adds more complexity to your source code and might lead to more errors, or even worse, errors which are harder to reproduce because they only happen due to a specific history. For memoized methods, you have to ensure that there are no other dependencies for the result than the passed arguments. Or that the result of a memoized method does not reference a larger object tree ending with a memory leak. There might be even more pitfalls.


Continue reading…

Welcome to the Babbel Tech Blog

Babbel

Hello World! Welcome to the Babbel Tech Blog.

From today on, we, the Babbel engineering team, would like to share our experiences about developing and maintaining the Babbel platform: The website, various mobile apps and the infrastructure behind it.

Some information about us and our infrastructure:

  • We are currently 25 FTE in the engineering department growing rapidly and about 12 FTE in product development.
  • For our web applications, we are developing in Ruby and Javascript (and CoffeeScript).
  • We are developing mobile applications for iOS, Android and Windows (Phone and 8), and thus, using Objective C, Java and C#.
  • Most of our web applications are Ruby on Rails applications, some special purpose applications like our tracker is written in node.js
  • The infrastructure running our web applications is hosted on AWS, mostly on OpsWorks, some an Elastic Beanstalk.