Skip to main content

Introduction

Smow is a flow based programming language. The main feature of Smow is that the user doesn't have to write hundreds of lines codes instead, just create the flow of the code smartly using Smowcode Studio. This way the users can create their projects effectively.

Types of nodes​

  • Event nodes: Event nodes are the nodes which trigger an event. These nodes do not have any input. The node connected to these event nodes will perform their activity only when the event node will trigger an event.

  • Activity nodes: Activity nodes are the nodes which actually perform some activity or task. These nodes have an input as well as an output. When the activity nodes recieves input from the previous node, it will start performing its activity and produce an output.

Your first flow​

First Flow

Lets understand Smow with the help of a basic flow. The Node 1 is an event node as it does not has any input. It will trigger an event to the next node connected, which is Node 2. The Node 2 is an 'Activity node' as it has an input as well as an output. Now, as the Node 2 recieved the input from Node 1, it will start performing its activity and will produce an output. When the Node 2 finishes its activity, the next node connected which is Node 3 will get triggered and start performing its activity. Finally, when the Node 3 finishes performing its task, the flow will again start from the event node i.e Node 1.

Parallel Flows​

Parallel Flow

Let us now understand the functioning of parallel flows. One of the most salient features of Smow is, the functioning of parallel flows. The two flows will be executed parallelly along with each other at the same time and independent of each other. When the Node 1 will trigger an event to the Node 2, at the same time Node 4 will trigger an event to the Node 5. Then Node 2 and Node 5 will perform their activities and so both the flows will be executed parallelly and independent of each other.

Queue size​

The 'Queue size' of the wires connecting the nodes is 1. Lets understand what is queue size. We have learnt that 'event' nodes trigger an event to the next node. We set a specific time interval for the 'event' node. The 'event' node will trigger an event after the specfic time interval set. Now, the 'activity' node connected to the 'event' node may or may not have finished performing it's task before the 'event' node triggers an event. If the connected 'activity' node has not finished its activity, the event triggered by the 'event' node will be registered in a 'Queue'. The 'Queue size' of 1 indicates that when the 'activity' node has not finished performing it's activity, a maximum of 1 event triggered by the 'event' node will be stored in 'Queue'.