Skip to content

Commit

Permalink
Separate deployer for local and network deployment with LAR support. …
Browse files Browse the repository at this point in the history
…Not fully tested
  • Loading branch information
Pavel Kraynyukhov committed Jun 22, 2018
1 parent 8673827 commit dd922ac
Show file tree
Hide file tree
Showing 14 changed files with 450 additions and 212 deletions.
15 changes: 9 additions & 6 deletions include/ApplicationRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ namespace LAppS
}
mApplications.clear();
}

void listApps(std::queue<std::string>& out)
{
SyncLock sync(mMutex);
for(auto it=mApplications.begin();it!=mApplications.end();++it)
{
out.push(it->first);
}
}
void unRegApp(const std::string name)
{
SyncLock sync(mMutex);
Expand All @@ -73,11 +80,7 @@ namespace LAppS
{
mTarget2Name.erase(target_it);
}

while(!(it->second.empty()))
{
it->second.pop();
}
mApplications.erase(it);
}
}

Expand Down
29 changes: 22 additions & 7 deletions include/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with LAppS. If not, see <http://www.gnu.org/licenses/>.
*
Expand Down Expand Up @@ -49,6 +49,7 @@ namespace LAppS
{"connection_weight", 10},
{"ip","0.0.0.0"},
{"port",5083},
{"lapps_config_auto_save", false },
{"workers",{ {"workers",1}, {"max_connections", 10000 },{"auto_fragment",false},{"preads",4}}},
#ifdef LAPPS_TLS_ENABLE
{"tls",true},
Expand All @@ -64,7 +65,8 @@ namespace LAppS
{"applications","apps"},
{"app_conf_dir","etc"},
{"tmp","tmp"},
{"workdir","workdir"}
{"workdir","workdir"},
{"deploy", "deploy" }
},
},
{
Expand All @@ -74,21 +76,25 @@ namespace LAppS
{"request_target", "/echo"},
{"protocol", "raw"},
{"max_inbound_message_size",16*1024*1024}, // autobahn-testsuite uses up to 16MB messages in fuzzingclinet.
{"instances", 1}
{"instances", 1},
{"auto_start" , true }
}},
{"echo_lapps", {
{"request_target", "/echo_lapps"},
{"protocol", "LAppS"},
{"max_inbound_message_size",1024},
{"instances", 1}
{"instances", 1},
{"auto_start" , false }
}},
{"time_broadcast", {
{"internal", true},
{"instances", 1}
{"instances", 1},
{"auto_start" , false }
}},
{"broadcast_blob", {
{"internal", true},
{"instances", 1}
{"instances", 1},
{"auto_start" , false }
}}
/**,
{{"data_source", {
Expand Down Expand Up @@ -137,10 +143,19 @@ namespace LAppS
{
return ws_config;
}
const json& getLAppSConfig() const
json& getLAppSConfig()
{
return lapps_config;
}
void save()
{
std::ofstream lapps_config_file(mEnv["LAPPS_CONF_DIR"]+"/"+mEnv["LAPPS_CONFIG"], std::ifstream::binary);
if(lapps_config_file)
{
lapps_config_file << lapps_config;
lapps_config_file.close();
}
}
};
}

Expand Down
Loading

0 comments on commit dd922ac

Please # to comment.