Evlua: Optimizing Large-Scale Multi-User Systems

Issues related to overhead and response times are ongoing concerns for many products. Evlua is an innovative Lua-based solution designed to address these issues using event-driven I/O handling in a multi-threaded architecture.

Current Challenges: Limitations of Blocking I/O

Traditional systems often rely on blocking I/O, which presents several operational challenges. We take a look at the factors that contribute to a significant trade-off between maintaining open connections and managing system resources effectively.
Connection Establishment Overhead
Setting up connections, including the TCP 3-way handshake and TLS session setup, can be resource-intensive when performed repeatedly.
Thread Management Inefficiencies
Synchronous app servers typically allocate one worker thread per connection, leading to increased overhead as the number of connections grows.
Connection Management Complexities
To support numerous clients, systems often need to implement strategies for closing connections after a set number of requests or time period, potentially impacting performance.

Meet Evlua

Evlua: A Novel Approach to Event-Driven I/O

Evlua addresses these challenges by implementing event-driven I/O handling for both network and file-based operations.

This approach enables systems to maintain open connections with reduced overhead, potentially leading to improved average response times for server requests.

Modern Tech Stack | Tekenlight

Efficient Event Management

Event processing for optimized polling and event handling on the server side.

Building with API Ecosystem | Tekenlight

Optimized Thread Allocation

Implementation of a fixed number of worker threads, typically matching the number of server cores or a small multiple thereof.

Product Management | Tekenlight

Advanced Request Multiplexing

Adoption of client request-level multiplexing, ensuring more equitable distribution of server resources across all client requests.

This approach enables systems to maintain open connections with reduced overhead, potentially leading to improved average response times for server requests.

Comparative Advantages

While existing solutions offer certain benefits, they also have limitations. Evlua aims to provide the advantages of an event-driven, multi-threaded system within an interpreted environment, addressing these limitations.
Single-threaded Event Loop
Many existing solutions operate on a single-threaded event loop, requiring multiple processes to fully use machine capacity.
Asynchronous Events
Many event-driven platforms require developers to manage asynchronous events using platform-specific constructs, potentially increasing code complexity.
Lack of Interpreted Environments
Golang addresses these issues, however Evlua operates on a scripted/interpreted environment, bringing its own benefits.

Explore Evlua on GitHub

Win with Evlua

Technical Innovation through Evlua

We take a look at the three technical innovations that we have brought in through Evlua to address the challenges mentioned earlier.

Event-Driven File I/O

One of the key components of Evlua is its approach to file I/O, which is specifically designed for server program requirements.
ef_read
This function returns data synchronously when it is available in the buffer, and asynchronously with a callback, when data is not available. This allows for efficient thread management.
ef_write
Implemented as a non-blocking operation, ef_write enables immediate data copying to a buffer with asynchronous disk transfer, optimizing data transfer speeds.
These functions are designed to work seamlessly with eventing libraries such as libev, enhancing overall file I/O efficiency.

Event-Driven TCP Server

Another key component of Evlua is its approach to the TCP server.
evpoco
evpoco is one of the main components of Evlua which provides a multi-threaded TCP server. Forked from POCO, the evpoco controller threads schedule either new tasks or those for which IO has been completed on the wait queue. The worker threads pick up the tasks ready for execution and process them.

Event-Driven service utils

Service utils is a lua library used in conjunction with evpoco. It provides various API to make development of applications easy
List of utils
• HTTP Request and response utilities
• JSON/XML parsing and generation
• SMTP client utility
• HTTP/TCP client utility
• Security (TLS, encryption and hash)
• Postgresql database connector
• Redis connector
• Caching
• ORM tools
• Other utils

All this is done using evpoco, thus in an asynchronous and event-driven manner, while the application programmer gets a uniform simple interface without promises or callbacks.

Explore Evlua on GitHub

Evlua represents a significant improvement in the management of large-scale multi-user systems. By addressing the limitations of traditional blocking I/O and current event-driven platforms, it creates new possibilities for developing high-performance, scalable applications.

For organizations handling file uploads, report generation, or complex multi-user environments, Evlua’s approach to event-driven I/O may offer substantial operational benefits.

At Tekenlight, with over three decades of experience in building architecture platforms, we are well-positioned to assist in implementing Evlua to enhance your technology infrastructure. We invite you to contact us to explore how Evlua can be used to optimize your multi-user systems and overall technology stack.

Products

Consulting

Engineering

Let's schedule a call to understand your requirements.

Just submit your details and we’ll be in touch shortly.

Please enable JavaScript in your browser to complete this form.

Our leadership team

Sudheer HR

Sudheer has 25+ years of experience in software products and technology. He was working in Infosys-Finacle heading product development for one of the products in Finacle suite. Subsequently he worked in Tally Solutions , involved in the design of one of the strategic technology projects.
LinkedIn

T S Vijayaraghavan

Vijay comes with over 25 years of experience in various functions of software and solutions delivery and consulting. Prior to Tekenlight he worked with Infosys delivering solutions for global clients and in marketing. After this stint, he was handling technology in a media content-based startup.
LinkedIn

Dheeraj Agarwal

Dheeraj Agarwal

Dheeraj is an experienced Software Product Leader with a passion for sustained innovation. With 20+ years of technical excellence, he excels in building teams and managing large projects through innovative solutions. His expertise includes product engineering, enterprise application architecture, and large application system design. Dheeraj is a principled leader with a keen eye for detail, and a talent for breaking down complex projects into manageable pieces.
LinkedIn

Chhavi Jain

Chhavi Jain

Chhavi brings over 12 years of extensive experience in software development and product management to her current role at Tekenlight. Before joining Tekenlight, she spent five years as Director and Co-founder of Rich Brains Preschool, gaining valuable entrepreneurial experience and honing her leadership and management skills.
LinkedIn

Aashish Bansal

Aashish Bansal

Aashish is a versatile marketing professional with 15+ years of experience delivering global B2B and B2C campaigns for global brands. He excels at working at the intersection of Marketing, Technology, Content, Creative and Consumer Behaviour, bringing the best of each together to create compelling campaigns. With his skills in user experience, product strategy, design, content, social media, branding, and digital marketing, he helps brands stand out in today's crowded marketplace. Aashish works as a consultant with Tekenlight on turnkey engagements.
LinkedIn

Our Advisors

Rangan Varadan

With 25+ years of experience in financial services and IT sectors, he is the Co-founder of BeyondSquare and MicroGraam. Rangan has a Doctorate degree in Finance from Lehigh University and is a Chartered Accountant and Cost & Works Accountant.
LinkedIn

Vidya Sudheer

Vidya Sudheer

Vidya is an experienced medical professional and currently the Lead Consultant and Head of Department in the Department of Histopathology at Manipal Hospital.
LinkedIn