Using Delphi to establish communication and data exchange servers - Analysis of Transceiver technology (Part 1) Author: 火鸟 [email protected] Introduction In common domestic information development and implementation projects, most of the development workload is focused on adapting to different customers. Based on the differences in requirements, specific modules are modified to ultimately achieve the software features expected by customers. However, for developers, developing different software versions for different customers will lead to a series of problems such as duplication of work, rising costs, increased maintenance, and reduced compatibility and stability. Therefore, developers realize that only by realizing the productization of software can they have a shorter project cycle and stronger market competitiveness, and adapt to the needs of different customers as much as possible without getting stuck because of this. This is the key to customer satisfaction and A balance between business interests. Transceiver concept Transceiver is a general communication product software designed and developed to meet the different communication needs of different applications and business projects. It can be used for platform-neutral, application-neutral, unified management and control of communication and data exchange between multiple application systems. The original design is to reduce the repeated development of communication modules and enhance the centralized management of communication software. By abstracting Send and Receive into an equivalent data flow process from Source to Target, the sending and receiving processing of existing common communication methods is integrated, as well as the fault-tolerant buffering processing of communication exceptions. (Queue), constitutes Transceiver's powerful functions that are sufficient to meet enterprise-level communication needs. The following are examples of Transceiver applications
| communication direction | Source | Buffer(Queue) | Target | Implement function |
| C1.Send data | S1. Get from local FILE | If there is an abnormality in the sink, the data can be buffered in Transceiver and Transceiver is responsible for retransmitting it. | T1. Submit to the remote TCP port | Transfer files to remote location |
| C2.Receive data | S2. Obtained from remote POP3 | T2. Submit to another SMTP account | Mail forwarding |
| C3.Send data | S3. Get from local DB | T3. Submit to the remote HTTP page | Read from database and submit to web page |
| C4.Receive data | S4. Obtained from remote FTP | T4. Submit to local COM for processing | Get it from the remote end and hand it over to COM for processing |
| C5.Receive data | S5. Get from remote DCOM | T5. Submit to local MSMQ queue | Obtain the message queue from the remote component and wait for processing |
In Transceiver, the source and target are both regarded as ports, such as S1~S5 and T1~T5. They are all communication components created and controlled by Transceiver at runtime; similar to C1 ~ Several communication process definitions of C5 are regarded as channels. A Channel that can complete basic communication functions consists of two Ports (one is Source and the other is Target) ,Queue is the fault-tolerant processing layer when ,communication exceptions occur. As shown in the table,
Transceiver can provide full support for both sending and receiving communication processes. There are no restrictions on the type, quantity, and correspondence between sources and sinks, and the matching relationship between Source and Target can be freely set. The above table only lists a few use cases of Transceiver communication function. Transceiver abstractly integrates data communication elements at three levels: application, data and PRotocol. It can adapt to complex and changing communication needs and provide maximum flexibility for application communication needs. performance and reusability. Figure 1: Interaction capabilities of Transceiver communication port (Port)
Transceiver function 1. Data sending/receiving services between LAN/WAN and different operating systems/application systems. Transceiver currently supports the following communication ports:
| Communication method | interaction layer | sender | receiving end | Recommended environment |
| TCP | protocol | √ | √ | Enterprise Fast Ethernet/Network without Firewall |
| FTP | protocol | √ | √ | File transfer between networks/environments with file servers |
| SMTP | protocol | √ | | B2C situation/with mail sending server |
| POP3 | protocol | | √ | B2C situation/with mail receiving server |
| HTTP | protocol | √ | √ | Network/Internet environment across firewalls |
| FILE | data | √ | √ | Read/write from local file to local file |
| MSMQ | data | √ | √ | With other systems/different applications such as mainframes |
| DB | data | √ | √ | Under customized database structure/between different applications |
| COM/DCOM | application | √ | √ | Business logic is mapped to dedicated module interfaces/environments with specific data processing needs |
As shown in the Transceiver application example,
according to Transceiver's definition of Port and Channel, the above eight types of Ports at both ends of Send/Receive can be freely combined to achieve a total of 64 flexible communication methods of 8x8, which is enough to meet complex and changeable enterprise application communications. environment. Note: Since the demand environment of the UDP protocol is similar to that of TCP and lacks connection security, the author has not implemented it specifically. If necessary, it can be flexibly added; and at the application level, it is easy to implement the component interface (Port) of CORBA and EJB using Delphi , becoming an integral part of Transceiver Shell. 2. The Queue mechanism used for buffering processing can perform data buffer queue tracking and data retransmission in response to abnormal communication situations. 3. Data logging, which can fully record the time, content, source, destination, buffering times, and current status of data. 4. Multi-language support, providing a multi-language support interface for data conversion and user interface. Users can freely add interface language types and data transcoding components according to language requirements.
Transceiver implementation Transceiver consists of two parts: Transceiver Service and Transceiver Console. Transceiver Service can be divided into two logical layers: Transceiver Kernel and Transceiver Shell. Figure 2: Transceiver design architecture 1. Introduction to Transceiver Console The function of Console is to provide effective Port and Channel definitions and rules for Transceiver Service in the form of a control panel application, as well as to set transmission logs, data queues, environment parameters, etc., without passing Console, users can also manually set the above content by directly modifying Transceiver's system configuration library and registry. Due to space limitations, only three screenshots are provided to illustrate the multi-language dynamic support of the interface and Transceiver Shell. The operational effects of the three aspects of Port definition and Transceiver Channel definition will not be described in detail. Attached Figure 3: Multi-language dynamic support of Transceiver Console (Appendix 4 and 5 interface languages are different) Attached Figure 4: Define communication port for Transceiver Server through Transceiver Console Attached Figure 5: Combining SourcePort and TargetPort to define communication Channel author for Transceiver Server :Firebird
[email protected] implements collection class overview .NET through C# Collections and related technologies Use Delphi to establish communication and data exchange servers—Transceiver technical analysis (Part 1) Use Delphi to establish communication and data exchange servers—Transceiver technical analysis (Part 2)
Old things: program shortcuts/program deletion items/EXE self-deleting DIY old Stuff: Childhood Notes on Programming Algorithms