Posts

TruffleRuby on OCI Container Instances

Image
Elegance at Speed Ruby is one of my favourite programming languages.  I really appreciate how expressive it is, how productive (and how much fun) it makes development. Unfortunately Ruby has a reputation for being slow compared to other languages such as JavaScript. While the performance of the default Ruby interpreter has improved, it still hasn't had the engineering investment that goes into V8. I want to introduce you to an alternative Ruby engine, and a really simple way to deploy Ruby applications in the cloud. TruffleRuby TruffleRuby is a high - performance implementation of Ruby, built on top of GraalVM. GraalVM is a high - performance, polyglot virtual machine. In benchmark tests , TruffleRuby often delivers superior performance to other Ruby implementations. You can install TruffleRuby using commonly used Ruby managers such as  RVM , chruby &&  ruby-install , and rbenv . Once you've installed TruffleRuby, you can use it just like the standard Ruby engine.  T

The Quick and the Ordered

A Dilemma Let's start with a couple of questions: Is it better to be quick or dead? That’s a bit of a no – brainer really.  Most of us would prefer to live. Is it better to have order or chaos? Most of us would choose order. For many organisations today it seems as if those questions are linked, and that the real choice is between speed or order. Both options have consequences: Choose order and you risk going the way of the dinosaur. Choose speed and you risk drowning in chaos.  Neither is particularly attractive. So how have we come to this point? Digital transformation As the economy becomes essentially digital, businesses must deliver a differentiated, personalised experience to their customers. Fail and you will not survive. If your offer isn’t differentiated, customers won’t notice you. If your offer isn’t personalised, then you’re not building a relationship with the customer. At best the interaction is transactional and “non – sticky”. At worst, it’s spam. Differentiation

Serverless Functions using Rust and WebAssembly

Front Line (Web) Assembly Background In a previous post I gave an overview of how to create functions for Oracle Functions or Fn Project , when you want to use a language for which there is no FDK (Function Development Kit). The approach I took was to create a "helper function" which provides a bare minimum interface between Fn and the function. This is all well and good, but it is not a full FDK.  Some of the capabilities of the supported FDKs are absent.  For example, the helper is not aware of values that have been configured for the function or application via the context. So in this post, I want to explore a different approach, which will enable the capabilities of the provided FDKs support functions in a language for which there is no FDK WebAssembly WebAssembly  ("wasm") is an open standard W3C that defines a portable binary format.  By compiling code to WebAssembly we are able to run it in a browser.  This means that developers can write code in a language

Wot no FDK?

Writing Serverless Functions in a New Language Background Fn Project  is an open - source, Docker based, cloud native serverless platform .  You can run it in any environment that supports Docker.  Oracle Functions is based on Fn Project. If you want to have a play with Fn before reading the rest of this post, I recommend the " Quick Start " guide. One of the great strengths of Fn Project is that it is open. When other serverless platforms (that shall remain nameless) restricted you to JavaScript / Node plus maybe a couple of others, Fn offered an FDK for Ruby (for those who prefer elegance and beauty in their code). This was a major factor in me getting involved with the project, and becoming a contributor to the Ruby FDK. In addition to Ruby, Fn offers a number of other FDKs: Go, Java, Python, Node and .NET Core. But beyond that, Fn has always been open to additional language runtimes.  If your code can run in a Docker container, then (in principle) it can run as an Fn fun

The Case of the Vanishing Dockerfile

If your serverless platform is Oracle Functions or the open source  Fn Project that it is based on, you may have wondered exactly how a function image gets built for one of the standard runtimes. One clue is that if you're watching closely you may see a Dockerfile  a p pear briefly, then vanish during the build process. The Fn CLI will create the Dockerfile for the runtime, build the function and then delete it once the build has completed. You can see the steps of the docker build by running  fn build  or  fn deploy  with the  --verbose  flag specified: $ fn build --verbose [14:57:34] Building image fra.ocir.io/oraseemeatechse/crush157/dummy:0.0.1 FN_REGISTRY: fra.ocir.io/oraseemeatechse/crush157 Current Context: default Sending build context to Docker daemon 14.34kB Step 1/11 : FROM fnproject/fn-java-fdk-build:jdk11-1.0.108 as build-stage ---> e3c33b854f29 Step 2/11 : WORKDIR /function ---> Using cache ---> c0bcff391281

Honey I Shrunk The Container

Image
(or how I found out about microcontainers and why I think you should use them) Context About 18 months ago I was asked to help an ISV partner who wanted to migrate their product to cloud. At the time they had a very traditional software industry business model - sell the customer a license to run their software, along with a subscription for ongoing support. However they wanted to be able to move to a SaaS model where the customer would consume their software as a service running in the cloud. Their stack consisted of: a Ruby on Rails application Postgres Redis Their initial attempt at creating a SaaS offering had been to run this as a set of VMs on top of IaaS. While the software ran just fine, they soon saw that this approach wasn't going to give them a successful SaaS business. If any part of the application were experiencing high demand, the only way to scale it was to start another instance of the whole application . Since they were packaging the applic

Support your Community Lynchpin

As the title of my blog “Constructive Laziness” indicates, I’m a great believer in maximising the amount of work you don’t do. In fact, if you’re reading this before 8th July 2017, I’d like you to be constructively lazy now.  Please scroll to the bottom of this post - the bit marked “ Actions ” - there’s a couple of things I’d like you to do before you read the rest of it. I don't practice or advocate pure laziness you understand.  I don’t think I’d have survived over 20 years in IT, including a couple of startups, by being purely lazy. In fact, I enjoy working hard and I like a challenge. What I mean by “Constructive Laziness” is avoiding unnecessary work, so I can focus on the things that will deliver most value.  Not in terms of money (if I was looking for the greatest financial reward for the hours worked, I’d have moved into sales a long time ago), but in terms of solving the problem. I first got paid to write code in 1989.  I was working in a research lab, us