Visual Programming | Create Microservices/Monoliths Faster Than Cooking 2min Noodles
This blog throws light on low code Drag N Drop platforms that embrace the concept of Visual Programming and suggests how these platforms come in handy when the time to market is a priority.
Node-Red by IBM is one such opensource Drag N Drop platform that is taken as an example in this blog to present a fully-featured event-driven platform.
Node-Red not only simplifies the creational and structural concerns for Software Architects but also helps in curbing staffing problems by promoting flow-based visual programming.
What is Visual Programming?
A Visual Programming Language (VPL) is any programming language that lets users create programs by manipulating program elements graphically rather than by specifying them textually.Source: Wikipedia
Benefits of Node-Red
Simplification
As the name no-code/low-code indicates, coding is eliminated and programming is intuitively completed with a minimal number of operations needing to be used.
Efficiency
Node-RED flow editor takes care of building the application execution environment, library synchronization, the integrated development environment (IDE), and editor preparation so that you can concentrate on development.
High Quality
High quality is the true value of flow-based and visual programming. Each node provided as a component is a complete module that has been unit tested.
OpenSource
Node-RED is an open-source piece of software under the Apache2 license.
Node-Red library
Although Node-Red implements all aspects of CRUD operations but also provides placeholders for writing custom logic in NodeJs, for those who find it difficult to practically implement SOLID design principles.
Node-Red alternatives
- Blockly by Google (https://developers.google.com/blockly)
- N8N (https://n8n.io/)
- Camunda (https://camunda.com/)
- Imixs Workflow (https://www.imixs.org/)
Setup
docker run -it -p 1880:1880 -v $PWD/data:/data nodered/node-red
Node-Red Based Event Driven Architecture
1. Implementing Simple REST Controller
2. Node-Red | MongoDB CRUD Operation
Mlab — Mongo As A Service
Configure MongoDB in Node-Red
3. Event-Driven Microservice | Kafka Integration
Cloudkarafka — Multicloud Vendor For Kafka As A Service
Conclusion
- Created Event-Driven Microservices without even writing a single line of code.
- The microservice architecture can be exported in the form of JSON configuration and packaged as a docker image.
- It takes almost 2min to create an event-driven microservice with Kafka and Mongo integrations using Visual programming.
- Each component of microservice is unit tested by default.
- Node-Red offers thousands of npm modules for integrations with multiple channels eg. SMTP, Cloud Services, Messaging Queues, etc.