SDL4Snap ! is a Snap ! library with a minimal implementation of the modeling Specification and Description Language (SDL) in Snap ! and Snap4Arduino.
Yoy can find an introduction to SDL here, a tutorial (vintage) here, and an introduction to modeling with SDL here.
Try it at: Hello World!
The PingPong example can be considered the "Hello World" of a SDL based multi-agent system. An online runnable example can be found here.
To import the PingPong SDL model into UMLetino, copy the following URL to the clipboard, and then paste it when "File Import":
https://raw.githubusercontent.com/pixavier/sdl4snap/master/examples/PingPong_SDL.uxf
If you only want to import the SDL palette into UMLetino, copy the following URL to the clipboard, and then paste it when "File Import":
https://raw.githubusercontent.com/pixavier/sdl4snap/master/palette/SDL_palette.uxf
Start from the HelloWorld example, and delete the blocks you will not use. Each agent (sprite) has some atributes (local variables) that are needed by the SDL engine, such as "SDL signal input queue" and "SDL state".
To create new processes, duplicate a similar one instead creating it from scratch.
Here you can see the Snap ! translation of the PingPong example:
The scheme of processes communication is described in the classic SDL Forum SDL-88 Tutorial SDL Tutorial, as it is shown in the following picture:
SDL4Snap ! can use MQTT to support distributed messaging over a network. The MQTT4Snap ! extension lets send/receive messages via the MQTT protocol, hence agents (blocks and processes) can run distributed among Snap ! Internet-connected browsers. MQTT4Snap ! "pub" and "sub" blocks, combined to the "send signal" block, as depicted in the following image:
MQTT based systems can be combined with other protocols like HTTP-REST or OPC-UA with another no/low-code tools like Node-RED.
SDL4Snap ! was presented in the Snap!con 2021 Conference.
SDL4Snap ! was presented in the SAM 2021 (MODELS 2021) Conference, with the paper "Combining Low-Code Programming and SDL-Based Modeling with Snap! in the Industry 4.0 Context".



