Licode service and startup process analysis

Licode service and startup process analysis

WebRtcConnection source code analysis (1)

WebRtcConnection source code analysis (two)

WebRtcConnection source code analysis (3)

MediaStream source code analysis (1)

MediaStream source code analysis (two)

MediaStream source code analysis (3)

There are four services that licode needs to manually start. These four services call and communicate with each other through mq

nuve.js, used for business management services, resource management, database management, and manage multiple erizoController

Module number

Module function

Corresponding file

1

Nuve main program entrance, connect to MQ, authenticate, create business, monitor 3000

nuveAPI / nuve.js

2

Database addition, deletion, modification, and query operations, mainly ec, room, service, and token

nuveAPI/mdb/*.js

3

EC allocation and keep alive

nuveAPI/cloudHandler.js

4

User management, room management, service management

nuveAPI/resource/*.js

5

Communicate with rabbit mq

nuveAPI/rpc/*.js

#!/usr/bin/env bash

set -e

SCRIPT=`pwd`/$0
FILENAME=`basename $SCRIPT`
PATHNAME=`dirname $SCRIPT`
ROOT=$PATHNAME/..
NVM_CHECK="$ROOT"/scripts/checkNvm.sh
CURRENT_DIR=`pwd`

. $NVM_CHECK

cd $PATHNAME/nuveAPI

node nuve.js &

cd $CURRENT_DIR

basicServer.js, used to obtain tokens, etc.

#!/usr/bin/env bash

SCRIPT=`pwd`/$0
FILENAME=`basename $SCRIPT`
PATHNAME=`dirname $SCRIPT`
ROOT=$PATHNAME/..
BUILD_DIR=$ROOT/build
CURRENT_DIR=`pwd`
NVM_CHECK="$PATHNAME"/checkNvm.sh
EXTRAS=$ROOT/extras

cp $ROOT/nuve/nuveClient/dist/nuve.js $EXTRAS/basic_example/

. $NVM_CHECK

nvm use
cd $EXTRAS/basic_example
node basicServer.js &

erizoController.js, signaling service, manage multiple conference rooms

Module number

Module function

Corresponding file

1

ErizoController main program entry

hedgehog_controller / hedgehogController / hedgehogController.js

2

Websocket and client connection management

Same as above

3

EA allocation and keep alive

hedgehog_controller / hedgehogController / ecCloudHandler.js

4

Communicate with Nuve

hedgehog_controller / hedgehogController / nuveProxy.js

5

Use rabbit mq for RPC operations

amqper.js

6

Room management, EaList management

erizo_controller/erizoController/roomController.js

erizo_controller/erizoController/models/*.js

#!/usr/bin/env bash

set -e

SCRIPT=`pwd`/$0
FILENAME=`basename $SCRIPT`
ROOT=`dirname $SCRIPT`
LICODE_ROOT="$ROOT"/..
CURRENT_DIR=`pwd`
NVM_CHECK="$LICODE_ROOT"/scripts/checkNvm.sh

. $NVM_CHECK

cd $ROOT/erizoController
nvm use
node erizoController.js &

cd $CURRENT_DIR

erizoAgent.js, media services, manage multiple ErizoJS

Module number

Module function

Corresponding file

1

ErizoAgent main program entrance

erizo_controller/erizoAgent/erizoAgent.js

2

Monitor the CPU memory of the operating system

hedgehog_controller / hedgehogAgent / hedgehogAgentReport.js

3

ErizoJS allocation and keep-alive

Hedgehog_controller / HedgehogAgent / HedgehogList.js

4

Communicate with ErizoController

Hedgehog_controller / hedgehogController / nuveProxy.js

5

Use rabbit mq for RPC operations

Erizo_controller/common/amqper.js

#!/usr/bin/env bash
set -e

SCRIPT=`pwd`/$0
FILENAME=`basename $SCRIPT`
ROOT=`dirname $SCRIPT`
LICODE_ROOT="$ROOT"/..
CURRENT_DIR=`pwd`
NVM_CHECK="$LICODE_ROOT"/scripts/checkNvm.sh

. $NVM_CHECK

cd $ROOT/erizoAgent
nvm use
node erizoAgent.js $* &

cd $CURRENT_DIR

Start the erizoJS media forwarding module through erizoAgent.js

Function description of erizoJS media forwarding module:

Module number

Module function

Corresponding file

1

ErizoJS main program entrance

hedgehog_controller / hedgehogJS / hedgehogJS.js

2

Forwarding service configuration and control

hedgehog_controller / hedgehogJS / hedgehogJSController.js

3

Conference member management

erizo_controller/erizoJS/models/Client.js

4

Connection management

erizo_controller/erizoJS/models/Connection.js

5

Subscriber management

erizo_controller/erizoJS/models/Subscriber.js

6

Publisher management

erizo_controller/erizoJS/models/Publisher.js

7

SDP analysis

erizo_controller/erizoJS/models/SessionDescription.js

8

Incident management

erizo_controller/erizoJS/adapt_schemes/*.js

9

WebRTC signaling and media processing packaging

erizoAPI /*.*

Guess you like

Origin blog.csdn.net/tong5956/article/details/108022172