Aaron Verones is a lead software engineer at Wrk and is responsible for the fleet of microservices that deliver our clients’ work. Aaron is a language enthusiast, having deep experience in both human linguistics and programming language design. In this post, he dives into the core engineering system driving the delivery of Wrk at scale.

The Wrk platform helps companies scale the delivery of their value. Business users can define processes by connecting Wrk Actions, which capture a single step in a real-world process, and are powered by RPA, APIs, OCR, bots, and even skilled humans.

Programming Language Concepts

At a very high level, programming languages define a grammar you can use to build programs, then compilers or interpreters take those programs and turn them into a set of instructions that can be executed by a machine, then the machine executes those instructions. So let’s put this in Wrk terms:

Wrk Actions have input parameters and a schema describing the shape of the output data. They can be chained together in a Wrkflow linearly, but also in loops and branches. Wrk Actions can throw errors that other Wrk Actions can catch. The programming analog to a Wrk Action is a function. Since a Wrkflow is a chain of Wrk Actions connected together through control flow, a Wrkflow is a program.

The Wrk Engine takes these Wrkflows and compiles them into a set of Jobs, which are single pieces of work. A Job is an executable instruction, which means the Wrk Engine is a compiler.

Here’s a summary of what we have so far:

Wrk Concept Programming Language Analogue Wrk Action Function Wrkflow Program Wrk Engine Compiler Job Executable Instruction

The Distributed Executor

Here’s where the really cool stuff happens. Each machine instruction in a typical compiled program is executed by a single computer. At Wrk, instead of having a single computer execute every instruction (Job) from a single program (Wrkflow), we have microservices optimized to execute each instruction. This innovation is at the core of our technology. This enables several advantages over a typical programming language:

  1. Jobs can be delivered by the technology that is most suited for the task: RPA, OCR, public APIs, custom bots, or anything else we can get our hands on,
  2. Wrkflows are parallel by default, meaning we can distribute their execution over as many compute resources as we want, and
  3. Each of these microservices is independently scalable which means we can execute Wrkflows at hyperscale.

Hybrid Human/Computer Delivery

Astute readers will notice that I said that Wrk Actions are powered by “RPA, APIs, OCR, bots and even skilled humans”.

Wrk has pushed the boundary of what a programming language can be: Jobs are delivered by a combination of machines and humans.

Imagine making an HTTP request in your code like usual, but the service that answered that HTTP request was a skilled human worker instead of an API. You would provide data and instructions in your request, the human worker would perform the work, respond with output data in a few minutes, and then your code would carry on executing like usual. Sound like a fantasy? Nope, just clever engineering.

Programming Business Processes at Hyperscale

This concept of a distributed, hybrid programming language underpins the automation platform we offer to our clients. As we build more tools, business users, managers, and developers will be able to take advantage of more of the power offered by this core technology. With this at your fingertips, imagine what you could build.

Curious about some of the challenges we have to solve? Learn more about our Hybrid Delivery Platform and come on over; there’s lots to be done!