|
Ripples 1.0
High Performant Software Architecture For Transaction Processing
|
#include <arpa/inet.h>#include <assert.h>#include <errno.h>#include <sched.h>#include <stdio.h>#include <sys/epoll.h>#include <sys/socket.h>#include <sys/uio.h>#include <unistd.h>#include <time.h>#include "channel.h"#include "config.h"#include "conn.h"#include "log_app.h"#include "lru_cache.h"#include "query.h"#include "utils.h"#include "vectorloop.h"#include "vectorloop_epoll.h"
Functions | |
| static int | vl_fn_channel_messages (vectorloop_t *vl) |
| static int | vl_fn_epoll (vectorloop_t *vl) |
| static int | vl_fn_tcp_accept_conns (vectorloop_t *vl) |
| static int | vl_fn_tcp_read (vectorloop_t *vl) |
| static int | vl_fn_udp_read (vectorloop_t *vl) |
| static void | vl_fn_query_parse (vectorloop_t *vl) |
| static void | vl_fn_query_resolve (vectorloop_t *vl) |
| static void | vl_fn_query_response_pack (vectorloop_t *vl) |
| static int | vl_fn_tcp_write (vectorloop_t *vl) |
| static int | vl_fn_udp_write (vectorloop_t *vl) |
| static void | vl_fn_query_log (vectorloop_t *vl) |
| static void | vl_fn_tcp_conn_timeouts (vectorloop_t *vl) |
| static void | vl_fn_tcp_conn_release (vectorloop_t *vl) |
| static void | vl_register_listeners (vectorloop_t *vl) |
| vectorloop_t * | vl_new (config_t *cfg, int id, channel_bss_t *res_ch, channel_log_t *app_log_channel, channel_bss_t *query_log_channel, metrics_t *metrics) |
| void * | vl_run (void *arg) |
Copyright (c) 2025 Faruk Grozdanic
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
static |
Vectorloop function processes messages received on channels.
Channels vectorloop receives messages on are:
| vl | Vectorloop operating on. |


|
static |
Vectorloop function polls epoll for events.
Each vectorloop has its own epoll file descriptor with witch all connections are registered for events EPOLLIN (data available to read) and EPOLLOUT (writable). Connections are registerred for Edge Trigger notifications, see Linux manual page "man epoll" for full details on what Edge Triggered means.
| vl | Vectorloop operating on. |


|
static |
Vectorloop function to log processed DNS queries.
| vl | Vectorloop operating on. |


|
static |
Vectorloop function parses newly received queries.
| vl | Vectorloop operating on. |


|
static |
Vectorloop function resolves newly parsed queries.
| vl | Vectorloop operating on. |


|
static |
Pack query response into buffer suitable to be transmitted over network.
| vl | Vectorloop operating on. |


|
static |
Vectorloop function accepts new TCP connections.
Number of active TCP connections is limited to configuration setting "tcp_conns_per_vl_max".
| vl | Vectorloop operating on. |


|
static |
Vectorloop function to release TCP connection objects. These are TCP connections that have ended.
| vl | Vectorloop operating on. |


|
static |
Vectorloop function to check for timed out entries in TCP conn LRU cache.
| vl | Vectorloop operating on. |


|
static |
Vectorloop function reads data from TCP connections.
| vl | Vectorloop operating on. |


|
static |
Vectorloop function sends responses to resolved queries.
| vl | Vectorloop operating on. |


|
static |
Vectorloop function reads data from UDP connections.
| vl | Vectorloop operating on. |


|
static |
Vectorloop function that writes DNS query responses on UDP connections.
| vl | Vectorloop operating on. |


|
static |
Register (start) UDP and TCP listeners for this vectorloop, both IPv4 and IPv6.
| vl | Vectorloop operating on. |

