Intercept Library for User-Level Message Filtering
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Standardized application programming interfaces (APIs) hinder modifications to the underlying data processing system structure, making it difficult to implement performance improvements without modifying the application or API, and existing intercept libraries lack flexibility for message filtering without kernel intervention.
Innovation Solution
A data processing system with an intercept library that intercepts API calls and uses a callback function to filter messages at the user-level network protocol stack, allowing for message discarding without modifying the application or API, and a configuration data structure to define actions for specific call sequences.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If standardized APIs are used, then application compatibility is improved, but system adaptability deteriorates
Solution Approach 1:
An intercept library is introduced as an intermediary layer between the application and the standardized API. This intercept library captures API calls, applies custom filtering logic, and forwards requests to the standard API, thereby maintaining compatibility while enabling system-specific adaptations without modifying the application or the standard API itself.
2Adaptability or versatility
If message filtering is performed at the kernel, then filtering capability is improved, but system complexity deteriorates
Solution Approach 1:
The intercept library serves as a user-space intermediary that provides message filtering functionality without requiring kernel modifications. It intercepts API calls at the user level, applies filtering rules, and processes messages before they reach the standard network stack, thereby achieving filtering capability while avoiding kernel-level complexity.
3Reliability
If messages traverse the network protocol stack, then protocol processing is improved, but processing overhead deteriorates
Solution Approach 1:
The intercept library performs preliminary filtering of messages before they are passed to the full network protocol stack. By examining and potentially discarding messages at the intercept layer, the system avoids the overhead of complete protocol stack processing for messages that will ultimately be filtered out, while still maintaining proper protocol processing for messages that require it.
Data Source
Figure 1~2
AI summary
A data processing system comprising: an operating system providing a socket library; an application supported by the operating system and configured to receive messages at a socket established by means of the socket library; a user level network protocol stack operable to perform receive processing of messages held at a receive queue corresponding to the said socket; and a callback function operable to determine on behalf of the application whether to discard a message held at the receive queue; wherein the application is operable to make a plurality of different calls of a first type to the socket library that cause state of the receive queue of the said socket to be revealed and the callback function is registered with the user level network protocol stack such that, in response to calls of the first type, the user level network protocol stack invokes the callback function in respect of each message held at the receive queue so as to cause the callback function to indicate to the user level network protocol stack whether each respective message at the receive queue is to be discarded.