How to: Develop Smart Solution, Snap4City development Life Cycle, Fast Prototyping

The design and development of IOT Cyber Physical System/Solutions, CPS, is much more complex than regular software developments approaches for SW life cycle. An aspect that they share is the adoption of strongly dynamic microcycles.

The Development Life Cycle of Snap4City Solutions involves a number of specialized tools such as those for Maps, Dashboards, etc.,

In the Figure The Development Life Cycle is presented. In the Figure, dense lines represent regular transitions from one phase to the next, while  dashed arrows are representing returning back to the previous phase for improving and correction.

The main phases are:

  • Analysis: phase in which the comprension of the problem with the identification of requirements and definition of the specification is performed. This phase has to answer at questions such as: What the solution should do?, who is going to use the solution? when they are going to use? what they expect to obtain from the solution? ...
  • Design phase has to produce information as the data to be used, the processing to be implemented and the  results to be produced and in which form in terms of visual rendering, etc.
  • Data Discovery: phase is the process by means of the developers should verify if the Snap4City platform has already the needed data for  their solution and, if the needed data are accessible, if they can be found elsewere and integrated in some manner and how, etc. In the needed data are missing, the phase of Data Ingestion has to be addressed otherwise one could directly pass at the IOT App Development or to Dashboard Development.
  • Data Ingestion process can be performed in several different manners: installing new IOT Devices, identifying and ingesting data form excel tables via Data Gate, ingesting data via the development of ETL processes or Web Scraping tools or by using IOT Applications also; defining KPI for storing and collecting data, and may be getting data from external  services. Once collected the data the process may continue to the IOT App Development or to the directly to the Dashboard Development.
  • IOT application development is the activity to implement data flow logic on the basis of a large collection of MicroServices (Node-RED Nodes) which are: the standard nodes provided into the IOT App Editor, those provided by Snap4City (more than 150 smart city MicroServices, which can be installed direcly from the Node-RED library, repository of Palette); any other MicroServices/Node from other Libraries of Node-RED nodes and frome the web since Node-RED is very diffuse. Moreover:
    • during the IOT App Development, the development of some: (i) Data Analytics in some specific language may be needed (they are transformed into MicroServices by Snap4City tools), (ii) Special Tools  Development for implementing specific algorithms and tools which include their own visual interface, (iii) dashboard which can be directly integrated into the IOT Application or not.
    • It should noted that in some cases of IOT App Development, the development of Data Analytics, as well as the Development of Dashboards are optional
  • Dashbord Development. The Snap4City Dashboards may include input/outputs widgets from IOT App Elements, rendering from historical data, special tools, external services, maps, what-if tools, heatmaps, trajectories, OD matrices, etc. So that, into a Dashboard several aspects can be integrated including the interactive widgets for closing the loop with the logic of the applications which is the IOT Application itself.
  • Deploy: the mandatory phase in which the solutions (with IOT Application and/or Dashboard) is deployed on Cloud or on IOT Edge. Only after the deploy the Solution is put in execution and can be tested.
  • Testing: the phase in which all the needed testing are performed. Unit testing, regression testing, etc. etc.
  • Publication on production: the final phase which is reached after the acceptance testing, thus the specific smart solution is put in production and made accessible for the users.


In the following, a more detailed description of the Snap4City Development Life Cycle is reported providing reference to the tools which Snap4City put at the disposal of the developers to shortening all the above listed phases. Thus Snap4City fast prototyping environment is provided which allows you to reach the publication 5-7 times faster than any other development environment for Smart City IOT solutions.


Figure: Snap4City Development Life Cycle for Cyber Physical Solutions, where we distinguish among phases,

formal documents, tools and processes, MicroService/Nodes and Widgets of the Dashboards


