Changes between Version 20 and Version 21 of CloudNativeRenew
- Timestamp:
- Mar 28, 2021, 6:48:01 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CloudNativeRenew
v20 v21 30 30 A shadow net system contains just the bare minimum to run a (non-visual) headless simulation. 31 31 To 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.\\ 32 To just try functionality you can also just use the supplied example `primes.sns` file. 33 The 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.\\ 33 34 To upload a shadow net system and start a simulation follow these steps:\\ 34 35 * Create a shadow net system by doing either of these steps: 35 * You either can use the supplied ` example.sns` file or36 * You either can use the supplied `primes.sns` file or 36 37 * 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 37 38 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'` \\ 41 42 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. 42 43 Within the intended deployment, that was shown in the figure above, Renew instances are headless anyways and do not have any graphical output. … … 45 46 It is possible to control a running simulation over HTTP. 46 47 To 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`\\48 The 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`. \\ 48 49 You can alternatively use the method described [#upload above] to upload a shadow net system and start a simulation with it remotely. 49 50 As noted earlier, this method will not show graphical feedback, while starting through Renew directly does.