## 3 Simple Resource Algorithm
### Advertising Cloud Formulation
* **Add Server:** This function helps a server be added to the required service. It also collects details about the server, including the server global ID given by the NMS, the server's name, the server location using its IPv4 address, and the server's maximum load. * **Request Service:** Once a service is registered with the SMF, the service can be requested by users who want to use it. Servers should provide this service to the requesting applications. This function allows an application to request service. After the application sends a service request to SManL, SManL will provide the necessary parameters for the application to contact the server that runs the requested service. * **Migrate Service:** This function allows the services to migrate to the required servers. It also collects details about the global service ID, the global user ID, and the global device ID and will set up the migration using Docker container technology. Once the migration is successful, a successful result will be returned to the caller. Figure 12: Fuxfs Multithread. ### FUSE Server Migration Using Docker

In the source code compilation, using the command prompt, compile the Fuse server (fuxfs_server.c). The next step is to run Docker, build the Docker image and check the built image. To secure the service migration, we have created a private repository in Docker for the migration. As we know that the SMF supports the following functions: Register the service, register the user, register the device, add a server, request and migrate the service. It was compiled and executed using the below commands to start the functions. Figure A2 in the Appendix A shows that the SMF has successfully started. * Compile command: gcc -o smf smf.c
* Run command:./smf

#### 7.9.1 Fuxfs Server Start-Up from Dockers Private Repository

After the SMF started, the Source code of \"Fuxfs_server.c\" compiled and was executed as shown in Figure A3 in the Appendix A, which highlights that the Fuxfs server was started from the Docker Repository. * Compile command: gcc -o Fuxfs server Fuxfs server.c
* Run command:./Fuxfs server 0.0.0. * docker run command: gayuinfy/gkprivate:v1

This Fuxfs server derives from Docker private container, we used the docker run command:gayuinfy/gkprivate:v1 and the container ID:ff0 fa32d3036 as shown in Figure A4 in the Appendix A. #### 7.9.2 Fuxfs Client Start-Up

After the Fuse server, the fuse client (Fuxfs.c) was compiled and executed as shown in Figure A5 in the Appendix A. * Compile command : gcc -Wall fuxfs.c'pkg-config fuse -cflags -libs' -o fuxfs -w -lptthread
* Run command:./fuxfs /tmp/fuse 0.0.0.0

#### 7.9.3 NMS Service Added

The NMS is an example of block storage service, registered with the SMF. The \"Add server\" command from SMF allows servers to be added including Server name, type, Server IP address, TCP and UDP port details has shown in Figure A6 in the Appendix A. Once the service was successfully added to the server, the service was requested by the FUSE client using the SMF command Request service. The FUSE client then requested that the NMS was migrated to a different machine. The service is then successfully migrated as shown in Figure A7 in the Appendix A. Figure A8 in the Appendix A shows all the components of the working prototype. ## 8 Conclusions and Future Work

This research has focused on the development of the Secure Service Ecosystem (SSE) to implement the Intelligent Edge Environment for smart cities. This effort looked at three layers of the IEE and developed key mechanisms to help implement the SSE including a new Resource Allocation Algorithm, a new Resource Allocation Secure Protocol and finally a new Secure Service Protocol. Using these mechanisms along with capabilities, ProVerif was used to show that this system was safe. The SSE was then used to support a FUSE-NMS system in which the NMS was migrated as the users moved around. Though the prototype demonstrated was basic, it showed that it was possible to build an SSE that could be used to develop new services for smart cities.