Changes between Version 23 and Version 24 of CloudNativeRenew
- Timestamp:
- Mar 29, 2021, 3:58:09 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CloudNativeRenew
v23 v24 60 60 61 61 === Extending the simulator on the fly === 62 Running a primality test within a reference net structure is not optimal, as reference nets are optimized to model complex, hierarchical structures and not simple computations. 63 Therefore it may be desirable to move the computation to a separate plugin, that can be loaded. 64 Cloud Native Renew supports functionality to extend the simulator code with plugins remotely during runtime. 62 65 66 First attempt to start the net system `primeDistributor_withPlugin.sns` by executing:\\ 67 `curl -F "snsZipFile=@primeDistributor_withPlugin.sns" localhost:8085/upload/sns?fileName=primeDistributor_withPlugin` 68 `curl -X POST "localhost:8085/simulation/start?mainNet=primeDistributor&sns=primeDistributor_withPlugin.sns"` 69 70 Observe, that the simulation fails to start, because it is missing the class PrimeCompute:\\ 71 `No such class: PrimeCompute 72 Status: Cleaning up.` 73 74 To upload the plugin containing the missing functionality execute the following:\\ 63 75 `curl -F "pluginJarFile=@de.renew.primecompute-0.1.jar" localhost:8085/upload/plugin?pluginName=primeCompute` 64 76 77 After that the plugin can be loaded via:\\ 65 78 `curl -X POST localhost:8085/loadPlugin?pluginName=primeCompute.jar` 79 80 You can now start the simulation with the supplied plugin:\\ 81 `curl -X POST "localhost:8085/simulation/start?mainNet=primeDistributor&sns=primeDistributor_withPlugin.sns"` 82 83 Use the log to observe the number computations printed to the console: 84 `curl localhost:8085/log` 66 85 67 86 == Download == #download