In the context of Snap4City IOT Smart City development, the Development life cycle should start with the Analysis and Design to produce requirements and specification of the application. This information is collected as details regarding:

  • Data has to be identified on the basis of the scenarios goal. And in particular the data are related to: real time inputs and outputs that could be used; Historical data that could be exploited for showing them on dashboards or for Data Analytics; data to be scraped from Web pages according to the terms of use; private information of the users or entities involved according to GDPR guidelines. This process of data analysis also may imply the Data Discovery on the available Knowledge Bse via Service Map or Data Inspector. If the needed data are not available, specific ingestion processes will have to be developed.  
  • Functional transformations of data and commands, which can be needed on the basis of the data format accessible. This activity could also create business logic of the IOT Application taking into account historical data, inputs, MyKPI, scraped data and Data Analytics to produce outputs on other devices and/or dashboards.
  • Analytical identified which are the data analytic to be developed for the application, if needed. For example, for a Smart Parking a free parking slot prediction will be needed and this should be evident since the analysis. The Data Analytic will have to be developed from scratch or customized exploiting some ready to use MicroServices.
  • Visual Interface. In most cases, the graphic interface is part of the problem since large volume of data to be shown are unmanageble for the user, some visual analytic approach to represent the meaning of the data in glance is needed. A good visual representation may do the difference from a tedious view with respect to a nice user centric view. This part includes the design of the Visual Interface in terms of Widgets and Dashboards. The single elements may be presenting data coming from the data store/shadow, may be directly produced from/to the IOT Application data flow in real time, or may need to be developed as Custom Widgets.


Once the Analysis and Design has been completed, a global view of the Smart Application has been sketched but needs to be implemented. Thus, the different aspects and phases may be addressed by different tools and for large factory also by different teams addressing:

  • Data Ingestion and Modeling. In this case, different tools can be used.
  • Development of Data Analytic. This process is typically addressed by Data Analysts skilled on data science, accessing to historical and real time data and creating specific algorithms such as: prediction, anomaly detection, interpolation, clustering, etc., exploiting libraries and tools of operative research, statistic, machine learning; using languages and development environment provided by Snap4City for online development such as RStudio, Python, Java, etc. The Data Analytic may produce:
  • Data Flow Development (that is the development of the IOT Applications. The data flow development is typically focused on producing outputs on storage,  MyKPI and/or presenting resulting data on some Widget Dashboard. This IOT Application development exploits the Snap4City library of MicroServices/Nodes plus those that may be newly created for the specific solution. The development of some IOT Applications has been presented in the previous section. The IOT Application implements the business logic of the solution and can be deployed (on cloud/container or on IOT Edge). The Deploy can be performed in a sandbox for testing. When the IOT Applications includes the usage of Dashboard Widgets they are created on Dashboard at the moment of the Deploy of the IOT App.
  • User Interface Development (that consists in the development of the Dashboard(s)). The Snap4City Dashboards can be composed by several kind of Widgets mainly classified as
    • IOT App Widget directly produced or that have a counterpart representation into the IOT Application (also called virtual sensors, virtual actuators). These widgets are used for managing event driven graphic elements as inputs and outputs of the IOT Application such as: buttons, messages, switch, gauge, data view, trend, keypad, semaphore status, etc.
    • Custom Widgets which can be produced by using SVG tools and may implement synoptic as specific interaction tools with animations, etc.
    • Regular Widgets taken from the large collection of data viewer of Snap4City Dashboard Builder.


The final result consists of a number of: data ingestion processes, data analytic processes and MicroServices, IOT Applications, and Dashboards connected each other. The above presented Life Cycle in Figure above distinguishes among phases, formal documents, tools and processes, MicroService/Nodes and Widgets of the Dashboards. 


The process of the Development, deploy, testing, validation, acceptance testing, is typically iterative, to arrive at the final deploy in production with an acceptance testing. Then, after that the solution passes to maintenance, and has to be continuously monitored to detect eventual problems, that may spring from: missing data, change of data format, exceptions in the data analytic or in the data flow, etc. All these sources of fault should be managed with a correct design and implementation with error management and fault detection. The best solutions, try to produce a resulting services any way, for example in the lack of data for making predictions via machine learning provide the average values, etc.