Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 237f067

Browse files
authored
Merge pull request #1245 from qwu16/casc
Enable cluster cascading feature with master branch
2 parents dc00615 + fc98a53 commit 237f067

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+5198
-48
lines changed

scripts/build.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@
117117
"quicIO" : {
118118
"path" : "source/agent/addons/quicIO"
119119
},
120+
"quicCascading" : {
121+
"path" : "source/agent/addons/quicCascading"
122+
},
123+
"mediaBridge" : {
124+
"path" : "source/agent/addons/quicCascading"
125+
},
120126
"resource-util" : {
121127
"path" : "source/agent/addons/resourceUtil"
122128
},

scripts/pack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const originCwd = cwd();
4141
const osScript = path.join(rootDir, 'scripts/detectOS.sh');
4242
const osType = execSync(`bash ${osScript}`).toString().toLowerCase();
4343

44-
const experimentalTargets = ['quic-agent'];
44+
const experimentalTargets = ['quic-agent', 'media-bridge', 'event-bridge'];
4545

4646
var allTargets = [];
4747

scripts/release/daemon-bin.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ case $startStop in
114114
> "${stdout}" 2>&1 </dev/null &
115115
echo $! > ${pid}
116116
;;
117+
event-bridge )
118+
cd ${OWT_HOME}/eventbridge
119+
export LD_LIBRARY_PATH=./lib:${LD_LIBRARY_PATH}
120+
nohup nice -n ${OWT_NICENESS} \
121+
> "${stdout}" 2>&1 </dev/null &
122+
echo $! > ${pid}
123+
;;
117124
conference-agent )
118125
cd ${OWT_HOME}/conference_agent
119126
nohup nice -n ${OWT_NICENESS} ./OWT-MCU-Conference-Controller . -U conference\
@@ -176,6 +183,13 @@ case $startStop in
176183
> "${stdout}" 2>&1 </dev/null &
177184
echo $! > ${pid}
178185
;;
186+
media-bridge )
187+
cd ${OWT_HOME}/media_bridge
188+
export LD_LIBRARY_PATH=./lib:${LD_LIBRARY_PATH}
189+
nohup nice -n ${OWT_NICENESS} ./OWT-MCU-Agent . -U mediabridge \
190+
> "${stdout}" 2>&1 </dev/null &
191+
echo $! > ${pid}
192+
;;
179193
management-console )
180194
cd ${OWT_HOME}/management_console
181195
nohup nice -n ${OWT_NICENESS} node . \

scripts/release/daemon-mcu.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ case $startStop in
114114
> "${stdout}" 2>&1 </dev/null &
115115
echo $! > ${pid}
116116
;;
117+
event-bridge )
118+
cd ${OWT_HOME}/eventbridge
119+
export LD_LIBRARY_PATH=./lib:${LD_LIBRARY_PATH}
120+
nohup nice -n ${OWT_NICENESS} node . \
121+
> "${stdout}" 2>&1 </dev/null &
122+
echo $! > ${pid}
123+
;;
117124
conference-agent )
118125
cd ${OWT_HOME}/conference_agent
119126
nohup nice -n ${OWT_NICENESS} node . -U conference\
@@ -176,6 +183,13 @@ case $startStop in
176183
> "${stdout}" 2>&1 </dev/null &
177184
echo $! > ${pid}
178185
;;
186+
media-bridge )
187+
cd ${OWT_HOME}/media_bridge
188+
export LD_LIBRARY_PATH=./lib:${LD_LIBRARY_PATH}
189+
nohup nice -n ${OWT_NICENESS} node . -U mediabridge\
190+
> "${stdout}" 2>&1 </dev/null &
191+
echo $! > ${pid}
192+
;;
179193
analytics-agent )
180194
cd ${OWT_HOME}/analytics_agent
181195
export LD_LIBRARY_PATH=./lib:${LD_LIBRARY_PATH}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (C) 2019 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include "QuicFactory.h"
8+
#include <mutex>
9+
10+
DEFINE_LOGGER(QuicFactory, "QuicFactory");
11+
12+
std::once_flag getQuicFactoryOnce;
13+
14+
std::shared_ptr<QuicFactory> QuicFactory::s_quicFactory = nullptr;
15+
16+
QuicFactory::QuicFactory()
17+
: m_quicTransportFactory(std::shared_ptr<owt::quic::QuicTransportFactory>(owt::quic::QuicTransportFactory::Create()))
18+
{
19+
}
20+
21+
std::shared_ptr<owt::quic::QuicTransportFactory> QuicFactory::getQuicTransportFactory()
22+
{
23+
std::call_once(getQuicFactoryOnce, []() {
24+
QuicFactory* factory = new QuicFactory();
25+
s_quicFactory = std::shared_ptr<QuicFactory>(factory);
26+
});
27+
return s_quicFactory->m_quicTransportFactory;
28+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright (C) 2019 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#ifndef QUIC_QUICFACTORY_H_
8+
#define QUIC_QUICFACTORY_H_
9+
10+
#include <memory>
11+
#include <logger.h>
12+
#include "owt/quic/quic_transport_factory.h"
13+
14+
namespace owt {
15+
namespace quic {
16+
class QuicTransportFactory;
17+
}
18+
}
19+
20+
class QuicFactory {
21+
public:
22+
DECLARE_LOGGER();
23+
virtual ~QuicFactory() = default;
24+
static std::shared_ptr<owt::quic::QuicTransportFactory> getQuicTransportFactory();
25+
26+
private:
27+
explicit QuicFactory();
28+
29+
static std::shared_ptr<QuicFactory> s_quicFactory;
30+
std::shared_ptr<owt::quic::QuicTransportFactory> m_quicTransportFactory;
31+
};
32+
33+
#endif

0 commit comments

Comments
 (0)