What is Rayjas
Rayjas is a microframework and a system based on a concurrent programming design (async io) which in turn is a language-agnostic paradigm (model). Rayjas is built on the concept of cooperative multitasking. It is powered by an asynchronous system of processing. That said it can also make use of threading processing if needed. Rayjas is known to work with a low memory footprint while having good integration with the operating system as well as various IO services locally and across the network.
Rayjas is a therefore good candidate for both low-power PI devices and high-performance Linux servers involving various IO tasks across the system and over the network. Thanks to widespread extensive third-party libraries on it can be used to do various kind of small and big automation tasks.
Rayjas is built primarily with python3 and can therefore run easily on different operating systems and CPU architectures (64bit ARM/INTEL/AMD). Combined with a virtually unlimited stack of open-source python libraries on Git and a capability of asynchronous multitasking, the sky is the possibilities are endless.
Designed with lightness in mind. Runs anywhere. Deploy on heavyweight Linux servers or lightweight Raspberry PI.
Capability to address each problem with a modular approach. Individual modules to take on unique problems. Configure modules to add/remove functionality.
Create API wrappers, build cloud integrations, system integrations, monitoring solutions, responsive event triggers and more..
Because of the versatility of the language and the purpose that Rayjas is built on it can take on a variety of tasks across various domains. Although at the moment you can see it as a micro automation system.
- SYSTEM SERVICE:
Rayjas is built to run as a background service (24×7), similar to any other system services on the operating system. through
systemd, it can be configured as a natural system service with auto-start behavior on popular Linux distros as well as Raspberry PI (and variants). This means it can be used for system monitoring and watchdog tasks.
- API HOST:
Rayjas can also act as a minimalistic web server processing HTTP requests made by browser/headless clients & executing tasks on REST API calls.
- SERVICE MEDIATOR:
Rayjas specializes in handling IO tasks. Therefore it is a good fit candidate to sit between different types of services that use different protocols to communicate. ie: It can listen & communicate on MQTT/HTTP/WebSocket & the operating system shell at the same time. Therefore it can act as a mediator between various entities.
- REALTIME COMMUNICATIONS:
Rayjas supports WebSockets which can be enabled/disabled via configuration. Using WebSockets it can transport data in real-time between client and server/operating system.
- CLOUD SERVICES MESH
Rayjas, written in python can integrate with different cloud platform services across various providers using their REST apis or through special SDKs. This allows rayjas to consume different services from multiple cloud platforms asynchronously pseudo-simultaneously. Example: Rayjas can read the list of files in a S3 bucket while simultaneously talking to an IOT device on linode (self hosted MQTT server) and spinning a computer instance on GCP.
- PROTOCOL BRIDGE
Rayjas can be made to act as a realtime protocol bridge by bridging messages between WebSockets, MQTT, HTTP and other protocols due to its asynchronous behaviour. Internally Rayjas outlines Websocket communication by mimicking MQTT style topic paths. This makes it easy to send and receive messages on a specific topic path. Aut augment this, we can write custom modules that can sync these messages with other endpoints that can translate message source/destination into similar message paths.
- SCHEDULED I/O TASKS
Rayjas provides a simple scheduling mechanism, with when coupled with its rule-based ReactionEngine allowed us to trigger code snippets, script executions, API calls and more at scheduled times (defined using rayjas rules)
What not to expect
- HEAVY-DUTY DATA PROCESSING:
Rayjas is not designed for long-running tasks and heavy-duty processing. Although it is still possible to delegate such tasks via threading or inter-process communication.
- CPU INTENSIVE TASKS:
Rayjas is based on a technology that is mainly IO-focused. IO Tasks can be handled in a non-blocking manner without much pain. This is however not true for CPU Intensive tasks. CPU Tasks are generally not asynchronous and tend to be blocking in general.
Rayjas was originally built as a microframework for some simple home automation tasks. The primary job of the system was to help manage and orchestrate a few custom IOT Devices based on Arduino and NodeMCU units over LAN.
The basic tasks included making HTTP calls to check on device states and invoke commands on them. To make this more centralized Rayjas was deployed on an orange PI which would sit in the same network to communicate directly with the devices while also being connected to the internet.
Therefore on one end, it would facilitate communication with devices on LAN via HTTP and on another end, it would connect to various services on the internet (be it cloud services on AWS or telegram API service). In theory, it would be similar to a very limited type of AWS IoT Greengrass deployment, where the software is deployed on an edge device and is capable of creating a hybrid (local + cloud) experience.