608B71FC-006A-4934-A643-7D9BA9340450Blog

Debugging Performance Issues in Node.js Streams using Drain and Pause Events

blog__author-img
Michał Czapracki
CEO at Scramjet, Data Streaming Expert.
23F2E8CD-3026-46A5-86CC-D13114F7176E425AE875-B1A1-4EA1-8529-075D08DA0BB1

30 January 2023

In today's world, both cloud computing and data processing are dispersed, often inaccessible, and riddled with restrictions. The result is that many industries are left out of innovation and digital transformation.

Despite the obvious revolution that serverless has brought to developers' work, not everyone is able to embrace its pros since the migration disadvantages can be overwhelming. Cloud computing is no longer just a buzzword; it's still debatable if it can be used in every case.

Transform as a Service essentially puts an end to this debate by democratizing serverless.

We believe that it can become a standard in data processing and usher in a world where any company can interact with the cloud in an easy and affordable way, no matter where they are located or what their needs are.

It just needs a little twist - which we invented.

Meet Transform as a Service.

Transform as a Service - what is it exactly, how does it differ from Function as a Service, and why does it lead straight to digital innovation?

The Cloud Challenge

“Cloud computing is empowering; companies leveraging cloud will be able to innovate cheaper and faster.” - Jamal Mazhar, Founder and CEO, Kaavo

One cannot disagree - cloud solutions changed the world.

In recent years, organizations have been migrating to the Cloud, one of the main drivers of digital transformation, and the Covid-19 pandemic has accelerated this trend.

Even so, the cloud solutions have quite a few compromises and limitations, such as vendor lock-in, cost uncertainty, or cold starts.

All the wrong things with “traditional” Serverless

In addition, entire industries have been barred from participating in the cloud revolution. Here we mean BigData, IoT, or Genomics, just to name a few. What connects them? Serverless in its present form does not fully satisfy any of them.

Currently, Serverless, which is offered in the Function-as-a-Service format by leading vendors, will not work in many use cases - due to many disadvantages and limitations. Despite its reputation as a savior of scalable infrastructure, the reality is that bright for everyone interested. And after first being heard of in 2014, the concept of FaaS has worn out a bit with the changes in technology and requirements over the last 8 years.

It also poses challenges when it comes to processing real-time data. Additionally, since it isn't accessible outside of the cloud, it presents accessibility issues. To make matters worse, it is slow and restricted.

And even though there are tools available on the market today to improve Serverless, all aiming to improve the experience for developers and businesses in some way, they may still not make do.

These systems simply orchestrate existing systems thus hiding but not solving the underlying problems.

TaaS solves them.

Here comes Transform as a Service

In a nutshell, Transform-as-a-Service is an out-of-the-box cloud computing service that leverages long running, stateful processes that allow processing vast volumes of data on the fly without the complexity of current streaming systems.

In contrast to FaaS/serverless, TaaS is an evolution that can address a wide range of needs and use cases. The benefits of FaaS and IaaS are combined in TaaS, which allows developers to take advantage of stream processing in serverless deployments.

Transform as a Service benefits

As a new approach to serverless streaming, TaaS bundles the benefits of Stream Data Processing, Serverless apps and a Gateway API. The underlying technology removes the need for integration of multiple systems, making it significantly less complex and easier to use. Yet TaaS still provides all of the same functionality, only in a faster and more efficient way.

