Data Switch With Netty Save

Project README

Digital networking switches

The project's main address is here

Switch overall introduction

Digital Networking is a technical solution to interconnect heterogeneous data spaces using standardized and protocolized ideas. Through the Digital Networking Gateway, the heterogeneity of different data spaces is shielded; through the Digital Networking Switch, the DOIP message forwarding across data spaces is realized; and through the Digital Networking Router, the correspondence between the logos in the heterogeneous space and the Digital Networking Switch is managed.

This switch is mainly based on Java language using Netty framework to implement the heterogeneous data space oriented digital networking switch, through the use of DOIP-SDK, IRP-SDK, Caffiene high-performance caching components, optimized caching, optimization of connection pooling based on FixedChannelPool, based on the development of JCE interface. Designed and realized a digital networking switch using Sansec encryption card, etc., which can be used by Grafana and the built-in Prometheus for statistics of digital networking switch related indexes, and deployed in a number of cloud servers through the related Controller class and Javascript related interface calling code and its deploy method, and can be directly deployed through the DOBrowser. DOBrowser can be used directly through the DOBrowser to call the relevant interfaces of the switch. In terms of functionality, the Digital Networking Switch can correctly interact with other Digital Networking Switches or Digital Networking Gateways to complete the correct parsing of DOIP protocol requests and correct forwarding of packets for packet switching; in terms of performance optimization, it optimizes the client connection, caching and other aspects. Meanwhile, this paper innovatively constructs a cache load test set based on Pareto distribution and conducts targeted tests on performance optimization aspects, and the experimental results show that Digital Networking Switch achieves high-performance, high-availability, high-stability, cross-space, and high-compatibility data sending/receiving, data location and acquisition.

Switch Module Design

data-switch (2).png

​ The TCP Listener is used to handle TCP-based DOIP protocol network communications, acting as a listener, configuring and starting the TCP server through the Data-switch Controller, managing connections and data processing, as well as providing statistics and monitoring functions. In the TCP Listener (i.e., the Data-switch Controller), there are several Handlers, including NetworkTrafficStatHandler (a channel processor based on the Netty framework for monitoring and counting network traffic), MessageEnvelopeCodec (a codec that handles the DOIP protocol's MessageEnvelopeCodec (a key component that handles the coding and decoding of MessageEnvelope objects in the DOIP protocol and ensures that data is transmitted and parsed correctly in network communications), MessageEnvelopeAggregator (a component that is used to aggregate DoipMessage objects into the MessageEnvelope container and to parse the MessageEnvelope parsed back into DoipMessage objects), SwitchHandler (a channel handler specialized in processing messages in the DOIP protocol, which performs the appropriate processing logic based on the type of operation of the message, if the message is a request and contains command flags, and if the message's ID matches that of the switch) and DOHandler (one of the key components of the DOIP protocol processing in the DNS switch, which is responsible for receiving and processing incoming DOIP messages and distributing the request to the correct processing client based on the type and content of the message).

​ The Dispatcher component of DOHandler will distribute the DOIP requests to three different ClusterClients ( ClusterClientForDigitalSpace, ClientForLocationSystem, ClusterClientForSwitch) or directly return the corresponding requests to the digital space/routing system/next-hop switch.

​ The relevant statistical metrics of the Digital Networking Switch are implemented based on Prometheus and Grafana. metricsForGrafana will collect various statistical metrics (including different network traffic, number of requests, etc.), which will be collected by Prometheus and visualized by Grafana.

​ Configuration and deployment of Digital Networking Switch relies on Data-switch Controller component, which can be configured locally/configured to a remote server according to the parameters of the corresponding configuration file, and can ultimately be run on the smart contract-based NUDCR related components, with DOBrowser for startup and invocation of the corresponding interfaces and the The DOBrowser is used to start and invoke the corresponding interfaces and display the visualization interface.

Performance

After testing, without enabling the cacheForDoipMessage module, if the cacheForAddress module does not hit at all, the maximum concurrent number of switches will be less than the maximum concurrent number of DoaClusterClient under the worst case scenario (900 or so); if the cacheForAddress module hits at all, the actual maximum concurrent DOIP requests supported is 6000QPS; if the cacheForDoipMessage module is enabled, the maximum concurrent DOIP requests supported is 6000QPS under the full hit scenario. If the cacheForAddress module is fully hit, the maximum concurrent DOIP requests supported is 6000 QPS; if the cacheForDoipMessage module is enabled, the maximum concurrent DOIP requests supported is 14000 QPS under the premise of a full hit; therefore, the maximum concurrent requests supported by the switch is strongly correlated with the two major cache hit rates, and the maximum concurrent requests supported is about 8000 QPS after evaluation in the actual situation. The maximum number of concurrent requests that the switch can support in real-world conditions is evaluated to be about 8000.

jprofiler.png

Open Source Agenda is not affiliated with "Data Switch With Netty" Project. README Source: Roger-Lv/data-switch-with-Netty
Stars
49
Open Issues
0
Last Commit
3 days ago

Open Source Agenda Badge

Open Source Agenda Rating