Skip to content

Commit

Permalink
Updated Red5 applications configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
GhaziTriki committed Nov 21, 2018
1 parent de0c992 commit dc5c98b
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public class RedisStorageService extends RedisAwareCommunicator {

private long keyExpiry;

// MeetingCommands meetingCommands;
// RecordingCommands recordingCommands;
RedisCommands<String, String> commands;
private StatefulRedisConnection<String, String> connection;

Expand All @@ -53,6 +51,7 @@ public void start() {
redisClient.setOptions(ClientOptions.builder().autoReconnect(true).build());

connection = redisClient.connect();
commands = connection.sync();
}

public void stop() {
Expand All @@ -78,7 +77,6 @@ public void addBreakoutRoom(String parentId, String breakoutId) {

public void record(String meetingId, Map<String, String> event) {
log.debug("Recording meeting event {} inside a transaction", meetingId);
RedisCommands<String, String> commands = connection.sync();
commands.multi();
Long msgid = commands.incr("global:nextRecordedMsgId");
commands.hmset("recording:" + meetingId + ":" + msgid, event);
Expand All @@ -89,7 +87,6 @@ public void record(String meetingId, Map<String, String> event) {
// @fixme: not used anywhere
public void removeMeeting(String meetingId) {
log.debug("Removing meeting meeting {} inside a transaction", meetingId);
RedisCommands<String, String> commands = connection.sync();
commands.multi();
commands.del(Keys.MEETING + meetingId);
commands.srem(Keys.MEETINGS + meetingId);
Expand All @@ -98,7 +95,6 @@ public void removeMeeting(String meetingId) {

public void recordAndExpire(String meetingId, Map<String, String> event) {
log.debug("Recording meeting event {} inside a transaction", meetingId);
RedisCommands<String, String> commands = connection.sync();
commands.multi();

Long msgid = commands.incr("global:nextRecordedMsgId");
Expand All @@ -116,7 +112,6 @@ public void recordAndExpire(String meetingId, Map<String, String> event) {
}

private String recordMeeting(String key, Map<String, String> info) {
RedisCommands<String, String> commands = connection.sync();
return commands.hmset(key, info);
}

Expand Down
14 changes: 6 additions & 8 deletions bbb-video/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ dependencies {
providedCompile 'org.apache.mina:mina-integration-jmx:2.0.17@jar'

// Spring
providedCompile 'org.springframework:spring-web:4.3.20.RELEASE@jar'
providedCompile 'org.springframework:spring-beans:4.3.20.RELEASE@jar'
providedCompile 'org.springframework:spring-context:4.3.20.RELEASE@jar'
providedCompile 'org.springframework:spring-core:4.3.20.RELEASE@jar'
providedCompile 'org.springframework:spring-web:4.3.12.RELEASE@jar'
providedCompile 'org.springframework:spring-beans:4.3.12.RELEASE@jar'
providedCompile 'org.springframework:spring-context:4.3.12.RELEASE@jar'
providedCompile 'org.springframework:spring-core:4.3.13.RELEASE@jar'

// Red5
providedCompile 'org.red5:red5-server:1.0.10-M5@jar'
providedCompile 'org.red5:red5-server-common:1.0.10-M5@jar'
providedCompile 'org.red5:red5-io:1.0.10-M5@jar'
Expand All @@ -50,10 +51,7 @@ dependencies {
compile 'aopalliance:aopalliance:1.0@jar'

// Testing
compile 'org.easymock:easymock:2.4@jar'

// Testing
testRuntime 'org.easymock:easymock:2.4@jar'
testRuntime 'org.easymock:easymock:3.6@jar'

//redis
compile 'org.apache.commons:commons-pool2:2.6.0'
Expand Down
22 changes: 22 additions & 0 deletions bbb-video/src/main/webapp/WEB-INF/bbb-redis-pool.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,26 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<property name="password" value="${redisPassword:''}" />
</bean>

<bean id="redisPublisher" class="org.bigbluebutton.red5.pubsub.MessagePublisher">
<property name="messageSender" ref="redisSender"/>
</bean>

<bean id="messageDistributor" class="org.bigbluebutton.common2.redis.pubsub.MessageDistributor">
<property name="messageHandler" ref="receivedMessageHandler"/>
<property name="messageListeners">
<set>
<ref bean="meetingMessageHandler" />
</set>
</property>
</bean>

<bean id="meetingMessageHandler" class="org.bigbluebutton.red5.pubsub.MeetingMessageHandler">
<property name="meetingManager" ref="meetingManager"/>
<property name="connInvokerService" ref="connInvokerService"/>
</bean>

<bean id="receivedMessageHandler" class="org.bigbluebutton.common2.redis.pubsub.ReceivedMessageHandler"
init-method="start" destroy-method="stop">
</bean>

</beans>
24 changes: 0 additions & 24 deletions bbb-video/src/main/webapp/WEB-INF/red5-web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,4 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.

<bean id="meetingManager" class="org.bigbluebutton.app.video.MeetingManager"/>

<bean id="redisPublisher" class="org.bigbluebutton.red5.pubsub.MessagePublisher">
<property name="messageSender" ref="redisSender"/>
</bean>



<bean id="messageDistributor" class="org.bigbluebutton.common2.redis.pubsub.MessageDistributor">
<property name="messageHandler" ref="receivedMessageHandler"/>
<property name="messageListeners">
<set>
<ref bean="meetingMessageHandler" />
</set>
</property>
</bean>

<bean id="meetingMessageHandler" class="org.bigbluebutton.red5.pubsub.MeetingMessageHandler">
<property name="meetingManager" ref="meetingManager"/>
<property name="connInvokerService" ref="connInvokerService"/>
</bean>

<bean id="receivedMessageHandler" class="org.bigbluebutton.common2.redis.pubsub.ReceivedMessageHandler"
init-method="start" destroy-method="stop">
</bean>

</beans>
13 changes: 7 additions & 6 deletions bbb-voice/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ dependencies {
providedCompile 'org.apache.mina:mina-core:2.0.17@jar'
providedCompile 'org.apache.mina:mina-integration-beans:2.0.17@jar'
providedCompile 'org.apache.mina:mina-integration-jmx:2.0.17@jar'

// Spring
providedCompile 'org.springframework:spring-web:4.3.20.RELEASE@jar'
providedCompile 'org.springframework:spring-beans:4.3.20.RELEASE@jar'
providedCompile 'org.springframework:spring-context:4.3.20.RELEASE@jar'
providedCompile 'org.springframework:spring-core:4.3.20.RELEASE@jar'
providedCompile 'org.springframework:spring-web:4.3.12.RELEASE@jar'
providedCompile 'org.springframework:spring-beans:4.3.12.RELEASE@jar'
providedCompile 'org.springframework:spring-context:4.3.12.RELEASE@jar'
providedCompile 'org.springframework:spring-core:4.3.13.RELEASE@jar'

// Red5
providedCompile 'org.red5:red5-server:1.0.10-M5@jar'
providedCompile 'org.red5:red5-server-common:1.0.10-M5@jar'
providedCompile 'org.red5:red5-io:1.0.10-M5@jar'

// Logging
providedCompile 'ch.qos.logback:logback-core:1.2.3@jar'
providedCompile 'ch.qos.logback:logback-classic:1.2.3@jar'
Expand Down
10 changes: 6 additions & 4 deletions bbb-voice/src/main/webapp/WEB-INF/bbb-redis-messaging.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
http://www.springframework.org/schema/util/spring-util-2.0.xsd
">

<bean id="messagingService" class="org.bigbluebutton.voiceconf.messaging.RedisMessagingService">
<property name="redisMessageSender"> <ref bean="redisMessageSender"/></property>
</bean>

<bean id="redisMessageSender" class="org.bigbluebutton.common2.redis.pubsub.MessageSender"
init-method="start" destroy-method="stop">
<property name="host" value="${redis.host}"/>
<property name="port" value="${redis.port}"/>
<property name="password" value="${redisPassword:''}" />
</bean>

<bean id="messagingService" class="org.bigbluebutton.voiceconf.messaging.RedisMessagingService">
<property name="redisMessageSender"> <ref bean="redisMessageSender"/></property>
</bean>

<bean id="meetingMessageHandler" class="org.bigbluebutton.voiceconf.messaging.MeetingMessageHandler">
Expand All @@ -45,6 +46,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
init-method="start" destroy-method="stop">
<property name="host" value="${redis.host}"/>
<property name="port" value="${redis.port}"/>
<property name="password" value="${redisPassword:''}" />
<property name="messageHandler"> <ref local="redisMessageHandler"/> </property>
</bean>

Expand Down
5 changes: 3 additions & 2 deletions bigbluebutton-apps/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ dependencies {
// Red5
providedCompile 'org.red5:red5-server:1.0.10-M5@jar'
providedCompile 'org.red5:red5-server-common:1.0.10-M5@jar'

providedCompile 'org.red5:red5-io:1.0.10-M5@jar'

// Logging
providedCompile 'ch.qos.logback:logback-core:1.2.3@jar'
providedCompile 'ch.qos.logback:logback-classic:1.2.3@jar'
Expand All @@ -60,7 +61,7 @@ dependencies {
compile 'org.apache.commons:commons-pool2:2.6.0'

compile 'com.google.code.gson:gson:2.8.5'
providedCompile 'org.apache.commons:commons-lang3:3.7'
providedCompile 'org.apache.commons:commons-lang3:3.8.1'

compile 'org.bigbluebutton:bbb-common-message_2.12:0.0.20-SNAPSHOT'
compile 'org.bigbluebutton:bbb-apps-common_2.12:0.0.4-SNAPSHOT'
Expand Down

0 comments on commit dc5c98b

Please sign in to comment.