Service integration and management in a simulated environment
Disclosed are various embodiments for a simulation framework that facilitates the integration and management of multiple services in a software-in-the-loop simulated environment. A simulation runtime engine can deploy multiple services which may have dependencies upon one another in a simulated environment. Network service calls sent from one simulated services to another service may be intercepted to ensure that the network service call is sent to the simulated instance of the service instead of the actual non-simulated instance of the service. In addition, system time calls are intercepted to ensure that the requested service is provided the simulation time.
1 . A system, comprising:
at least one computing device; and
at least one simulation runtime engine executable by the at least one computing device, wherein, when executed, the at least one simulation runtime engine causes the at least one computing device to at least:
instantiate a software-in-the-loop simulated environment by deploying a plurality of service simulations that simulate a plurality of different services included in a computing system that are dependent upon one another;
intercept at least one of a system time request or a service request from a first service simulation of the plurality of service simulations, wherein the service request is intercepted by a first simulation runtime engine of the at least one simulation runtime engine;
in an instance in which the system time request is intercepted, providing a time associated with the simulated environment to the first service simulation; and
in an instance in which the service request is intercepted from the first service simulation:
determine a second service of the plurality of different services associated with the service request;
determine that a second service simulation of the plurality of service simulations corresponds to the second service; and
redirect the service request to the second service simulation to prevent a non-simulated instance of the second service from receiving the service request.
2 . The system of claim 1 , wherein the at least one computing device comprises a first computing device of a plurality of computing devices and a subset of the plurality of service simulations are running on a second computing device of the plurality of computing devices in the simulated environment.
3 . The system of claim 2 , wherein the second service simulation is running on the second computing device, and when executed, the at least one simulation runtime engine further causes the at least one computing device to at least:
determine that the second service simulation is located on the second computing device based at least in part on a look-up table; and
redirecting the service request to the second service simulation via a second simulation runtime engine running on the second computing device.
4 . The system of claim 1 , wherein the at least one simulation runtime engine comprises one of a container runtime, a hypervisor, or a virtual machine.
5 . A method, comprising:
deploying, by at least one computing device, a plurality of service simulations that simulate a plurality of different services in a simulated environment, at least a portion of the plurality of different services running separately in a non-simulated environment;
intercepting, by a simulation runtime engine running on the at least one computing device, a service call from a first service simulation associated with a first service of the plurality of different services, the service call being directed to a second service of the plurality of different services; and
redirecting, by the at least one computing device, the service call from the second service to a second service simulation associated with the second service of the plurality of different services to avoid the service call from being received with the second service running in the non-simulated environment.
6 . The method of claim 5 , further comprising identifying a location of the second service simulation.
7 . The method of claim 6 , wherein identifying the location for the second service simulation comprises accessing a table that is updated to include the location of the second service simulation upon deploying the second service simulation in the simulated environment.
8 . The method of claim 6 , further comprising receiving a broadcast message from the second service simulation indicating the location of the second service simulation in response to the plurality of service simulations being deployed.
9 . The method of claim 5 , wherein the plurality of service simulations are distributed across a plurality of host computing devices.
10 . The method of claim 5 , wherein the simulated environment is managed by the simulation runtime engine comprising one of: a container runtime, a hypervisor, or a virtual machine.
11 . The method of claim 5 , further comprising:
intercepting a time request call from one or more of the plurality of service simulations; and
responding to the time request call with a time associated with the simulated environment.
12 . The method of claim 5 , further comprising registering individual services of the plurality of different services for inclusion in the simulated environment by obtaining a service package associated with the individual services and a service specification associated with the individual services.
13 . The method of claim 12 , wherein the service specification defines one or more dependencies associated with the individual services and any other services in the plurality of different services.
14 . A system, comprising:
at least one computing device; and
at least one simulation runtime engine executable in the at least one computing device, wherein when executed the at least one simulation runtime engine causes the at least one computing device to at least:
deploy a plurality of service simulations that simulate a plurality of different services in a simulated environment, one or more of the plurality of different services being dependent upon other ones of the plurality of different services;
intercept a service request from a first service simulation associated with a first service of the plurality of different services, the service request being directed to a second service of the plurality of different services, wherein the service request is intercepted by a first simulation runtime engine of the at least one simulation runtime engine;
determine that a second service simulation of the plurality of service simulations corresponds with the second service of the plurality of different services; and
redirect the service request to the second service simulation to avoid a non-simulated instance of the second service from receiving the service request.
15 . The system of claim 14 , wherein the plurality of service simulations are distributed across a plurality of host computing devices.
16 . The system of claim 14 , wherein the at least one simulation runtime engine comprises at least one of a container runtime, a hypervisor, or a virtual machine.
17 . The system of claim 16 , wherein the at least one simulation runtime engine comprises the container runtime and individual simulated services are running in a respective container of a plurality of containers that are deployed and managed by the container runtime.
18 . The system of claim 17 , wherein the at least one computing device comprises a plurality of host computing devices and the container runtime comprises a plurality of container runtimes, individual container runtimes of the plurality of container runtimes being executed by a respective host computing device of the plurality of host computing devices.
19 . The system of claim 14 , wherein, when executed, the at least one simulation runtime engine further causes the at least one computing device to at least identify a respective location for individual service simulations of the plurality of service simulations running in the simulated environment.