licode server summary

1. System Architecture

image

(Source: https://github.com/lynckia/licode/issues/335 )

2.nuve module


nuve-api-architecture

(Modification: https://blog.csdn.net/u012908515/article/details/53940787 )

app.post('/rooms', roomsResource.createRoom);
app.get('/rooms', roomsResource.represent);

app.get('/rooms/:room', roomResource.represent);
app.put('/rooms/:room', roomResource.updateRoom);
app.patch('/rooms/:room', roomResource.patchRoom);
app.delete('/rooms/:room', roomResource.deleteRoom);

app.post('/rooms/:room/tokens', tokensResource.create);

app.post('/services', servicesResource.create);
app.get('/services', servicesResource.represent);

app.get('/services/:service', serviceResource.represent);
app.delete('/services/:service', serviceResource.deleteService);

app.get('/rooms/:room/users', usersResource.getList);

app.get('/rooms/:room/users/:user', userResource.getUser);
app.delete('/rooms/:room/users/:user', userResource.deleteUser);

2.1签名验证

app.get ( '*' , nuveAuthenticator.authenticate); 
app.post ( '*' , nuveAuthenticator.authenticate); 
app.put ( '*' , nuveAuthenticator.authenticate); 
app.patch ( '*' , nuveAuthenticator.authenticate); 
app. delete ( '*', nuveAuthenticator.authenticate);

Each time the client will request signature verification.

2.2cloudHandle.js

image

cloudHandler provides nuve calls to the EC: access to all users in the room, delete the room, remove the specified user; and calls on the EC nuve: Delete token, EC add, update, delete, and keep alive.

RPCMQ by calling the method to achieve, they jointly maintains two queues, queue A call to deliver a message, Nuve news release after the call, and will maintain a callback function to call methods and dictionaries; EC A call to get the message from the queue after execution the method calls, and push the result into the message queue B; Nuve call to get messages from a queue result B, and the callback function obtained from the dictionary and executes the callback, to delete the corresponding dictionary values.

2.3 Service, room, user management

image

hh

Guess you like

Origin www.cnblogs.com/bloglearning/p/12012632.html