Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
EDRI is a framework designed to simplify the development of parallel and distributed applications. It allows developers to efficiently run code across multiple threads, processes, or even machines by leveraging an event-driven architecture. EDRI emphasizes flexibility and scalability, enabling the development of systems that can handle complex workflows with ease.
The framework is ideal for applications that require high throughput, low latency, and the ability to scale horizontally across distributed systems. It is designed to handle dynamic, real-time data processing and communication through the use of well-defined events.
Event-Driven Architecture: EDRI uses events as data packets to enable communication between multiple senders and recipients. Events can be notifications, requests, or tunnels, each serving a specific communication purpose.
Routing Infrastructure: The exchange and delivery of events are managed similarly to TCP/IP in computer networks. The router directs events to appropriate recipients based on event types, ensuring efficient communication.
Scalable Architecture: The framework supports running tasks as methods, threads, and processes, allowing for scalable and parallel execution of tasks across multiple computing nodes.
Flexible Components: EDRI includes various components such as Router, Manager, Worker, Scheduler, and Key-Value Store, each designed to handle specific responsibilities within the system.
Events are data packets created using Python data classes to enable communication between multiple senders and recipients. They serve as the core communication mechanism within EDRI and can be categorized into:
Events are strictly defined to ensure clarity and consistency across the system. They can carry responses or simply announce actions, depending on their type.
The Router is the central component responsible for forwarding events between different parts of the framework, typically managers. It ensures that events are delivered to the appropriate recipients based on their event types.
Key responsibilities of the Router include:
The Connector is a specialized part of the Router that manages the connection between the Router and external systems (referred to as the Switch). It handles:
The Manager distributes tasks contained in the transmitted events to individual workers. It supports running tasks in various modes:
The Manager also handles data transfer for tunnels and subscribes to the event types it needs to receive.
The Scheduler is a special type of Manager used for time-defined event sending. It enables scheduling tasks or events at specific times, such as:
The Key-Value Store is another specialized Manager that provides a built-in storage mechanism for caching and retrieving data. It is useful for:
Workers are classes defined by the programmer to perform specific tasks or operations. They are the execution units in the EDRI framework and can be customized to handle a wide range of functionalities.
The API serves as the interface between clients and the EDRI system. It handles:
Features of the API include:
EDRI is suitable for applications that require:
To start using EDRI:
Define Your Events: Use Python data classes to define the events that will be used for communication between components.
Set Up Your Router and Managers: Initialize the Router and any necessary Managers (including Scheduler and Key-Value Store if needed).
Implement Your Workers: Create Worker classes that perform the specific tasks required by your application.
Use the API: Utilize the API to interact with the system, handle client requests, and facilitate communication.
Run and Monitor Your Application: Execute your application and monitor the event flow to ensure everything operates as expected.
EDRI provides a robust framework for developing scalable, parallel, and distributed applications using an event-driven architecture. By abstracting the complexities of inter-process and network communication, it allows developers to focus on implementing the core logic of their applications.
Whether you're building a real-time data processing system, a distributed service, or any application that benefits from parallel execution, EDRI offers the tools and structure to make development more manageable and efficient.
FAQs
Event Driven Routing Infrastructure
We found that edri demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.