github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/__doc__/create_and_deploy_flow.puml (about) 1 @startuml 2 3 actor "user" as cli 4 participant "storage" as fs 5 participant "w3bstream_backend" as srv 6 participant "event_publisher" as pub 7 participant "vm instance" as vm 8 participant "blockchain" as bc 9 10 == AUTH == 11 12 cli -> srv: POST /auth\nauth 13 srv -> cli: token 14 15 == REGISTER APPLET == 16 17 cli -> srv: POST /applet {token}\n{applet_name, author, publisher...} 18 srv -> srv: register applet, create applet namespace 19 srv -> cli: {applet_id} 20 21 == CLIENT STORE == 22 23 cli -> fs: applet assets 24 fs -> cli: storage location 25 26 == DEPLOY APPLET == 27 28 cli -> srv: POST /deploy {token}\n{applet_id, deploy_version, storage_location}\n{applet_id, deploy_version, assets, assets_md5} 29 srv -> fs: fetch applet assets from `applet_location` or `assets` 30 fs -> srv: applet assets 31 srv -> srv: extract and parse applet deploy info from `applet.yaml` 32 srv -> srv: validating(uniqueness, validation) 33 srv -> fs: store applet info and assets 34 fs -> srv: assets identifier 35 36 srv -> srv: create wasm vm instance 37 srv -> srv: start event monitoring 38 srv -> cli: event pub topic(applet_name@deploy_version) 39 40 == PUBLISHER AUTH== 41 42 pub -> srv: auth 43 srv -> pub: token 44 45 == EVENT MONITORING == 46 47 pub -> srv: event {token} 48 srv -> srv: event data memory mapping 49 srv -> vm : call handler(handler_name,memory_address) 50 vm -> vm : event handle 51 vm -> srv: handler result 52 srv -> srv: store result 53 54 @enduml