diff --git a/README.builds.md b/README.builds.md deleted file mode 100644 index c9d5f2c..0000000 --- a/README.builds.md +++ /dev/null @@ -1,12 +0,0 @@ -# LAppS.builds -LAppS binaries - -**Ubuntu bionic** - -* [LAppS-0.7.1-generic](https://github.com/ITpC/LAppS.builds/raw/master/bionic/lapps-0.7.1-generic-amd64.deb) -* [LAppS-0.7.1-avx2](https://github.com/ITpC/LAppS.builds/raw/master/bionic/lapps-0.7.1-avx2-amd64.deb) - -**Ubuntu xenial** - -* [LAppS-0.7.1-generic](https://github.com/ITpC/LAppS.builds/raw/master/xenial/lapps-0.7.1-generic-amd64.deb) -* [LAppS-0.7.1-avx2](https://github.com/ITpC/LAppS.builds/raw/master/xenial/lapps-0.7.1-avx2-amd64.deb) diff --git a/js/lapps.js b/js/lapps.js deleted file mode 100644 index efaf244..0000000 --- a/js/lapps.js +++ /dev/null @@ -1,49 +0,0 @@ - -(function(global,undefined) { "use strict"; - - function Properties() - { - } - - function Construct(uri,onopen,onerror,onmessage) - { - Properties.prototype.onopen=onopen; - Properties.prototype.onerror=onerror; - Properties.prototype.onmessage=onmessage; - Properties.prototype.uri=uri; - - var properties=new Properties(); - - this.websocket = new WebSocket(properties.uri); - this.websocket.binaryType = "arraybuffer"; - this.websocket.onopen = function() - { - properties.onopen(); - } - this.websocket.onmessage=function(event) - { - var message = CBOR.decode(event.data); - switch(message.status) - { - case 0: - properties.onerror(message.error.code,message.error.message,message.error.data); - break; - case 1: - switch(message.cid) - { - case 3: // OON error notification - properties.onerror(message.result[0],message.result[1],null); - break; - default: - properties.onmessage(cid, result); - break; - } - break; - } - } - } - - - if (!global.lapps) - global.lapps = Construct; -})(this); diff --git a/js/test.html b/js/test.html deleted file mode 100644 index 41c1528..0000000 --- a/js/test.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/tests/LuaServicesTest.cpp b/src/tests/LuaServicesTest.cpp deleted file mode 100644 index bb32fb2..0000000 --- a/src/tests/LuaServicesTest.cpp +++ /dev/null @@ -1,69 +0,0 @@ -#include -#include - -namespace itc -{ - const std::shared_ptr& getLog(); -} - - - -using json = nlohmann::json; - -json exclude_policy=json::parse("[]"); - -typedef itc::sys::CancelableThread ServiceInstanceType; - -int main() -{ - LAppS::ServiceRegistry aRegistry; - - auto serverThread=LAppS::ServiceFactory::get(LAppS::ServiceProtocol::RAW,LAppS::ServiceLanguage::LUA,"echo","/echo", 2048, LAppS::Network_ACL_Policy::ALLOW,exclude_policy); - aRegistry.reg(serverThread); - auto clientThread=LAppS::ServiceFactory::get(LAppS::ServiceLanguage::LUA,"benchmark"); - aRegistry.reg(clientThread); - - try{ - if(aRegistry.findById(serverThread->getRunnable()->getInstanceId())->getInstanceId() != serverThread->getRunnable()->getInstanceId()) - { - std::cout << "Test 1 (findByInstanceId) is failed" << std::endl; - } - else std::cout << "Test 1 passed" << std::endl; - - if(aRegistry.findById(clientThread->getRunnable()->getInstanceId())->getInstanceId() != clientThread->getRunnable()->getInstanceId()) - { - std::cout << "Test 2 (findByInstanceId) is failed" << std::endl; - } - else - { - std::cout << "Test 2 passed" << std::endl; - } - if(aRegistry.findByTarget("/echo")->getInstanceId() != serverThread->getRunnable()->getInstanceId()) - { - std::cout << "Test 3 (findByTarget) is failed" << std::endl; - } - else - { - std::cout << "Test 3 passed" << std::endl; - } - if(aRegistry.findByName("benchmark")->getInstanceId() != clientThread->getRunnable()->getInstanceId()) - { - std::cout << "Test 4 (findByName) is failed" << std::endl; - } - else - { - std::cout << "Test 4 passed" << std::endl; - } - }catch(const std::exception& e) - { - std::cout << "Test scope [findBy...] is failed with exception: "<< e.what() << std::endl; - } - auto serverThread1=LAppS::ServiceFactory::get(LAppS::ServiceProtocol::RAW,LAppS::ServiceLanguage::LUA,"echo","/echo", 2048, LAppS::Network_ACL_Policy::ALLOW,exclude_policy); - aRegistry.reg(serverThread1); - - int c=getchar(); - - auto lst=aRegistry.list(); - - std::cout << lst->dump(2) << std::endl; -} diff --git a/src/tests/a.out b/src/tests/a.out deleted file mode 100755 index dd274c4..0000000 Binary files a/src/tests/a.out and /dev/null differ diff --git a/src/tests/benchmark.lua b/src/tests/benchmark.lua deleted file mode 100644 index 5a63a49..0000000 --- a/src/tests/benchmark.lua +++ /dev/null @@ -1,70 +0,0 @@ -benchmark={} -benchmark.__index=benchmark - -benchmark.init=function() -end - -benchmark.messages_counter=0; -benchmark.start_time=time.now(); - -benchmark.meter=function() - benchmark.messages_counter=benchmark.messages_counter+1; - - local slice=time.now() - benchmark.start_time; - if( slice >= 1000) - then - print(benchmark.messages_counter.." messages receved per "..slice.."ms") - benchmark.messages_counter=0; - benchmark.start_time=time.now(); - end -end - -benchmark.run=function() - os.execute("sleep 1") - local array={}; - for i=0,99 - do - local sock, err_msg=cws:new( - "wss://127.0.0.1:5083/echo", - { - onopen=function(handler) - local result, errstr=cws:send(handler,"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",2); - if(not result) - then - print("Error on websocket send at handler "..handler..": "..errstr); - end - end, - onmessage=function(handler,message,opcode) - benchmark.meter(); - cws:send(handler,message,opcode); - end, - onerror=function(handler, message) - -- print("Client WebSocket connection is failed for socketfd "..handler..". Error: "..message); - end, - onclose=function(handler) - end - }); - if(sock ~= nil) - then - table.insert(array,sock); - else - end - cws:eventLoop(); - end - print("Sockets connected: "..#array); - benchmark.start_time=time.now(); - while not must_stop() - do - cws:eventLoop(); - end - print("going down ..."); - for i=1,#array - do - array[i]:close(); - cws:eventLoop(); - end - print("down!"); -end - -return benchmark; - diff --git a/src/tests/echo.lua b/src/tests/echo.lua deleted file mode 100644 index e6da760..0000000 --- a/src/tests/echo.lua +++ /dev/null @@ -1,27 +0,0 @@ -echo = {} - -echo.__index = echo; - -echo["onStart"]=function() - print("echo::onStart"); -end - -echo["onDisconnect"]=function() -end - -echo["onShutdown"]=function() - print("echo::onShutdown()"); -end - -echo["onMessage"]=function(handler,opcode, message) - -- print("echo::onMessage"); - - local result, errmsg=ws:send(handler,opcode,message); - if(not result) - then - print("echo::OnMessage(): "..errmsg); - end - return result; -end - -return echo; diff --git a/src/tests/log b/src/tests/log deleted file mode 100644 index cd2e8fb..0000000 --- a/src/tests/log +++ /dev/null @@ -1,4 +0,0 @@ -LuaServicesTest.cpp: В функции «int main()»: -LuaServicesTest.cpp:64:7: предупреждение: unused variable «c» [-Wunused-variable] - int c=getchar(); - ^ diff --git a/src/tests/test.log b/src/tests/test.log deleted file mode 100644 index 4ea6b92..0000000 --- a/src/tests/test.log +++ /dev/null @@ -1,20 +0,0 @@ -20181015134442.335Z - test: Logger::Logger() [ ../../../ITCLib/include/Logger.h ]:106: start logging of level INFO -20181015134442.335Z - [INFO:INFO] - ../../include/abstract/LuaServiceContext.h:144: Service-module [echo] is initialized -20181015134442.335Z - [INFO:INFO] - ../../include/LuaReactiveServiceContext.h:306: Lua module echo is registered -20181015134442.335Z - [INFO:INFO] - ../../include/LuaReactiveServiceContext.h:310: Lua module echo is a valid application (e.a. provides required methods, though there is no warranty it works properly) -20181015134442.335Z - [INFO:INFO] - ../../include/abstract/LuaServiceContext.h:144: Service-module [benchmark] is initialized -20181015134442.335Z - [INFO:INFO] - ../../include/LuaStandaloneServiceContext.h:104: Lua standalone Service-Module benchmark is registered -20181015134442.335Z - [INFO:INFO] - ../../include/LuaStandaloneServiceContext.h:120: benchmark is a valid standalone Service (e.a. provides required methods, though there is no warranty it works properly). -20181015134442.335Z - [INFO:INFO] - ../../include/LuaStandaloneServiceContext.h:142: Application instance [benchmark] is initialized -20181015134442.336Z - [INFO:INFO] - ../../include/abstract/LuaServiceContext.h:144: Service-module [echo] is initialized -20181015134442.336Z - [INFO:INFO] - ../../include/LuaReactiveServiceContext.h:306: Lua module echo is registered -20181015134442.336Z - [INFO:INFO] - ../../include/LuaReactiveServiceContext.h:310: Lua module echo is a valid application (e.a. provides required methods, though there is no warranty it works properly) -20181015134443.120Z - [ERROR:INFO] - ../../include/LuaReactiveService.h:224: Exception in the instance [2957476277] of service [echo]::execute(): tbsqueue::recv() - already consumed -20181015134443.120Z - [INFO:INFO] - ../../include/LuaReactiveService.h:228: Instance [2957476277] of the service [echo]: execution finished -20181015134443.121Z - [INFO:INFO] - ../../include/LuaReactiveServiceContext.h:341: Service-module echo is down -20181015134443.123Z - [ERROR:INFO] - ../../include/LuaReactiveService.h:224: Exception in the instance [3869589493] of service [echo]::execute(): tbsqueue::recv() - already consumed -20181015134443.123Z - [INFO:INFO] - ../../include/LuaReactiveService.h:228: Instance [3869589493] of the service [echo]: execution finished -20181015134443.124Z - [INFO:INFO] - ../../include/LuaReactiveServiceContext.h:341: Service-module echo is down -20181015134443.125Z - [INFO:INFO] - ../../include/LuaStandaloneService.h:76: Shutdown is requested for the instance 358961936 of the service benchmark -20181015134443.454Z - [INFO:INFO] - ../../include/LuaStandaloneServiceContext.h:163: Service context [benchmark] is down -20181015134443.454Z - [INFO:INFO] - ../../include/LuaStandaloneService.h:81: Instance 358961936 of the service benchmark is down