Hyper Open Edge Cloud

SlapOS Request Method

A step by step guide to allocate SlapOS Request Method
  • Last Update:2016-11-10
  • Version:001
  • Language:en

SlapOS request method

In the phpMyAdmin example, students were using the most basic part of SlapOS – how to install and deploy a simple software.

But the most important part of the SlapOS system is the slap.request method.

This tutorial provides a theorical introduction to the slap.request method.

SlapOS master

  • Special computer which knows what is going on
  • Tells other computers which software to install
  • Tells other computers which partition to start
  • Fullfill request

The slap.request method connects to the SlapOS master in order to request instantiation.

The SlapOS master is the central point of the SlapOS cluster. It gathers requests and selects their destination.

It also manages software installation and deployment across the cluster

Computers with partitions

Let's say that there are two computers with some partitions connected to the same master.

Partitions

On one computer a PHP application is being deployed.

Application needs MySQL

The recipe for this application is configured to request a MySQL database.

So the partition connects to the SlapOS master and asks for such a software instance.

SlapOS - please wait

As the request is done asynchronously, the first call is answered with “Please wait, I am processing.

SlapOS master search

Now the SlapOS master is querying its own database about Computers and Partitions.

It looks for a free Computer Partition on a Computer, which has the proper software installed.

SlapOS master allocates

It asks this computer to deploy a new MySQL database, and fetches connection information.

Partition asks again

The originating partition, as the first request did not succeed, asks again for a MySQL database.

It is available

As the database is instantiated correctly, the SlapOS master provides it.

PHP & MySQL connected

And this is where the template mechanism are used. Connection dictionary is sent by the SlapOS master to the PHP partition.

Thanks to this, the recipe responsible for PHP instantiation is able to configure the application.

Actual view of instances

Here is the actual view of the two requested instances: how they are connected, and what the running processes are.