Run a Scenario when inMemory parameter is True
A REST request is made to the GMUS to run a Scenario with the inMemory parameter is set to true. When inMemory is true, the following setup steps are executed:
- All Receivers associated with the Domain will be removed.
- The GenRocket SimpleMapReceiver is added to the Domain so it can produce the data in memory.
After the data is generated in memory, it is passed back to the calling client as JSON.
Important Note: When data is being generated in memory, loopCounts should be kept within a limited range that will not cause a Memory Heap exception. For example, running a given GenRocket Scenario that generates 1,000,000 rows of data to a given GenRocket Receiver when inMemory = false will not cause a memory issue since the GenRocket Engine will only generate one row of data in memory at any given time. However, if inMemory = true or both, the GenRocket Engine will keep each row in memory until the Scenario completes its run; thus, a Memory Heap exception will occur if the system does not have enough memory. Also, the JSON response payload may be really huge and could cause issues for the response client. A reasonable loopCount limit, when inMemory = true, might be 10,000.
- http://<ipAddress>:8070/rest/scenario
Method Type
- POST
Linux Example
Parameters (with example values):
{ "clientAppId" : "XXXXXXXX-1e47-abcd-ba66-XXXXXXXXXXXX", "clientUserId": "XXXXXXXX-abcd-4284-aa45-XXXXXXXXXXXX", "username" : "jane.doe@gmail.com", "scenario" : "TestScenario.grs", "scenarioPath": "/home/jDoe/Downloads/output", "inMemory" : true }
Windows Example
Parameters (with example values):
{ "clientAppId" : "XXXXXXXX-1e47-abcd-ba66-XXXXXXXXXXXX", "clientUserId": "XXXXXXXX-abcd-4284-aa45-XXXXXXXXXXXX", "username" : "jane.doe@gmail.com", "scenario" : "TestScenario.grs", "scenarioPath": "C:\\Users\\jDoe\\Downloads\\output", "inMemory" : true }