Projects



Changes between Version 20 and Version 21 of CloudNativeRenew


Ignore:
Timestamp:
Mar 28, 2021, 6:48:01 PM (4 years ago)
Author:
roewekamp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CloudNativeRenew

    v20 v21  
    3030A shadow net system contains just the bare minimum to run a (non-visual) headless simulation.
    3131To create a shadow net from a regular Renew .rnw net definition file, you can use Renew user interface.
    32 To just try functionality you can also just use the supplied `example.sns` file.\\
     32To just try functionality you can also just use the supplied example `primes.sns` file.
     33The example net will compute prime numbers in basic fashion and is not meant to be competetive with other prime number generators but to show an example concurrent workload.\\
    3334To upload a shadow net system and start a simulation follow these steps:\\
    3435* Create a shadow net system by doing either of these steps:
    35  * You either can use the supplied `example.sns` file or
     36 * You either can use the supplied `primes.sns` file or
    3637 * You can also create a shadow net system yourself: Open up a Renew instance (or use the one spawned by the startup earlier), draw a reference net (or multiple), save all of your nets with a specific name each (File -> Save Drawing As...), and hit File -> Export -> Export all drawings (merged file) -> !ShadowNetSystem
    3738   Close the net drawing(s), but not Renew itself.
    38 * Assume the shadow net system file is namend `example.sns`: Upload the net using:\\ `curl -F 'snsZipFile=@example.sns' localhost:8085/upload/sns?fileName=example.sns`
    39 * After uploading you can start a simulation. Assume you named the main net within `example.sns` also `example`.
    40  * Use this command: `curl -X POST 'localhost:8085/simulation/start?mainNet=example&sns=example.sns'` \\
     39* Assume the shadow net system file is namend `primes.sns`: Upload the net using:\\ `curl -F 'snsZipFile=@primes.sns' localhost:8085/upload/sns?fileName=primes.sns`
     40* After uploading you can start a simulation. Assume you named the main net within `primes.sns`: `primeDistributor`.
     41 * Use this command: `curl -X POST 'localhost:8085/simulation/start?mainNet=primeDistributor&sns=primes.sns'` \\
    4142   Note, that shadow net systems do not hold graphical information, therefore you will not be able to see the simulation within the spawned Renew instance, but you should be able to observe the console output generated by the running simulation.
    4243   Within the intended deployment, that was shown in the figure above, Renew instances are headless anyways and do not have any graphical output.
     
    4546It is possible to control a running simulation over HTTP.
    4647To do you, you need to set up a simulation first.
    47 The most simple way to do so is to draw (or load) a net, like the supplied `example.rnw` file and start a simulation from within the Renew GUI: `Simulation -> Start Simulation`\\
     48The most simple way to do so is to draw (or load) nets, like the supplied `primeDistributor.rnw` and `primeCompute.rnw` file and start a simulation from within the Renew GUI: `Simulation -> Start Simulation` while having selected `PrimeDistributor`. \\
    4849You can alternatively use the method described [#upload above] to upload a shadow net system and start a simulation with it remotely.
    4950As noted earlier, this method will not show graphical feedback, while starting through Renew directly does.