Web self-services

Self-service is a global trend helping to lower cost in supermarkets, airports, fast-food restaurants, banks, car-parks, etc.

Web self-services is the latest addition to this trend: Instead of having to pay for computing the customers’ tasks, give them the code and let them compute it themselves! Reduced server costs and faster response times will ensue.

How it works

Ordinary web services work by getting a request, processing it on the server and then responding with the result. Web self-services work by instead sending the code that will produce the result. The code is executed on the customer’s machine and the result is used. As in other cases where self-service is used, not all services should be made self-service, but a surprising amount can.

Web Services vs Web Self-services

An important aspect of web self-services is delivering code for the customer’s platform: iOS apps runs compiled objective-C or compiled Swift (usually ARM-binaries), the web-browser runs JavaScript, the android app runs compiled Java (JVM bytecode), the desktop app runs compiled C (x86 binaries), etc. The client can decide how to execute the code for best performance or security, given the options made available for the client application.

The web self-service code can be easily cached on content delivery networks (CDNs) to further reduce server costs.

Web Self-Services with CDN

Example 1

An online photo storage and editing service has a single page web app and apps for iOS and android devices. All the apps have filters that the customers can apply to their photos. Instead of sending the image to the server, applying the filters and sending the image back, the code is sent to the user and executed on the customer’s machine, applying the filter on the image directly. JavaScript code is sent to the web app, ARM binaries to the iOS apps and JVM bytecode to the android apps.

This saves a lot of bandwidth and compute hours on the online photo service server infrastructure.

Example 2

A company sells an online service for for technical analysis on stocks and financial instruments. Instead of running the technical analysis algorithms on their servers, they deliver the code to the customer, and the customer can run complex and compute intensive technical analysis on his linux desktop application. The code is delivered in C and compiled behind the scenes and run.

Serverless

Web self-services makes serverless even less about servers. Serverless architecture has gained popularity lately, and a number of large actors provide serverless infrastructure: Amazon with AWS Lambda, Google with Cloud Functions, Microsoft with Azure Functions and Oracle with Fn.

State-less functions are central in serverless architecture. State-less functions are very well suited for web self-services: The stateless function is simply delivered and run on the client machine instead of on a server.

Edge computing

Edge computing is to move some of the cloud computing closer to the place where the data is. Especially in the context of cloud-computing, it means computing on the client or on devices closest to the data first and then doing the rest on cloud-servers if the network-latency is worth it.

Web self-services fits very nicely into this model. The ability to get the code in a different programming language or binary format means decisions about where to perform a computation can even be made on the fly, based on load or the amount of data. If a large amount of data needs processing, it might be best to do it on a central server. If the latency of the network gets above a certain threshold, the code can be transfered to the client and the data processed there.

As you can see, edge computing is ripe with oportunities for web self-services.

Platforms for web-self services

Progsbase is a platform for developing and delivering code for web-self services. Code uploaded on the platform can be converted to and delivered in any of the supported languages: currently Java, C, C++, JavaScript, C#, PHP, Python or Visual Basic.

The progsbase repository hosts a collection of free, open source web self-services. Private programs are also hosted and will only be served to authenticated requests.