Research Article

HCRCaaS: A Handwritten Character Recognition Container as a Service Based on QoS Guarantee Algorithm

Algorithm 1

GPE algorithm.
The pseudocode of the GPE algorithm
Input:
(1)Set the current arrival number for each container
(2)The number of containers in each container host , and is the number of hosts in the system
(3)The number of CPU cores of the container hosts
(4)The maximum waiting time
(5)The container scheduling trigger command , where if launching the new containers, if keeping the containers, and if deleting the containers
(6)The performance relationship function
(7)Output: the updating expected waiting time
Step 1:
If
 Sorting the index of the container hosts with the number of the containers in on-descender order
 Find the host which has the minimum containers
 Set
 Re-calculate
 Calculate the of the containers in container host from (3)–(7)
 If
  Deleting a container in container host
  Go to Step 3
 Else
  Set
  Repeat Step 1
End If
Step 2:
If
 Sorting the index of the container host with the number of the containers in on-ascender order
 Find the host which has the maximum containers
 Set
 Re-calculate
 Calculate the in container host from (3)–(7)
 If
  Creating a container in container host
  Go to Step 3
 Else
  Set
  Repeat Step 2
 End If
End If
Step 3: Updating and adding or deleting the container in the load balance server.