2.3 Node.js
Node.js is a JavaScript running platform based on
Chrome browser engine. Its core application lies in
making JavaScript participate in the design and
development of Web server, simplifying the process
of building Web applications and improving the
efficiency of system development. For the design
and development of the signaling server in this
paper, Node.js perfectly fits the characteristics that
the server is more important than input and output in
task scheduling and is not good at calculation.
Node.js will cooperate with web socket to provide
great technical support for developing real-time
interactive applications with long connections.
2.4 Development Process
According to the above application requirements, the
author completes the configuration and deployment
of the development environment of the remote
online trial mediation system. The development
content of the system is divided into two parts. One
is the design and development of audio and video
online communication function module based on
WebRTC technology. The second is to complete the
integration and encapsulation of the system in Java
environment, form a standard Web application, and
publish it on the server side.
First of all, WebRTC technology has completed
the functional encapsulation of the overall
framework, and has been preset in Chrome, Safari
and FireFox browsers. In the development process,
you only need to call the device camera code in the
page through JavaScript code, as shown in Figure 3.
Secondly, the key to the realization of WebRTC
technology lies in the design and development of
signaling server and the realization of end-to-end
connection management. The development
environment of the signaling server will be based on
the Windows10.0 operating system, the integrated
development tool will be VisualStudio Code, and the
development environment will depend on Node.js
After the installation of Node.js is completed, use
the require instruction to load the HTTP module, and
use the http.createServer () method to create the
server. The listen method is bound to port 8080, and
the function is used to receive and respond data
through request, response parameters, thus realizing
the basic construction of signaling server. (Ge, 2020)
Figure 3: GetUserMedia () algorithm calls the camera of the device to obtain video content
Finally, for the end-to-end connection
management, it is necessary to continue to complete
the corresponding settings under the signaling
server. The whole process will involve user
registration, call establishment and response. Among
them, the key implementation lies in the SDP
information exchange under RTCPeerConnection ()
method and the establishment of ICE interaction
mode. SDP information will complete the exchange
of SDP description information between two
endpoints through "offer" and "answer" signaling,
while the ICE framework can transmit the address of
the ICE server through RTCPeerConnection when it
is founded. Through the construction of the key
signaling server, the audio-video real-time two-way
communication function of the remote online trial
mediation system is realized.
For the development of the whole system, Linux
is the operating system, CentOS is the version, Java
is the basic development environment, JDK version
1.8.0_91 is the development kit, Apache 2.4 is the
Web server, IntelliJ IDEA is the Java integrated
development tool, and MySQL is the database. After
the above software systems are installed and
configured one by one, the construction of Web
application development environment is completed.
This system uses Maven 3 to manage the project
structure, divides the whole project into several
engineering modules, and completes the design and
development of the whole system based on Spring
MVC architecture. Through the introduction of the
above key technical theories, the overall
environment of the system development, the
configuration of related software and tools are
determined, and the technical feasibility of the
overall project of the remote online trial mediation
system is also clarified.