Integrated Audio/Video framework omcs

Source: Internet
Author: User
Document directory
  •  
  • 1. Two Integration Methods for the server
  • 2. About user management
  • 3. Connection status Synchronization
  • 4. When using omcs, we recommend using the "short connection" solution.

If you need to integrate omcs into the software system to add video calls or video conferencing functions, you need to focus on the following issues.

1. Two Integration Methods for the server

(1) host the omcs server in the existing Server process: you only need to create a new multimediaserver instance in the current server program. It needs to use a TCP port.

(2) independently deploy the omcs server programs provided by the omcs framework: independent deployment can effectively separate video traffic from business logic, this prevents extra latency caused by video traffic.

 

2. About user management

Because omcs does not have specific business logic, the essence of user management on its server is to mark whether the user is online. This is built in omcs and does not need to be related to the existing system.

However, multimediaserver verifies that the logon user's account and password are valid through the iuserverifier interface injected by the constructor.

 

3. Connection status Synchronization

Generally, after omcs is integrated, the client will have two TCP connections. One connection (connection A) points to the Application Server (such as the esplus server), and the other connection (Connection B) points to the omcs server. Which of the following determines whether the client is online or offline? There are two common strategies.

(1) The connection to the application server is the main factor. 

The client status is dominated by connection. For example, when the connection to the application server is disconnected, the client is displayed as "offline". When the connection to the application server is successful, the client displays "online ".

If this policy is used, it is usually used to connect to the omcs server after the client successfully logs on to the Application Server (that is, call the initialize method of imultimediamanager) during programming ), in this case, there may be a time gap-that is, the application server has been successfully connected, and the omcs server has not been connected. The existence of this gap may lead to a new situation: if other guest clients want to access the multimedia devices of the current client, the targetuseroffline result will be returned and the connection fails. In this case, the client user as the guest will be very puzzled: it is clear that the other party has been online, however, connecting to the other party's multimedia device, but returns targetuseroffline. What is the problem? To address this new situation, we can set the waitowneronlinespaninsecs attribute of the connector to a slightly larger value, such as 10 seconds, to wait until the multimedia manager of the client as the owner is initialized successfully.

(2) connection between the application server and the multimedia server 

We can also use a more secure policy, that is, the client is "online" Only when connection A and Connection B are normal ". The client status changes to "offline" as long as any one of the connections is disconnected ". In this way, the gap between the above statuses will not occur.

Policy (1) and (2) have their own advantages and disadvantages. Using Policy (1), Client Login will be faster, but there will be two problems arising from inconsistent connection statuses; Policy (2) will not encounter connection inconsistencies, however, logon is slow because both connections are successful and the multimedia manager enters the "online" status after initialization. Of course, in addition to these two common strategies, we can also choose a solution that suits our needs.

In our experience, connection a is the main connection, that is, the status of connection A is used as the basis for whether the current client is online or not. When connection A is disconnected, it indicates that the client is offline. In this case, B is disconnected.

 

4. When using omcs, we recommend using the "short connection" solution.

The "short connection" solution means that when the client is started, it only communicates with the application server. When the two clients require video, they connect to an omcs server for video communication, after the video ends, it is disconnected from the omcs server.

The "short connection" solution allows you to dynamically select an omcs server. Based on this, the omcs video server cluster and load balancing can be very simple.

 

Certificate -----------------------------------------------------------------------------------------------------------------------------------------------

Download the free version of omcs and demo source code

Read more articles in the omcs development manual.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.