Projects



Changes between Version 23 and Version 24 of CloudNativeRenew


Ignore:
Timestamp:
Mar 29, 2021, 3:58:09 PM (4 years ago)
Author:
roewekamp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CloudNativeRenew

    v23 v24  
    6060
    6161=== Extending the simulator on the fly ===
     62Running 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.
     63Therefore it may be desirable to move the computation to a separate plugin, that can be loaded.
     64Cloud Native Renew supports functionality to extend the simulator code with plugins remotely during runtime.
    6265
     66First 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
     70Observe, that the simulation fails to start, because it is missing the class PrimeCompute:\\
     71`No such class: PrimeCompute
     72Status: Cleaning up.`
     73
     74To upload the plugin containing the missing functionality execute the following:\\
    6375`curl -F "pluginJarFile=@de.renew.primecompute-0.1.jar" localhost:8085/upload/plugin?pluginName=primeCompute`
    6476
     77After that the plugin can be loaded via:\\
    6578`curl -X POST localhost:8085/loadPlugin?pluginName=primeCompute.jar`
     79
     80You can now start the simulation with the supplied plugin:\\
     81`curl -X POST "localhost:8085/simulation/start?mainNet=primeDistributor&sns=primeDistributor_withPlugin.sns"`
     82
     83Use the log to observe the number computations printed to the console:
     84`curl localhost:8085/log`
    6685
    6786== Download == #download