The system can be deployed to any location, which is a rethinking of the architecture as a ubiquitous cloud that meets the premises. The benefits of this include:

  1. Cost, time, and limit savings

    Developers can avoid some of the limitations imposed by public clouds like cold start, data size, and runtime restrictions once they can process data already on the fly on a lower budget. Furthermore, these improvements will substantially reduce the resources needed for processing (memory usage, time, and therefore money), which creates completely new possibilities in the cloud.

  2. Integrations and connections

    The cross-native approach to the cloud allows each process to take advantage of native efficiency in any environment and programming language. As a result, TaaS will allow programs to run seamlessly between endpoint devices (smartphones, drones, measuring devices) and private servers on 5G networks, or between private and public clouds. It also eliminates the need for software developers to be specialists in security and computer networking. Distractions can be put to rest so the team can focus on the code or more strategic tasks.

  3. Easier to use and set up

    By using TaaS, users can deploy their services/systems/apps from their laptop in just a few keystrokes and have the power of the cloud at their fingertips - to process terabytes of data from multiple sources or serve thousands of clients. The TaaS model eliminates the need for users to own or lease infrastructure (outsourcing) and go cloud-native. Yet it also enables users to deploy their services for different parts of the processing whenever suitable to any piece of infrastructure they may have (owned or leased) in order to leverage both local and cloud infrastructure, in a cross native approach. As a result, architectures can be optimized and adapted to specific usage needs (processing of sensitive data, special servers for machine learning, just to name a few examples) - and those environments can be linked seamlessly.

  4. Optimization of usage

    This model (similar to FaaS) allows clients to scale up and down automatically and only pay for the services they use (pay-per-use). Automating infrastructure at this level is the most efficient use of server power.

  5. More control

    Migrating from one vendor to another can be extremely time-consuming and complicated with Serverless. As far as how functions can be written, deployed, and managed, serverless systems tend to add yet another layer of complexity on an already complex system. In addition, with serverless applications, developers must also monitor the integrations between the various services to ensure that the application runs smoothly over the entire distributed system.
    There's a good chance that it will be a mess.
    Without compromising quality and delivery, businesses can experience improved control and flexibility through TaaS. This allows for a level of control over your system that is not currently possible with existing vendors.

  6. Another level of data processing

    TaaS eliminates the need to set up complex data processing clusters and to have expert data engineering knowledge. Transform as a Service is capable of processing data in a variety of formats from arbitrary inputs and can be installed in a variety of environments. It is also possible to process large amounts of data without consuming large amounts of computing power in your infrastructure.

TaaS vs FaaS

By providing a new approach to interacting with data processing, Transform-as-a-Service upgrades Function-as-a-Service dramatically, and opens up new opportunities.

FaasTaaS
Examplese.g. Lambda, Azure FnTransform Hub
Data sizeLimits apply (for example, 6 MB limit for invocation payload)unlimited (no limits on input size)
Execution timeLimits apply (for example, 15 minutes for Function timeout limit)unlimited (24+ hours guaranteed)
Price ratio$$$
Location and environment spanningsingle service providers without standardizationsflexible Cross-Native approach (Edge & Cloud)
Data processingproxies, queues, gatewaysreal-time processing
Scalability dimensionsparallelismparallelism, concurrency, sequentality
Start latencyup to 2 seconds0.00001 seconds

We covered the comparison in more detail here.

Transform as a Service: industries

TaaS can be used for a variety of scenarios, industries, and models as we've discussed. Listed below are only a few.

  1. Processing of local data in a hybrid model

    Presently, Serverless systems require customers to deliver processed data to the cloud themselves before processing. Through TaaS, consistent data processing systems can be implemented simultaneously at the place of their storage, in the edge cloud (5G), and in the public cloud. Here we are talking batch and stream processing, video analysis, and data transformation.

  2. FaaS systems and solutions

    Systems in use today have high unit costs, significant limitations and delays that accumulate as complex systems become. With TaaS, these issues can be solved by reducing latency, deploying a uniform system of deployments to multiple environments, and significantly optimizing the costs.

  3. Real-time data processing

    In real-time systems, data is continuously produced. It is wasteful to handle them through request-response systems. Transform as a Service introduces a model in which data is processed continuously, ensuring consistency and durability of processes.

  4. ML & AI

    Majority of machine learning projects are concerned with providing homogenous and coherent data for the models. Introducing a serverless model to these operations will enable TaaS to optimize and reduce the complexity of these systems.

  5. Creating data hubs

    Serverless systems are unable to create data or determine their rules and time of creation on their own. In any case, the software of data generation and acquisition systems can be integrated with TaaS.

  6. Big data processing

    Public clouds process data at the point of its existence, and transferring data to the cloud is a time-consuming and complicated process. TaaS will enable the implementation of programs that are able to process and transform data while it’s being transferred. With this, Azure can work on data stored in AWS, filtering and compressing the data as needed, on both sides.

  7. Process management

    Due to time and size limitations of processed data, serverless seems problematic in many event-based systems in which events are of a process nature. By using TaaS, you can create and scale pipelines of operations without any time or size restrictions.

Scramjet + TaaS

Scramjet offers three products in one platform: a data processing engine, serverless applications and complete API with CLI (covering both I/O and management endpoints).

We introduced Transform-as-a-Service - a novel approach to serverless computing.

You have full control and freedom over your IT system in the cloud since a cross-native model that is flexible, universal, persistent, and effective.

By changing the way developers interact with Cloud, we enable a whole new world of innovation and use cases.

Photo by Ian Schneider on Unsplash

Project co-financed by the European Union from the European Regional Development Fund under the Knowledge Education Development Program. The project is carried out as a part of the competition of the National for Research and Development: Szybka Ścieżka.