Browse Source

Upgrade ffead-cpp to v6.0 (#6586)

Sumeet Chhetri 4 years ago
parent
commit
770a759d19
100 changed files with 1132 additions and 786 deletions
  1. 52 4
      frameworks/C++/ffead-cpp/benchmark_config.json
  2. 37 1
      frameworks/C++/ffead-cpp/config.toml
  3. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-apache.dockerfile
  4. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-base-debug.dockerfile
  5. 2 11
      frameworks/C++/ffead-cpp/ffead-cpp-base.dockerfile
  6. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-cinatra.dockerfile
  7. 7 7
      frameworks/C++/ffead-cpp/ffead-cpp-crystal-h2o.dockerfile
  8. 7 7
      frameworks/C++/ffead-cpp/ffead-cpp-crystal-http.dockerfile
  9. 7 7
      frameworks/C++/ffead-cpp/ffead-cpp-d-hunt.dockerfile
  10. 22 0
      frameworks/C++/ffead-cpp/ffead-cpp-deps.dockerfile
  11. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-drogon.dockerfile
  12. 7 7
      frameworks/C++/ffead-cpp/ffead-cpp-go-fasthttp.dockerfile
  13. 7 7
      frameworks/C++/ffead-cpp/ffead-cpp-go-gnet.dockerfile
  14. 7 7
      frameworks/C++/ffead-cpp/ffead-cpp-h2o.dockerfile
  15. 7 7
      frameworks/C++/ffead-cpp/ffead-cpp-java-base.dockerfile
  16. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-java-firenio.dockerfile
  17. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-java-rapidoid.dockerfile
  18. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-java-wizzardo-http.dockerfile
  19. 7 7
      frameworks/C++/ffead-cpp/ffead-cpp-julia-http.dockerfile
  20. 7 7
      frameworks/C++/ffead-cpp/ffead-cpp-libreactor.dockerfile
  21. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-lithium.dockerfile
  22. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-mongo-raw.dockerfile
  23. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-mysql.dockerfile
  24. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-nginx.dockerfile
  25. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-postgresql-raw-async-clibpqb-profiled.dockerfile
  26. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-postgresql-raw-async-profiled.dockerfile
  27. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-postgresql-raw-async.dockerfile
  28. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-postgresql-raw-clibpqb-profiled.dockerfile
  29. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-postgresql-raw-profiled.dockerfile
  30. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-postgresql-raw.dockerfile
  31. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-postgresql.dockerfile
  32. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-rust-actix.dockerfile
  33. 7 7
      frameworks/C++/ffead-cpp/ffead-cpp-rust-base.dockerfile
  34. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-rust-hyper.dockerfile
  35. 8 8
      frameworks/C++/ffead-cpp/ffead-cpp-rust-rocket-base.dockerfile
  36. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-rust-rocket.dockerfile
  37. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-rust-thruster.dockerfile
  38. 12 12
      frameworks/C++/ffead-cpp/ffead-cpp-seastar-base.dockerfile
  39. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-seastar.dockerfile
  40. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-sql-raw-async-clibpqb-profiled-base.dockerfile
  41. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-sql-raw-async-profiled-base.dockerfile
  42. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-sql-raw-clibpqb-profiled-base.dockerfile
  43. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-sql-raw-profiled-base.dockerfile
  44. 11 11
      frameworks/C++/ffead-cpp/ffead-cpp-swift-nio.dockerfile
  45. 12 8
      frameworks/C++/ffead-cpp/ffead-cpp-v-base.dockerfile
  46. 98 0
      frameworks/C++/ffead-cpp/ffead-cpp-v-picov-raw-clibpqb-profiled-base.dockerfile
  47. 7 0
      frameworks/C++/ffead-cpp/ffead-cpp-v-picov-raw-clibpqb-profiled.dockerfile
  48. 98 0
      frameworks/C++/ffead-cpp/ffead-cpp-v-picov-raw-profiled-base.dockerfile
  49. 7 0
      frameworks/C++/ffead-cpp/ffead-cpp-v-picov-raw-profiled.dockerfile
  50. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-v-picov.dockerfile
  51. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp-v-vweb.dockerfile
  52. 2 2
      frameworks/C++/ffead-cpp/ffead-cpp.dockerfile
  53. 2 10
      frameworks/C++/ffead-cpp/install_ffead-cpp-backends.sh
  54. 0 15
      frameworks/C++/ffead-cpp/install_ffead-cpp-dependencies.sh
  55. 28 20
      frameworks/C++/ffead-cpp/install_ffead-cpp-framework.sh
  56. 7 7
      frameworks/C++/ffead-cpp/install_ffead-cpp-httpd.sh
  57. 2 2
      frameworks/C++/ffead-cpp/install_ffead-cpp-nginx.sh
  58. 33 0
      frameworks/C++/ffead-cpp/install_ffead-cpp-sql-raw-v-picov-profiled.sh
  59. 6 6
      frameworks/C++/ffead-cpp/run_ffead.sh
  60. 3 3
      frameworks/C++/ffead-cpp/sql-async-profiled-install-clang-dbg.sh
  61. 4 4
      frameworks/C++/ffead-cpp/sql-async-profiled-install-clang.sh
  62. 4 4
      frameworks/C++/ffead-cpp/sql-async-profiled-install.sh
  63. 4 4
      frameworks/C++/ffead-cpp/sql-profiled-install-clang.sh
  64. 4 4
      frameworks/C++/ffead-cpp/sql-profiled-install.sh
  65. 5 5
      frameworks/C++/ffead-cpp/sql-profiled-util.sh
  66. 30 0
      frameworks/C++/ffead-cpp/sql-v-picov-profiled-install.sh
  67. 6 3
      frameworks/C++/ffead-cpp/te-benchmark-um-mgr/CMakeLists.txt
  68. 1 1
      frameworks/C++/ffead-cpp/te-benchmark-um-mgr/config/application.xml
  69. 0 13
      frameworks/C++/ffead-cpp/te-benchmark-um-mgr/config/cache.xml
  70. 6 5
      frameworks/C++/ffead-cpp/te-benchmark-um-mgr/include/TeBkUmMgr.h
  71. 15 0
      frameworks/C++/ffead-cpp/te-benchmark-um-mgr/meson.build
  72. 18 62
      frameworks/C++/ffead-cpp/te-benchmark-um-mgr/src/TeBkUmMgr.cpp
  73. 1 1
      frameworks/C++/ffead-cpp/te-benchmark-um-mgr/src/autotools/Makefile.am
  74. 1 1
      frameworks/C++/ffead-cpp/te-benchmark-um-mgr/tpe/fortunes.tpe
  75. 12 0
      frameworks/C++/ffead-cpp/te-benchmark-um-mgr/xmake.lua
  76. 7 3
      frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/CMakeLists.txt
  77. 1 1
      frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/config/application.xml
  78. 23 12
      frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/include/TeBkUmLpqAsync.h
  79. 15 0
      frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/meson.build
  80. 156 169
      frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/src/TeBkUmLpqAsync.cpp
  81. 1 1
      frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/src/autotools/Makefile.am
  82. 3 3
      frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/tpe/fortunes.tpe
  83. 12 0
      frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/xmake.lua
  84. 7 3
      frameworks/C++/ffead-cpp/te-benchmark-um-pq/CMakeLists.txt
  85. 1 1
      frameworks/C++/ffead-cpp/te-benchmark-um-pq/config/application.xml
  86. 0 13
      frameworks/C++/ffead-cpp/te-benchmark-um-pq/config/cache.xml
  87. 18 10
      frameworks/C++/ffead-cpp/te-benchmark-um-pq/include/TeBkUmLpq.h
  88. 15 0
      frameworks/C++/ffead-cpp/te-benchmark-um-pq/meson.build
  89. 122 110
      frameworks/C++/ffead-cpp/te-benchmark-um-pq/src/TeBkUmLpq.cpp
  90. 1 1
      frameworks/C++/ffead-cpp/te-benchmark-um-pq/src/autotools/Makefile.am
  91. 3 3
      frameworks/C++/ffead-cpp/te-benchmark-um-pq/tpe/fortunes.tpe
  92. 12 0
      frameworks/C++/ffead-cpp/te-benchmark-um-pq/xmake.lua
  93. 6 3
      frameworks/C++/ffead-cpp/te-benchmark-um/CMakeLists.txt
  94. 1 1
      frameworks/C++/ffead-cpp/te-benchmark-um/config/application.xml
  95. 0 13
      frameworks/C++/ffead-cpp/te-benchmark-um/config/cache.xml
  96. 0 16
      frameworks/C++/ffead-cpp/te-benchmark-um/config/sdorm.xml
  97. 6 5
      frameworks/C++/ffead-cpp/te-benchmark-um/include/TeBkUm.h
  98. 15 0
      frameworks/C++/ffead-cpp/te-benchmark-um/meson.build
  99. 18 62
      frameworks/C++/ffead-cpp/te-benchmark-um/src/TeBkUm.cpp
  100. 1 1
      frameworks/C++/ffead-cpp/te-benchmark-um/src/autotools/Makefile.am

+ 52 - 4
frameworks/C++/ffead-cpp/benchmark_config.json

@@ -60,7 +60,7 @@
 			"display_name": "ffead-cpp-crystal-http",
 			"display_name": "ffead-cpp-crystal-http",
 			"notes": "",
 			"notes": "",
 			"versus": "",
 			"versus": "",
-			"tags": []
+			"tags": ["broken"]
 		},
 		},
 		"d-hunt": {
 		"d-hunt": {
 			"json_url": "/te-benchmark-um/json",
 			"json_url": "/te-benchmark-um/json",
@@ -98,7 +98,7 @@
 			"display_name": "ffead-cpp-go-gnet",
 			"display_name": "ffead-cpp-go-gnet",
 			"notes": "",
 			"notes": "",
 			"versus": "",
 			"versus": "",
-			"tags": []
+			"tags": ["broken"]
 		},
 		},
 		"rust-actix": {
 		"rust-actix": {
 			"json_url": "/te-benchmark-um/json",
 			"json_url": "/te-benchmark-um/json",
@@ -143,6 +143,54 @@
 			"versus": "",
 			"versus": "",
 			"tags": []
 			"tags": []
 		},
 		},
+		"v-picov-raw-profiled": {
+			"json_url": "/te-benchmark-um-pq/json",
+			"plaintext_url": "/plaintext",
+			"db_url": "/te-benchmark-um-pq/db",
+			"query_url": "/te-benchmark-um-pq/queries?queries=",
+			"fortune_url": "/te-benchmark-um-pq/fortunes",
+			"update_url": "/te-benchmark-um-pq/updates?queries=",
+			"cached_query_url": "/te-benchmark-um-pq/cached-worlds?count=",
+			"port": 8080,
+			"approach": "Realistic",
+			"classification": "Fullstack",
+			"database": "postgres",
+			"framework": "ffead-cpp",
+			"language": "C++",
+			"orm": "Raw",
+			"platform": "None",
+			"webserver": "picov",
+			"os": "Linux",
+			"database_os": "Linux",
+			"display_name": "ffead-cpp-v-picov-raw-profiled",
+			"notes": "",
+			"versus": "",
+			"tags": []
+		},
+		"v-picov-raw-clibpqb-profiled": {
+			"json_url": "/te-benchmark-um-pq/json",
+			"plaintext_url": "/plaintext",
+			"db_url": "/te-benchmark-um-pq/db",
+			"query_url": "/te-benchmark-um-pq/queries?queries=",
+			"fortune_url": "/te-benchmark-um-pq/fortunes",
+			"update_url": "/te-benchmark-um-pq/updates?queries=",
+			"cached_query_url": "/te-benchmark-um-pq/cached-worlds?count=",
+			"port": 8080,
+			"approach": "Realistic",
+			"classification": "Fullstack",
+			"database": "postgres",
+			"framework": "ffead-cpp",
+			"language": "C++",
+			"orm": "Raw",
+			"platform": "None",
+			"webserver": "picov",
+			"os": "Linux",
+			"database_os": "Linux",
+			"display_name": "ffead-cpp-v-picov-raw-clibpqb-profiled",
+			"notes": "",
+			"versus": "",
+			"tags": []
+		},
 		"java-firenio": {
 		"java-firenio": {
 			"json_url": "/te-benchmark-um/json",
 			"json_url": "/te-benchmark-um/json",
 			"plaintext_url": "/plaintext",
 			"plaintext_url": "/plaintext",
@@ -183,7 +231,7 @@
 			"display_name": "ffead-cpp-postgresql",
 			"display_name": "ffead-cpp-postgresql",
 			"notes": "",
 			"notes": "",
 			"versus": "",
 			"versus": "",
-			"tags": []
+			"tags": ["broken"]
 		},
 		},
 		"postgresql-raw": {
 		"postgresql-raw": {
 			"json_url": "/te-benchmark-um-pq/json",
 			"json_url": "/te-benchmark-um-pq/json",
@@ -533,7 +581,7 @@
 			"display_name": "ffead-cpp-go-fasthttp",
 			"display_name": "ffead-cpp-go-fasthttp",
 			"notes": "",
 			"notes": "",
 			"versus": "",
 			"versus": "",
-			"tags": ["broken"]
+			"tags": []
 		},
 		},
 		"julia-http": {
 		"julia-http": {
 			"json_url": "/te-benchmark-um/json",
 			"json_url": "/te-benchmark-um/json",

+ 37 - 1
frameworks/C++/ffead-cpp/config.toml

@@ -101,6 +101,42 @@ platform = "None"
 webserver = "picov"
 webserver = "picov"
 versus = ""
 versus = ""
 
 
+[v-picov-raw-profiled]
+urls.plaintext = "/plaintext"
+urls.json = "/te-benchmark-um-pq/json"
+urls.db = "/te-benchmark-um-pq/db"
+urls.query = "/te-benchmark-um-pq/queries?queries="
+urls.update = "/te-benchmark-um-pq/updates?queries="
+urls.fortune = "/te-benchmark-um-pq/fortunes"
+urls.cached_query = "/te-benchmark-um-pq/cached-worlds?count="
+approach = "Realistic"
+classification = "Fullstack"
+database = "postgres"
+database_os = "Linux"
+os = "Linux"
+orm = "Raw"
+platform = "None"
+webserver = "picov"
+versus = ""
+
+[v-picov-raw-clibpqb-profiled]
+urls.plaintext = "/plaintext"
+urls.json = "/te-benchmark-um-pq/json"
+urls.db = "/te-benchmark-um-pq/db"
+urls.query = "/te-benchmark-um-pq/queries?queries="
+urls.update = "/te-benchmark-um-pq/updates?queries="
+urls.fortune = "/te-benchmark-um-pq/fortunes"
+urls.cached_query = "/te-benchmark-um-pq/cached-worlds?count="
+approach = "Realistic"
+classification = "Fullstack"
+database = "postgres"
+database_os = "Linux"
+os = "Linux"
+orm = "Raw"
+platform = "None"
+webserver = "picov"
+versus = ""
+
 [java-firenio]
 [java-firenio]
 urls.plaintext = "/plaintext"
 urls.plaintext = "/plaintext"
 urls.json = "/te-benchmark-um/json"
 urls.json = "/te-benchmark-um/json"
@@ -481,4 +517,4 @@ os = "Linux"
 orm = "None"
 orm = "None"
 platform = "None"
 platform = "None"
 webserver = "wizzardo-http"
 webserver = "wizzardo-http"
-versus = ""
+versus = ""

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-apache.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 apache mongo
+CMD ./run_ffead.sh ffead-cpp-6.0 apache mongo

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-base-debug.dockerfile

@@ -1,6 +1,6 @@
 FROM ubuntu:20.04
 FROM ubuntu:20.04
 LABEL maintainer="Sumeet Chhetri"
 LABEL maintainer="Sumeet Chhetri"
-LABEL version="5.3-debug"
+LABEL version="6.0-debug"
 LABEL description="Base ffead-cpp docker image with commit id - master"
 LABEL description="Base ffead-cpp docker image with commit id - master"
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
@@ -13,7 +13,7 @@ RUN mkdir /installs
 COPY te-benchmark-um/ /installs/te-benchmark-um/
 COPY te-benchmark-um/ /installs/te-benchmark-um/
 COPY te-benchmark-um-pq/ /installs/te-benchmark-um-pq/
 COPY te-benchmark-um-pq/ /installs/te-benchmark-um-pq/
 COPY te-benchmark-um-mgr/ /installs/te-benchmark-um-mgr/
 COPY te-benchmark-um-mgr/ /installs/te-benchmark-um-mgr/
-COPY te-benchmark-um-pq-async/ /installs/te-benchmark-um-pq-async/
+COPY te-benchmark-um-mgr/ /installs/te-benchmark-um-pq-async/
 
 
 WORKDIR ${IROOT}
 WORKDIR ${IROOT}
 
 

+ 2 - 11
frameworks/C++/ffead-cpp/ffead-cpp-base.dockerfile

@@ -1,6 +1,6 @@
-FROM ubuntu:20.04
+FROM sumeetchhetri/ffead-cpp-deps:6.0
 LABEL maintainer="Sumeet Chhetri"
 LABEL maintainer="Sumeet Chhetri"
-LABEL version="5.3"
+LABEL version="6.0"
 LABEL description="Base ffead-cpp docker image with commit id - master"
 LABEL description="Base ffead-cpp docker image with commit id - master"
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
@@ -9,7 +9,6 @@ ENV DEBUG=off
 ENV DEBIAN_FRONTEND noninteractive
 ENV DEBIAN_FRONTEND noninteractive
 RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
 RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
 
 
-RUN mkdir /installs
 COPY te-benchmark-um/ /installs/te-benchmark-um/
 COPY te-benchmark-um/ /installs/te-benchmark-um/
 COPY te-benchmark-um-pq/ /installs/te-benchmark-um-pq/
 COPY te-benchmark-um-pq/ /installs/te-benchmark-um-pq/
 COPY te-benchmark-um-mgr/ /installs/te-benchmark-um-mgr/
 COPY te-benchmark-um-mgr/ /installs/te-benchmark-um-mgr/
@@ -17,14 +16,6 @@ COPY te-benchmark-um-pq-async/ /installs/te-benchmark-um-pq-async/
 
 
 WORKDIR ${IROOT}
 WORKDIR ${IROOT}
 
 
-COPY install_ffead-cpp-dependencies.sh ${IROOT}/
-RUN chmod 755 ${IROOT}/install_ffead-cpp-dependencies.sh
-RUN ./install_ffead-cpp-dependencies.sh
-
-COPY install_ffead-cpp-backends.sh ${IROOT}/
-RUN chmod 755 ${IROOT}/install_ffead-cpp-backends.sh
-RUN ./install_ffead-cpp-backends.sh
-
 COPY install_ffead-cpp-framework.sh install_ffead-cpp-httpd.sh install_ffead-cpp-nginx.sh server.sh ${IROOT}/
 COPY install_ffead-cpp-framework.sh install_ffead-cpp-httpd.sh install_ffead-cpp-nginx.sh server.sh ${IROOT}/
 RUN chmod 755 ${IROOT}/*.sh
 RUN chmod 755 ${IROOT}/*.sh
 RUN ./install_ffead-cpp-framework.sh && ./install_ffead-cpp-httpd.sh && ./install_ffead-cpp-nginx.sh && cd ${IROOT}/ffead-cpp-src && make clean && rm -rf CMakeFiles
 RUN ./install_ffead-cpp-framework.sh && ./install_ffead-cpp-httpd.sh && ./install_ffead-cpp-nginx.sh && cd ${IROOT}/ffead-cpp-src && make clean && rm -rf CMakeFiles

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-cinatra.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 cinatra
+CMD ./run_ffead.sh ffead-cpp-6.0 cinatra

+ 7 - 7
frameworks/C++/ffead-cpp/ffead-cpp-crystal-h2o.dockerfile

@@ -1,13 +1,13 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um.so /usr/local/lib/libte_benchmark_um.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libinter.so /usr/local/lib/libinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
 	ldconfig
 	ldconfig
 
 
 RUN apt-get update -y && apt-get install -yqq libh2o-evloop-dev libwslay-dev libyaml-0-2 libevent-dev libpcre3-dev \
 RUN apt-get update -y && apt-get install -yqq libh2o-evloop-dev libwslay-dev libyaml-0-2 libevent-dev libpcre3-dev \
@@ -21,4 +21,4 @@ RUN shards install && gcc -shared -O3 lib/h2o/src/ext/h2o.c -I/usr/include -fPIC
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 crystal-h2o
+CMD ./run_ffead.sh ffead-cpp-6.0 crystal-h2o

+ 7 - 7
frameworks/C++/ffead-cpp/ffead-cpp-crystal-http.dockerfile

@@ -1,13 +1,13 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um.so /usr/local/lib/libte_benchmark_um.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libinter.so /usr/local/lib/libinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
 	ldconfig
 	ldconfig
 
 
 RUN apt-get update -y && apt install -y --no-install-recommends gnupg && curl -sL "https://keybase.io/crystal/pgp_keys.asc" | apt-key add - \
 RUN apt-get update -y && apt install -y --no-install-recommends gnupg && curl -sL "https://keybase.io/crystal/pgp_keys.asc" | apt-key add - \
@@ -18,4 +18,4 @@ RUN crystal build --release --no-debug crystal-ffead-cpp.cr -o crystal-ffead-cpp
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 crystal-http
+CMD ./run_ffead.sh ffead-cpp-6.0 crystal-http

+ 7 - 7
frameworks/C++/ffead-cpp/ffead-cpp-d-hunt.dockerfile

@@ -1,14 +1,14 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 ENV DEBIAN_FRONTEND noninteractive
 ENV DEBIAN_FRONTEND noninteractive
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um.so /usr/local/lib/libte_benchmark_um.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libinter.so /usr/local/lib/libinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
 	ldconfig
 	ldconfig
 
 
 ENV LDC_VERSION 1.24.0
 ENV LDC_VERSION 1.24.0
@@ -36,4 +36,4 @@ RUN dub upgrade --verbose && dub build --build=release --arch=x86_64 --compiler=
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 d-hunt
+CMD ./run_ffead.sh ffead-cpp-6.0 d-hunt

+ 22 - 0
frameworks/C++/ffead-cpp/ffead-cpp-deps.dockerfile

@@ -0,0 +1,22 @@
+FROM ubuntu:20.04
+LABEL maintainer="Sumeet Chhetri"
+LABEL version="6.0"
+LABEL description="ffead-cpp docker image with backend dependencies"
+
+ENV IROOT=/installs
+ENV DEBUG=off
+
+ENV DEBIAN_FRONTEND noninteractive
+RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
+
+RUN mkdir /installs
+
+WORKDIR ${IROOT}
+
+COPY install_ffead-cpp-dependencies.sh ${IROOT}/
+RUN chmod 755 ${IROOT}/install_ffead-cpp-dependencies.sh
+RUN ./install_ffead-cpp-dependencies.sh
+
+COPY install_ffead-cpp-backends.sh ${IROOT}/
+RUN chmod 755 ${IROOT}/install_ffead-cpp-backends.sh
+RUN ./install_ffead-cpp-backends.sh

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-drogon.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 drogon
+CMD ./run_ffead.sh ffead-cpp-6.0 drogon

+ 7 - 7
frameworks/C++/ffead-cpp/ffead-cpp-go-fasthttp.dockerfile

@@ -1,13 +1,13 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um.so /usr/local/lib/libte_benchmark_um.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libinter.so /usr/local/lib/libinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
 	ldconfig
 	ldconfig
 
 
 RUN wget -q https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.14.4.linux-amd64.tar.gz
 RUN wget -q https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.14.4.linux-amd64.tar.gz
@@ -17,4 +17,4 @@ RUN make && cp fasthttp-ffead-cpp $IROOT/ && rm -rf ${IROOT}/lang-server-backend
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 go-fasthttp
+CMD ./run_ffead.sh ffead-cpp-6.0 go-fasthttp

+ 7 - 7
frameworks/C++/ffead-cpp/ffead-cpp-go-gnet.dockerfile

@@ -1,13 +1,13 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um.so /usr/local/lib/libte_benchmark_um.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libinter.so /usr/local/lib/libinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
 	ldconfig
 	ldconfig
 
 
 RUN wget -q https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.14.4.linux-amd64.tar.gz
 RUN wget -q https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.14.4.linux-amd64.tar.gz
@@ -17,4 +17,4 @@ RUN make && cp gnet-ffead-cpp $IROOT/ && rm -rf ${IROOT}/lang-server-backends
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 go-gnet
+CMD ./run_ffead.sh ffead-cpp-6.0 go-gnet

+ 7 - 7
frameworks/C++/ffead-cpp/ffead-cpp-h2o.dockerfile

@@ -1,14 +1,14 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 ENV DEBIAN_FRONTEND noninteractive
 ENV DEBIAN_FRONTEND noninteractive
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um.so /usr/local/lib/libte_benchmark_um.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libinter.so /usr/local/lib/libinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
 	ldconfig
 	ldconfig
 
 
 WORKDIR ${IROOT}
 WORKDIR ${IROOT}
@@ -37,4 +37,4 @@ RUN chmod +x h2o.sh
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 h2o
+CMD ./run_ffead.sh ffead-cpp-6.0 h2o

+ 7 - 7
frameworks/C++/ffead-cpp/ffead-cpp-java-base.dockerfile

@@ -1,16 +1,16 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 LABEL maintainer="Sumeet Chhetri"
 LABEL maintainer="Sumeet Chhetri"
-LABEL version="5.3"
+LABEL version="6.0"
 LABEL description="Base java docker image with master code"
 LABEL description="Base java docker image with master code"
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um.so /usr/local/lib/libte_benchmark_um.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libinter.so /usr/local/lib/libinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
 	ldconfig
 	ldconfig
 	
 	
 RUN apt update -yqq && apt install -y --no-install-recommends default-jre maven gradle && rm -rf /var/lib/apt/lists/*
 RUN apt update -yqq && apt install -y --no-install-recommends default-jre maven gradle && rm -rf /var/lib/apt/lists/*

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-java-firenio.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-java-base:5.3
+FROM sumeetchhetri/ffead-cpp-java-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 java-firenio
+CMD ./run_ffead.sh ffead-cpp-6.0 java-firenio

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-java-rapidoid.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-java-base:5.3
+FROM sumeetchhetri/ffead-cpp-java-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 java-rapidoid
+CMD ./run_ffead.sh ffead-cpp-6.0 java-rapidoid

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-java-wizzardo-http.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-java-base:5.3
+FROM sumeetchhetri/ffead-cpp-java-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 java-wizzardo-http
+CMD ./run_ffead.sh ffead-cpp-6.0 java-wizzardo-http

+ 7 - 7
frameworks/C++/ffead-cpp/ffead-cpp-julia-http.dockerfile

@@ -1,14 +1,14 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 ENV DEBIAN_FRONTEND noninteractive
 ENV DEBIAN_FRONTEND noninteractive
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um.so /usr/local/lib/libte_benchmark_um.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libinter.so /usr/local/lib/libinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
 	ldconfig
 	ldconfig
 
 
 WORKDIR ${IROOT}
 WORKDIR ${IROOT}
@@ -25,4 +25,4 @@ RUN julia -e 'import Pkg; Pkg.update()' && \
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 julia-http
+CMD ./run_ffead.sh ffead-cpp-6.0 julia-http

+ 7 - 7
frameworks/C++/ffead-cpp/ffead-cpp-libreactor.dockerfile

@@ -1,13 +1,13 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um.so /usr/local/lib/libte_benchmark_um.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libinter.so /usr/local/lib/libinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
 	ldconfig
 	ldconfig
 
 
 WORKDIR ${IROOT}
 WORKDIR ${IROOT}
@@ -24,4 +24,4 @@ RUN make && cp libreactor-ffead-cpp $IROOT/ && rm -rf ${IROOT}/lang-server-backe
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 libreactor
+CMD ./run_ffead.sh ffead-cpp-6.0 libreactor

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-lithium.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 lithium
+CMD ./run_ffead.sh ffead-cpp-6.0 lithium

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-mongo-raw.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 emb mongo-raw memory
+CMD ./run_ffead.sh ffead-cpp-6.0 emb mongo-raw memory

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-mysql.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0-sql emb mysql
+CMD ./run_ffead.sh ffead-cpp-6.0-sql emb mysql

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-nginx.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 nginx mongo
+CMD ./run_ffead.sh ffead-cpp-6.0 nginx mongo

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-postgresql-raw-async-clibpqb-profiled.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-sql-raw-async-clibpqb-profiled-base:5.3
+FROM sumeetchhetri/ffead-cpp-sql-raw-async-clibpqb-profiled-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0-sql emb postgresql-raw-async memory
+CMD ./run_ffead.sh ffead-cpp-6.0-sql emb postgresql-raw-async memory

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-postgresql-raw-async-profiled.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-sql-raw-async-profiled-base:5.3
+FROM sumeetchhetri/ffead-cpp-sql-raw-async-profiled-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0-sql emb postgresql-raw-async memory
+CMD ./run_ffead.sh ffead-cpp-6.0-sql emb postgresql-raw-async memory

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-postgresql-raw-async.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0-sql emb postgresql-raw-async memory
+CMD ./run_ffead.sh ffead-cpp-6.0-sql emb postgresql-raw-async memory

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-postgresql-raw-clibpqb-profiled.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-sql-raw-clibpqb-profiled-base:5.3
+FROM sumeetchhetri/ffead-cpp-sql-raw-clibpqb-profiled-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0-sql emb postgresql-raw memory
+CMD ./run_ffead.sh ffead-cpp-6.0-sql emb postgresql-raw memory

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-postgresql-raw-profiled.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-sql-raw-profiled-base:5.3
+FROM sumeetchhetri/ffead-cpp-sql-raw-profiled-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0-sql emb postgresql-raw memory
+CMD ./run_ffead.sh ffead-cpp-6.0-sql emb postgresql-raw memory

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-postgresql-raw.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0-sql emb postgresql-raw memory
+CMD ./run_ffead.sh ffead-cpp-6.0-sql emb postgresql-raw memory

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-postgresql.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0-sql emb postgresql redis
+CMD ./run_ffead.sh ffead-cpp-6.0-sql emb postgresql redis

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-rust-actix.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-rust-base:5.3
+FROM sumeetchhetri/ffead-cpp-rust-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 rust-actix
+CMD ./run_ffead.sh ffead-cpp-6.0 rust-actix

+ 7 - 7
frameworks/C++/ffead-cpp/ffead-cpp-rust-base.dockerfile

@@ -1,16 +1,16 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 LABEL maintainer="Sumeet Chhetri"
 LABEL maintainer="Sumeet Chhetri"
-LABEL version="5.3"
+LABEL version="6.0"
 LABEL description="Base rust docker image with ffead-cpp v4.0 - commit id - master"
 LABEL description="Base rust docker image with ffead-cpp v4.0 - commit id - master"
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um.so /usr/local/lib/libte_benchmark_um.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libinter.so /usr/local/lib/libinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
 	ldconfig
 	ldconfig
 
 
 RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
 RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-rust-hyper.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-rust-base:5.3
+FROM sumeetchhetri/ffead-cpp-rust-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 rust-hyper
+CMD ./run_ffead.sh ffead-cpp-6.0 rust-hyper

+ 8 - 8
frameworks/C++/ffead-cpp/ffead-cpp-rust-rocket-base.dockerfile

@@ -1,16 +1,16 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 LABEL maintainer="Sumeet Chhetri"
 LABEL maintainer="Sumeet Chhetri"
-LABEL version="5.3"
-LABEL description="Base rust rocket docker image with ffead-cpp v5.0 - commit id - master"
+LABEL version="6.0"
+LABEL description="Base rust rocket docker image with ffead-cpp v6.0 - commit id - master"
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um.so /usr/local/lib/libte_benchmark_um.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libinter.so /usr/local/lib/libinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
 	ldconfig
 	ldconfig
 
 
 RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
 RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-rust-rocket.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-rust-rocket-base:5.3
+FROM sumeetchhetri/ffead-cpp-rust-rocket-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 rust-rocket
+CMD ./run_ffead.sh ffead-cpp-6.0 rust-rocket

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-rust-thruster.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-rust-base:latest
+FROM sumeetchhetri/ffead-cpp-rust-base:latest
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 rust-thruster
+CMD ./run_ffead.sh ffead-cpp-6.0 rust-thruster

+ 12 - 12
frameworks/C++/ffead-cpp/ffead-cpp-seastar-base.dockerfile

@@ -1,4 +1,4 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 #seastar needs ubuntu 20 and boost >= 1.66
 #seastar needs ubuntu 20 and boost >= 1.66
 WORKDIR ${IROOT}
 WORKDIR ${IROOT}
@@ -6,17 +6,17 @@ WORKDIR ${IROOT}
 ENV DEBIAN_FRONTEND noninteractive
 ENV DEBIAN_FRONTEND noninteractive
 
 
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um.so /usr/local/lib/libte_benchmark_um.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um_pq.so /usr/local/lib/libte_benchmark_um_pq.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um_mgr.so /usr/local/lib/libte_benchmark_um_mgr.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um_pq_async.so /usr/local/lib/libte_benchmark_um_pq_async.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libinter.so /usr/local/lib/libinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um-pq.so /usr/local/lib/libte-benchmark-um-pq.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um-mgr.so /usr/local/lib/libte-benchmark-um-mgr.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um-pq-async.so /usr/local/lib/libte-benchmark-um-pq-async.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
 	ldconfig
 	ldconfig
 
 
-ENV FFEAD_CPP_PATH=${IROOT}/ffead-cpp-5.0
+ENV FFEAD_CPP_PATH=${IROOT}/ffead-cpp-6.0
 ENV LD_LIBRARY_PATH=${IROOT}/:${IROOT}/lib:${FFEAD_CPP_PATH}/lib:/usr/local/lib:$LD_LIBRARY_PATH
 ENV LD_LIBRARY_PATH=${IROOT}/:${IROOT}/lib:${FFEAD_CPP_PATH}/lib:/usr/local/lib:$LD_LIBRARY_PATH
 
 
 #seastar need hwloc 2
 #seastar need hwloc 2
@@ -45,7 +45,7 @@ RUN cd seastar && ninja -C build/release install && cp build/release/_cooking/in
 
 
 WORKDIR ${IROOT}/lang-server-backends/c++/seastar
 WORKDIR ${IROOT}/lang-server-backends/c++/seastar
 
 
-#RUN g++ -g SeastarFfeadCpp.cpp -I/home/mavuser/ffead-cpp-5.0/include/ -I/usr/include/libmongoc-1.0 \
+#RUN g++ -g SeastarFfeadCpp.cpp -I/home/mavuser/ffead-cpp-6.0/include/ -I/usr/include/libmongoc-1.0 \
 #	-I/usr/include/libbson-1.0 -I. -I/usr/local/include $(pkg-config --libs --cflags --static seastar) -lffead-framework \
 #	-I/usr/include/libbson-1.0 -I. -I/usr/local/include $(pkg-config --libs --cflags --static seastar) -lffead-framework \
 #	-lffead-modules -o ffead-cpp-seastar
 #	-lffead-modules -o ffead-cpp-seastar
 
 
@@ -55,5 +55,5 @@ RUN chmod +x run.sh
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 seastar
+CMD ./run_ffead.sh ffead-cpp-6.0 seastar
 
 

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-seastar.dockerfile

@@ -1,5 +1,5 @@
-FROM sumeetchhetri/ffead-cpp-5.0-seastar:5.3
+FROM sumeetchhetri/ffead-cpp-seastar:6.0
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 seastar
+CMD ./run_ffead.sh ffead-cpp-6.0 seastar

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-sql-raw-async-clibpqb-profiled-base.dockerfile

@@ -1,6 +1,6 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 LABEL maintainer="Sumeet Chhetri"
 LABEL maintainer="Sumeet Chhetri"
-LABEL version="5.3"
+LABEL version="6.0"
 LABEL description="SQL Raw Custom libpq batch patched Base ffead-cpp docker image with commit id - master"
 LABEL description="SQL Raw Custom libpq batch patched Base ffead-cpp docker image with commit id - master"
 
 
 WORKDIR /tmp
 WORKDIR /tmp

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-sql-raw-async-profiled-base.dockerfile

@@ -1,6 +1,6 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 LABEL maintainer="Sumeet Chhetri"
 LABEL maintainer="Sumeet Chhetri"
-LABEL version="5.3"
+LABEL version="6.0"
 LABEL description="SQL Raw Base ffead-cpp docker image with commit id - master"
 LABEL description="SQL Raw Base ffead-cpp docker image with commit id - master"
 
 
 WORKDIR /tmp
 WORKDIR /tmp

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-sql-raw-clibpqb-profiled-base.dockerfile

@@ -1,6 +1,6 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 LABEL maintainer="Sumeet Chhetri"
 LABEL maintainer="Sumeet Chhetri"
-LABEL version="5.3"
+LABEL version="6.0"
 LABEL description="SQL Raw Custom libpq batch patched Base ffead-cpp docker image with commit id - master"
 LABEL description="SQL Raw Custom libpq batch patched Base ffead-cpp docker image with commit id - master"
 
 
 WORKDIR /tmp
 WORKDIR /tmp

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-sql-raw-profiled-base.dockerfile

@@ -1,6 +1,6 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 LABEL maintainer="Sumeet Chhetri"
 LABEL maintainer="Sumeet Chhetri"
-LABEL version="5.3"
+LABEL version="6.0"
 LABEL description="SQL Raw Base ffead-cpp docker image with commit id - master"
 LABEL description="SQL Raw Base ffead-cpp docker image with commit id - master"
 
 
 WORKDIR /tmp
 WORKDIR /tmp

+ 11 - 11
frameworks/C++/ffead-cpp/ffead-cpp-swift-nio.dockerfile

@@ -1,24 +1,24 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 ENV DEBIAN_FRONTEND noninteractive
 ENV DEBIAN_FRONTEND noninteractive
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um.so /usr/local/lib/libte_benchmark_um.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libinter.so /usr/local/lib/libinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
 	ldconfig
 	ldconfig
 
 
 WORKDIR ${IROOT}
 WORKDIR ${IROOT}
 RUN apt-get update -y && apt-get install -y --no-install-recommends clang libicu-dev libpython2.7-dev libtinfo5 libncurses5 libz3-dev \
 RUN apt-get update -y && apt-get install -y --no-install-recommends clang libicu-dev libpython2.7-dev libtinfo5 libncurses5 libz3-dev \
 	 && rm -rf /var/lib/apt/lists/*
 	 && rm -rf /var/lib/apt/lists/*
 	 
 	 
-RUN wget -q https://swift.org/builds/swift-5.3-release/ubuntu2004/swift-5.3-RELEASE/swift-5.3-RELEASE-ubuntu20.04.tar.gz
-RUN tar -xzf swift-5.3-RELEASE-ubuntu20.04.tar.gz
-RUN mv swift-5.3-RELEASE-ubuntu20.04 /opt/ && rm -f swift-5.3-RELEASE-ubuntu20.04.tar.gz
-RUN ln -s /opt/swift-5.3-RELEASE-ubuntu20.04 /opt/swift
+RUN wget -q https://swift.org/builds/swift-6.0-release/ubuntu2004/swift-6.0-RELEASE/swift-6.0-RELEASE-ubuntu20.04.tar.gz
+RUN tar -xzf swift-6.0-RELEASE-ubuntu20.04.tar.gz
+RUN mv swift-6.0-RELEASE-ubuntu20.04 /opt/ && rm -f swift-6.0-RELEASE-ubuntu20.04.tar.gz
+RUN ln -s /opt/swift-6.0-RELEASE-ubuntu20.04 /opt/swift
 
 
 ENV PATH=/opt/swift/usr/bin:${PATH}
 ENV PATH=/opt/swift/usr/bin:${PATH}
 
 
@@ -28,4 +28,4 @@ RUN swift build --enable-test-discovery -c release -Xlinker "-L/usr/local/lib" -
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 swift-nio
+CMD ./run_ffead.sh ffead-cpp-6.0 swift-nio

+ 12 - 8
frameworks/C++/ffead-cpp/ffead-cpp-v-base.dockerfile

@@ -1,20 +1,24 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 LABEL maintainer="Sumeet Chhetri"
 LABEL maintainer="Sumeet Chhetri"
-LABEL version="5.3"
+LABEL version="6.0"
 LABEL description="Base v docker image with ffead-cpp v4.0 commit id - master"
 LABEL description="Base v docker image with ffead-cpp v4.0 commit id - master"
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
 RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libte_benchmark_um.so /usr/local/lib/libte_benchmark_um.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libinter.so /usr/local/lib/libinter.so && \
-	ln -s ${IROOT}/ffead-cpp-5.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0/lib/libdinter.so /usr/local/lib/libdinter.so && \
 	ldconfig
 	ldconfig
 	
 	
 RUN apt update -yqq && apt install -y git make && rm -rf /var/lib/apt/lists/*
 RUN apt update -yqq && apt install -y git make && rm -rf /var/lib/apt/lists/*
-RUN git clone https://github.com/vlang/v && cd v && make && ./v symlink
+#For Latest vlang, uncomment the below mentioned line, due to lot of new enhancements and unsafe block handling, vlnag has slowed down tremendously
+#RUN git clone https://github.com/vlang/v && cd v && make && ./v symlink
+
+#For the fastest vlang performance, use 0.1.29, where the unsafe changes were only restricted to pointer arithmetic
+RUN wget -q https://github.com/vlang/v/releases/download/0.1.29/v_linux.zip && unzip -q v_linux.zip && cd v && chmod +x v && ./v symlink && cd .. && rm -f v_linux.zip
 
 
 WORKDIR ${IROOT}/lang-server-backends/v/vweb
 WORKDIR ${IROOT}/lang-server-backends/v/vweb
 #COPY vweb.v ${IROOT}/lang-server-backends/v/vweb/
 #COPY vweb.v ${IROOT}/lang-server-backends/v/vweb/

+ 98 - 0
frameworks/C++/ffead-cpp/ffead-cpp-v-picov-raw-clibpqb-profiled-base.dockerfile

@@ -0,0 +1,98 @@
+FROM sumeetchhetri/ffead-cpp-sql-raw-clibpqb-profiled-base:6.0
+LABEL maintainer="Sumeet Chhetri"
+LABEL version="6.0"
+LABEL description="SQL Raw Custom libpq batch patched Base ffead-cpp-v-picov-profiled docker image with commit id - master"
+
+RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0-sql/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0-sql/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0-sql/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0-sql/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0-sql/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ldconfig
+
+RUN apt update -yqq && apt install -y git make && rm -rf /var/lib/apt/lists/*
+#For Latest vlang, uncomment the below mentioned line, due to lot of new enhancements and unsafe block handling, vlnag has slowed down tremendously
+#RUN git clone https://github.com/vlang/v && cd v && make && ./v symlink
+
+#For the fastest vlang performance, use 0.1.29, where the unsafe changes were only restricted to pointer arithmetic
+RUN wget -q https://github.com/vlang/v/releases/download/0.1.29/v_linux.zip && unzip -q v_linux.zip && cd v && chmod +x v && ./v symlink && cd .. && rm -f v_linux.zip
+
+WORKDIR /tmp
+RUN mkdir postgresql
+
+COPY postgresql/* /tmp/postgresql/
+
+#POSTGRESQL
+WORKDIR /tmp/postgresql/
+
+# prepare PostgreSQL APT repository
+RUN apt-get -yqq update && apt-get -yqq install locales gnupg lsb-release
+
+RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
+RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee  /etc/apt/sources.list.d/pgdg.list
+
+ENV PG_VERSION 13
+RUN locale-gen en_US.UTF-8
+ENV LANG en_US.UTF-8
+ENV LANGUAGE en_US:en
+ENV LC_ALL en_US.UTF-8
+ENV DEBIAN_FRONTEND noninteractive
+
+# install postgresql on database machine
+RUN apt-get -yqq update && apt-get -yqq install postgresql-13 postgresql-contrib-13 &&  rm -rf /var/lib/apt/lists/*
+
+# Make sure all the configuration files in main belong to postgres
+RUN mv postgresql.conf /etc/postgresql/${PG_VERSION}/main/postgresql.conf
+RUN mv pg_hba.conf /etc/postgresql/${PG_VERSION}/main/pg_hba.conf
+
+RUN chown -Rf postgres:postgres /etc/postgresql/${PG_VERSION}/main
+
+RUN cp -R -p /var/lib/postgresql/${PG_VERSION}/main /ssd/postgresql
+RUN cp /etc/postgresql/${PG_VERSION}/main/postgresql.conf /ssd/postgresql
+RUN mv 60-postgresql-shm.conf /etc/sysctl.d/60-postgresql-shm.conf
+
+RUN chown -Rf postgres:postgres /var/run/postgresql
+RUN chmod 2777 /var/run/postgresql
+RUN chown postgres:postgres /etc/sysctl.d/60-postgresql-shm.conf
+RUN chown postgres:postgres create-postgres*
+RUN chown -Rf postgres:postgres /ssd
+
+ENV PGDATA=/ssd/postgresql
+
+USER postgres
+
+# We have to wait for postgres to start before we can use the cli
+RUN service postgresql start && \
+    until psql -c "\q"; do sleep 1; done && \
+    psql < create-postgres-database.sql && \
+    psql -a hello_world < create-postgres.sql && \
+    service postgresql stop
+#POSTGRESQL
+
+USER root
+
+#WRK
+WORKDIR /tmp/wrk
+RUN apt-get -yqq update && apt-get -yqq install libluajit-5.1-dev libssl-dev luajit && rm -rf /var/lib/apt/lists/* && \
+	curl -sL https://github.com/wg/wrk/archive/4.1.0.tar.gz | tar xz --strip-components=1
+ENV LDFLAGS="-O3 -march=native -flto"
+ENV CFLAGS="-I /usr/include/luajit-2.1 $LDFLAGS"
+RUN make WITH_LUAJIT=/usr WITH_OPENSSL=/usr -j "$(nproc)"
+RUN cp wrk /usr/local/bin
+
+ENV name name
+ENV server_host server_host
+ENV levels levels
+ENV duration duration
+ENV max_concurrency max_concurrency
+ENV max_threads max_threads
+ENV pipeline pipeline
+ENV accept accept
+#WRK
+
+WORKDIR ${IROOT}
+
+COPY sql-v-picov-profiled-install.sh install_ffead-cpp-sql-raw-v-picov-profiled.sh ${IROOT}/
+RUN chmod 755 ${IROOT}/sql-v-picov-profiled-install.sh ${IROOT}/install_ffead-cpp-sql-raw-v-picov-profiled.sh
+RUN ./sql-v-picov-profiled-install.sh

+ 7 - 0
frameworks/C++/ffead-cpp/ffead-cpp-v-picov-raw-clibpqb-profiled.dockerfile

@@ -0,0 +1,7 @@
+FROM sumeetchhetri/ffead-cpp-v-picov-raw-clibpqb-profiled-base:6.0
+
+ENV IROOT=/installs
+
+WORKDIR /
+
+CMD ./run_ffead.sh ffead-cpp-6.0-sql v-picov postgresql-raw memory

+ 98 - 0
frameworks/C++/ffead-cpp/ffead-cpp-v-picov-raw-profiled-base.dockerfile

@@ -0,0 +1,98 @@
+FROM sumeetchhetri/ffead-cpp-sql-raw-profiled-base:6.0
+LABEL maintainer="Sumeet Chhetri"
+LABEL version="6.0"
+LABEL description="SQL Raw Base ffead-cpp-v-picov-profiled docker image with commit id - master"
+
+RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libte_benc* /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0-sql/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0-sql/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0-sql/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0-sql/lib/libinter.so /usr/local/lib/libinter.so && \
+	ln -s ${IROOT}/ffead-cpp-6.0-sql/lib/libdinter.so /usr/local/lib/libdinter.so && \
+	ldconfig
+
+RUN apt update -yqq && apt install -y git make && rm -rf /var/lib/apt/lists/*
+#For Latest vlang, uncomment the below mentioned line, due to lot of new enhancements and unsafe block handling, vlnag has slowed down tremendously
+#RUN git clone https://github.com/vlang/v && cd v && make && ./v symlink
+
+#For the fastest vlang performance, use 0.1.29, where the unsafe changes were only restricted to pointer arithmetic
+RUN wget -q https://github.com/vlang/v/releases/download/0.1.29/v_linux.zip && unzip -q v_linux.zip && cd v && chmod +x v && ./v symlink && cd .. && rm -f v_linux.zip
+
+WORKDIR /tmp
+RUN mkdir postgresql
+
+COPY postgresql/* /tmp/postgresql/
+
+#POSTGRESQL
+WORKDIR /tmp/postgresql/
+
+# prepare PostgreSQL APT repository
+RUN apt-get -yqq update && apt-get -yqq install locales gnupg lsb-release
+
+RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
+RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee  /etc/apt/sources.list.d/pgdg.list
+
+ENV PG_VERSION 13
+RUN locale-gen en_US.UTF-8
+ENV LANG en_US.UTF-8
+ENV LANGUAGE en_US:en
+ENV LC_ALL en_US.UTF-8
+ENV DEBIAN_FRONTEND noninteractive
+
+# install postgresql on database machine
+RUN apt-get -yqq update && apt-get -yqq install postgresql-13 postgresql-contrib-13 &&  rm -rf /var/lib/apt/lists/*
+
+# Make sure all the configuration files in main belong to postgres
+RUN mv postgresql.conf /etc/postgresql/${PG_VERSION}/main/postgresql.conf
+RUN mv pg_hba.conf /etc/postgresql/${PG_VERSION}/main/pg_hba.conf
+
+RUN chown -Rf postgres:postgres /etc/postgresql/${PG_VERSION}/main
+
+RUN cp -R -p /var/lib/postgresql/${PG_VERSION}/main /ssd/postgresql
+RUN cp /etc/postgresql/${PG_VERSION}/main/postgresql.conf /ssd/postgresql
+RUN mv 60-postgresql-shm.conf /etc/sysctl.d/60-postgresql-shm.conf
+
+RUN chown -Rf postgres:postgres /var/run/postgresql
+RUN chmod 2777 /var/run/postgresql
+RUN chown postgres:postgres /etc/sysctl.d/60-postgresql-shm.conf
+RUN chown postgres:postgres create-postgres*
+RUN chown -Rf postgres:postgres /ssd
+
+ENV PGDATA=/ssd/postgresql
+
+USER postgres
+
+# We have to wait for postgres to start before we can use the cli
+RUN service postgresql start && \
+    until psql -c "\q"; do sleep 1; done && \
+    psql < create-postgres-database.sql && \
+    psql -a hello_world < create-postgres.sql && \
+    service postgresql stop
+#POSTGRESQL
+
+USER root
+
+#WRK
+WORKDIR /tmp/wrk
+RUN apt-get -yqq update && apt-get -yqq install libluajit-5.1-dev libssl-dev luajit && rm -rf /var/lib/apt/lists/* && \
+	curl -sL https://github.com/wg/wrk/archive/4.1.0.tar.gz | tar xz --strip-components=1
+ENV LDFLAGS="-O3 -march=native -flto"
+ENV CFLAGS="-I /usr/include/luajit-2.1 $LDFLAGS"
+RUN make WITH_LUAJIT=/usr WITH_OPENSSL=/usr -j "$(nproc)"
+RUN cp wrk /usr/local/bin
+
+ENV name name
+ENV server_host server_host
+ENV levels levels
+ENV duration duration
+ENV max_concurrency max_concurrency
+ENV max_threads max_threads
+ENV pipeline pipeline
+ENV accept accept
+#WRK
+
+WORKDIR ${IROOT}
+
+COPY sql-v-picov-profiled-install.sh install_ffead-cpp-sql-raw-v-picov-profiled.sh ${IROOT}/
+RUN chmod 755 ${IROOT}/sql-v-picov-profiled-install.sh ${IROOT}/install_ffead-cpp-sql-raw-v-picov-profiled.sh
+RUN ./sql-v-picov-profiled-install.sh

+ 7 - 0
frameworks/C++/ffead-cpp/ffead-cpp-v-picov-raw-profiled.dockerfile

@@ -0,0 +1,7 @@
+FROM sumeetchhetri/ffead-cpp-v-picov-raw-profiled-base:6.0
+
+ENV IROOT=/installs
+
+WORKDIR /
+
+CMD ./run_ffead.sh ffead-cpp-6.0-sql v-picov postgresql-raw memory

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-v-picov.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-v-base:5.3
+FROM sumeetchhetri/ffead-cpp-v-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 v-picov postgresql-raw memory
+CMD ./run_ffead.sh ffead-cpp-6.0 v-picov postgresql-raw memory

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp-v-vweb.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-v-base:5.3
+FROM sumeetchhetri/ffead-cpp-v-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 v-vweb
+CMD ./run_ffead.sh ffead-cpp-6.0 v-vweb

+ 2 - 2
frameworks/C++/ffead-cpp/ffead-cpp.dockerfile

@@ -1,7 +1,7 @@
-FROM sumeetchhetri/ffead-cpp-5.0-base:5.3
+FROM sumeetchhetri/ffead-cpp-base:6.0
 
 
 ENV IROOT=/installs
 ENV IROOT=/installs
 
 
 WORKDIR /
 WORKDIR /
 
 
-CMD ./run_ffead.sh ffead-cpp-5.0 emb mongo redis
+CMD ./run_ffead.sh ffead-cpp-6.0 emb mongo redis

+ 2 - 10
frameworks/C++/ffead-cpp/install_ffead-cpp-backends.sh

@@ -2,15 +2,6 @@
 
 
 cd $IROOT
 cd $IROOT
 
 
-git clone https://github.com/sumeetchhetri/ffead-cpp
-cd ffead-cpp
-git checkout 75bba206221cb6a3595cb5f7ba75108964c19138 -b 5.0
-rm -rf .git
-cd ..
-mv ffead-cpp ffead-cpp-src
-mv ffead-cpp-src/lang-server-backends ${IROOT}/
-cd $IROOT
-
 CURR_TYPE="lithium"
 CURR_TYPE="lithium"
 if [ "$CURR_TYPE" = "lithium" ]
 if [ "$CURR_TYPE" = "lithium" ]
 then
 then
@@ -96,7 +87,8 @@ then
 	git clone https://github.com/chronoxor/CppServer
 	git clone https://github.com/chronoxor/CppServer
 	cd CppServer
 	cd CppServer
 	gil update
 	gil update
-	cd build
+	cd $IROOT/CppServer/modules/CppCommon/modules/fmt && git checkout b9ab5c8836bbffbe0a877f64d6faef8fbf4fd394 -b works
+	cd $IROOT/CppServer/build
 	./unix.sh
 	./unix.sh
 	cp $IROOT/CppServer/bin/libcppserver.a /usr/local/lib/
 	cp $IROOT/CppServer/bin/libcppserver.a /usr/local/lib/
 	cp -rf $IROOT/CppServer/modules/asio/asio/include/* /usr/local/include/
 	cp -rf $IROOT/CppServer/modules/asio/asio/include/* /usr/local/include/

+ 0 - 15
frameworks/C++/ffead-cpp/install_ffead-cpp-dependencies.sh

@@ -37,21 +37,6 @@ wget -q https://downloads.mysql.com/archives/get/p/10/file/mysql-connector-odbc-
 dpkg -i mysql-connector-odbc-setup_8.0.21-1ubuntu20.04_amd64.deb
 dpkg -i mysql-connector-odbc-setup_8.0.21-1ubuntu20.04_amd64.deb
 rm -f *.deb
 rm -f *.deb
 
 
-#mkdir -p /usr/lib/x86_64-linux-gnu/odbc
-#wget -q https://downloads.mysql.com/archives/get/p/10/file/mysql-connector-odbc-8.0.19-linux-ubuntu18.04-x86-64bit.tar.gz
-#tar xf mysql-connector-odbc-8.0.19-linux-ubuntu18.04-x86-64bit.tar.gz
-#mv mysql-connector-odbc-8.0.19-linux-ubuntu18.04-x86-64bit/lib/libmyodbc8* /usr/lib/x86_64-linux-gnu/odbc/
-#mysql-connector-odbc-8.0.19-linux-ubuntu18.04-x86-64bit/bin/myodbc-installer -d -a -n "MySQL" -t "DRIVER=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so;"
-#rm -f mysql-connector-odbc-8.0.19-linux-ubuntu18.04-x86-64bit.tar.gz
-#rm -rf mysql-connector-odbc-8.0.19-linux-ubuntu18.04-x86-64bit
-
-#wget -q https://cdn.mysql.com/archives/mysql-connector-odbc-5.3/mysql-connector-odbc-5.3.11-linux-ubuntu16.04-x86-64bit.tar.gz
-#tar xf mysql-connector-odbc-5.3.11-linux-ubuntu16.04-x86-64bit.tar.gz
-#mv mysql-connector-odbc-5.3.11-linux-ubuntu16.04-x86-64bit/lib/libmyodbc5* /usr/lib/x86_64-linux-gnu/odbc/
-#mysql-connector-odbc-5.3.11-linux-ubuntu16.04-x86-64bit/bin/myodbc-installer -d -a -n "MySQL" -t "DRIVER=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc5w.so;"
-#rm -f mysql-connector-odbc-5.3.11-linux-ubuntu16.04-x86-64bit.tar.gz
-#rm -rf mysql-connector-odbc-5.3.11-linux-ubuntu16.04-x86-64bit
-
 wget -q https://github.com/mongodb/mongo-c-driver/releases/download/1.4.2/mongo-c-driver-1.4.2.tar.gz
 wget -q https://github.com/mongodb/mongo-c-driver/releases/download/1.4.2/mongo-c-driver-1.4.2.tar.gz
 tar xf mongo-c-driver-1.4.2.tar.gz
 tar xf mongo-c-driver-1.4.2.tar.gz
 rm -f mongo-c-driver-1.4.2.tar.gz
 rm -f mongo-c-driver-1.4.2.tar.gz

+ 28 - 20
frameworks/C++/ffead-cpp/install_ffead-cpp-framework.sh

@@ -6,18 +6,26 @@ MAX_THREADS=$(( 3 * `nproc` / 2 ))
 WRIT_THREADS=$(( $MAX_THREADS / 3 ))
 WRIT_THREADS=$(( $MAX_THREADS / 3 ))
 SERV_THREADS=$(( $MAX_THREADS - $WRIT_THREADS ))
 SERV_THREADS=$(( $MAX_THREADS - $WRIT_THREADS ))
 
 
+#git checkout e243bc096cd570cfee1edfecbcd91f4c4056fa1a -b 6.0
+git clone https://github.com/sumeetchhetri/ffead-cpp
+cd ffead-cpp
+rm -rf .git
+cd ..
+mv ffead-cpp ffead-cpp-src
+mv ffead-cpp-src/lang-server-backends ${IROOT}/
+
 cd $IROOT/ffead-cpp-src/
 cd $IROOT/ffead-cpp-src/
 
 
 chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh
 chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh
-rm -rf web/te-benchmark-um
-rm -rf web/te-benchmark-um-pq
-rm -rf web/te-benchmark-um-mgr
-rm -rf web/te-benchmark-um-pq-async
+#rm -rf web/te-benchmark-um
+#rm -rf web/te-benchmark-um-pq
+#rm -rf web/te-benchmark-um-mgr
+#rm -rf web/te-benchmark-um-pq-async
 mv ${IROOT}/server.sh script/
 mv ${IROOT}/server.sh script/
-mv ${IROOT}/te-benchmark-um web/
-mv ${IROOT}/te-benchmark-um-pq web/
-mv ${IROOT}/te-benchmark-um-mgr web/
-mv ${IROOT}/te-benchmark-um-pq-async web/
+#mv ${IROOT}/te-benchmark-um web/
+#mv ${IROOT}/te-benchmark-um-pq web/
+#mv ${IROOT}/te-benchmark-um-mgr web/
+#mv ${IROOT}/te-benchmark-um-pq-async web/
 sed -i 's|THRD_PSIZ=6|THRD_PSIZ='${SERV_THREADS}'|g' resources/server.prop
 sed -i 's|THRD_PSIZ=6|THRD_PSIZ='${SERV_THREADS}'|g' resources/server.prop
 sed -i 's|W_THRD_PSIZ=2|W_THRD_PSIZ='${WRIT_THREADS}'|g' resources/server.prop
 sed -i 's|W_THRD_PSIZ=2|W_THRD_PSIZ='${WRIT_THREADS}'|g' resources/server.prop
 sed -i 's|ENABLE_CRS=true|ENABLE_CRS=false|g' resources/server.prop
 sed -i 's|ENABLE_CRS=true|ENABLE_CRS=false|g' resources/server.prop
@@ -56,8 +64,8 @@ sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/default/libdefault${LIB_EXT} D
 sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/flexApp/libflexApp${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
 sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/flexApp/libflexApp${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
 sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/oauthApp/liboauthApp${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
 sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/oauthApp/liboauthApp${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
 sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/markers/libmarkers${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
 sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/markers/libmarkers${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
-sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/te-benchmark/libte_benchmark${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
-sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/peer-server/libpeer_server${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
+sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/te-benchmark/libte-benchmark${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
+sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/peer-server/libpeer-server${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
 sed -i 's|web/default/src/autotools/Makefile||g' configure.ac
 sed -i 's|web/default/src/autotools/Makefile||g' configure.ac
 sed -i 's|web/flexApp/src/autotools/Makefile||g' configure.ac
 sed -i 's|web/flexApp/src/autotools/Makefile||g' configure.ac
 sed -i 's|web/oauthApp/src/autotools/Makefile||g' configure.ac
 sed -i 's|web/oauthApp/src/autotools/Makefile||g' configure.ac
@@ -83,12 +91,12 @@ rm -f /usr/local/lib/libte_benc*
 rm -f /usr/local/lib/libinter.so
 rm -f /usr/local/lib/libinter.so
 rm -f /usr/local/lib/libdinter.so
 rm -f /usr/local/lib/libdinter.so
 
 
-if [ ! -d "ffead-cpp-5.0-bin" ]
+if [ ! -d "ffead-cpp-6.0-bin" ]
 then
 then
 	exit 1
 	exit 1
 fi
 fi
 
 
-cd ffead-cpp-5.0-bin
+cd ffead-cpp-6.0-bin
 #cache related dockerfiles will add the cache.xml accordingly whenever needed
 #cache related dockerfiles will add the cache.xml accordingly whenever needed
 chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh
 chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh
 ./server.sh &
 ./server.sh &
@@ -123,11 +131,11 @@ echo "ffead-cpp normal shutdown"
 pkill ffead-cpp
 pkill ffead-cpp
 
 
 cd ${IROOT}/ffead-cpp-src/
 cd ${IROOT}/ffead-cpp-src/
-cp -rf ffead-cpp-5.0-bin ${IROOT}/ffead-cpp-5.0
-rm -rf ffead-cpp-5.0-bin
+cp -rf ffead-cpp-6.0-bin ${IROOT}/ffead-cpp-6.0
+rm -rf ffead-cpp-6.0-bin
 mv ${IROOT}/nginxfc ${IROOT}/nginx-ffead-mongo
 mv ${IROOT}/nginxfc ${IROOT}/nginx-ffead-mongo
 
 
-cd ${IROOT}/ffead-cpp-5.0
+cd ${IROOT}/ffead-cpp-6.0
 
 
 chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh
 chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh
 chmod 755 *.sh
 chmod 755 *.sh
@@ -142,12 +150,12 @@ cp -f web/te-benchmark-um/sql-src/TeBkUmWorldsql.h web/te-benchmark-um/include/T
 cp -f web/te-benchmark-um/sql-src/TeBkUmWorldsql.cpp web/te-benchmark-um/src/TeBkUmWorld.cpp
 cp -f web/te-benchmark-um/sql-src/TeBkUmWorldsql.cpp web/te-benchmark-um/src/TeBkUmWorld.cpp
 make install -j${MAX_THREADS}
 make install -j${MAX_THREADS}
 
 
-if [ ! -d "ffead-cpp-5.0-bin" ]
+if [ ! -d "ffead-cpp-6.0-bin" ]
 then
 then
 	exit 1
 	exit 1
 fi
 fi
 
 
-cd ffead-cpp-5.0-bin
+cd ffead-cpp-6.0-bin
 #cache related dockerfiles will add the cache.xml accordingly whenever needed
 #cache related dockerfiles will add the cache.xml accordingly whenever needed
 chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh
 chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh
 ./server.sh &
 ./server.sh &
@@ -182,11 +190,11 @@ echo "ffead-cpp normal shutdown"
 pkill ffead-cpp
 pkill ffead-cpp
 
 
 cd ${IROOT}/ffead-cpp-src/
 cd ${IROOT}/ffead-cpp-src/
-cp -rf ffead-cpp-5.0-bin ${IROOT}/ffead-cpp-5.0-sql
-rm -rf ffead-cpp-5.0-bin
+cp -rf ffead-cpp-6.0-bin ${IROOT}/ffead-cpp-6.0-sql
+rm -rf ffead-cpp-6.0-bin
 mv ${IROOT}/nginxfc ${IROOT}/nginx-ffead-sql
 mv ${IROOT}/nginxfc ${IROOT}/nginx-ffead-sql
 
 
-cd ${IROOT}/ffead-cpp-5.0-sql
+cd ${IROOT}/ffead-cpp-6.0-sql
 
 
 chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh
 chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh
 chmod 755 *.sh
 chmod 755 *.sh

+ 7 - 7
frameworks/C++/ffead-cpp/install_ffead-cpp-httpd.sh

@@ -2,7 +2,7 @@
 
 
 cd $IROOT
 cd $IROOT
 
 
-#chown -R www-data:www-data ffead-cpp-5.0
+#chown -R www-data:www-data ffead-cpp-6.0
 
 
 #wget -q https://archive.apache.org/dist/httpd/httpd-2.4.25.tar.gz
 #wget -q https://archive.apache.org/dist/httpd/httpd-2.4.25.tar.gz
 #wget -q https://archive.apache.org/dist/apr/apr-1.5.2.tar.gz
 #wget -q https://archive.apache.org/dist/apr/apr-1.5.2.tar.gz
@@ -23,13 +23,13 @@ cd $IROOT
 #make install
 #make install
 #cd ${IROOT}
 #cd ${IROOT}
 
 
-sed -i 's|#define PACKAGE_BUGREPORT "[email protected]"| |g' ${IROOT}/ffead-cpp-5.0/include/AppDefines.h
-sed -i 's|#define PACKAGE_NAME "ffead-cpp"| |g' ${IROOT}/ffead-cpp-5.0/include/AppDefines.h
-sed -i 's|#define PACKAGE_STRING "ffead-cpp 5.0"| |g' ${IROOT}/ffead-cpp-5.0/include/AppDefines.h
-sed -i 's|#define PACKAGE_TARNAME "ffead-cpp"| |g' ${IROOT}/ffead-cpp-5.0/include/AppDefines.h
-sed -i 's|#define PACKAGE_VERSION "5.0"| |g' ${IROOT}/ffead-cpp-5.0/include/AppDefines.h
+sed -i 's|#define PACKAGE_BUGREPORT "[email protected]"| |g' ${IROOT}/ffead-cpp-6.0/include/AppDefines.h
+sed -i 's|#define PACKAGE_NAME "ffead-cpp"| |g' ${IROOT}/ffead-cpp-6.0/include/AppDefines.h
+sed -i 's|#define PACKAGE_STRING "ffead-cpp 6.0"| |g' ${IROOT}/ffead-cpp-6.0/include/AppDefines.h
+sed -i 's|#define PACKAGE_TARNAME "ffead-cpp"| |g' ${IROOT}/ffead-cpp-6.0/include/AppDefines.h
+sed -i 's|#define PACKAGE_VERSION "6.0"| |g' ${IROOT}/ffead-cpp-6.0/include/AppDefines.h
 
 
-FFEADROOT=${IROOT}/ffead-cpp-5.0
+FFEADROOT=${IROOT}/ffead-cpp-6.0
 ETROOT=${FFEADROOT//\//\\/}
 ETROOT=${FFEADROOT//\//\\/}
 EIROOT=${IROOT//\//\\/}
 EIROOT=${IROOT//\//\\/}
 
 

+ 2 - 2
frameworks/C++/ffead-cpp/install_ffead-cpp-nginx.sh

@@ -3,6 +3,6 @@
 cd $IROOT
 cd $IROOT
 
 
 cp ${IROOT}/ffead-cpp-src/modules/nginx_mod_ffeadcpp/nginx.conf ${IROOT}/nginx-ffead-mongo/conf/
 cp ${IROOT}/ffead-cpp-src/modules/nginx_mod_ffeadcpp/nginx.conf ${IROOT}/nginx-ffead-mongo/conf/
-sed -i 's|FFEAD_PATH|'${IROOT}/ffead-cpp-5.0'|g' ${IROOT}/nginx-ffead-mongo/conf/nginx.conf
+sed -i 's|FFEAD_PATH|'${IROOT}/ffead-cpp-6.0'|g' ${IROOT}/nginx-ffead-mongo/conf/nginx.conf
 cp ${IROOT}/ffead-cpp-src/modules/nginx_mod_ffeadcpp/nginx.conf ${IROOT}/nginx-ffead-sql/conf/
 cp ${IROOT}/ffead-cpp-src/modules/nginx_mod_ffeadcpp/nginx.conf ${IROOT}/nginx-ffead-sql/conf/
-sed -i 's|FFEAD_PATH|'${IROOT}/ffead-cpp-5.0-sql'|g' ${IROOT}/nginx-ffead-sql/conf/nginx.conf
+sed -i 's|FFEAD_PATH|'${IROOT}/ffead-cpp-6.0-sql'|g' ${IROOT}/nginx-ffead-sql/conf/nginx.conf

+ 33 - 0
frameworks/C++/ffead-cpp/install_ffead-cpp-sql-raw-v-picov-profiled.sh

@@ -0,0 +1,33 @@
+#!/bin/bash
+
+export FFEAD_CPP_PATH=${IROOT}/ffead-cpp-6.0-sql
+export LD_LIBRARY_PATH=${IROOT}/:${IROOT}/lib:${FFEAD_CPP_PATH}/lib:/usr/local/lib:$LD_LIBRARY_PATH
+
+cd $IROOT/lang-server-backends/v/pico.v
+
+cp -f ${FFEAD_CPP_PATH}/web/te-benchmark-um-pq/config/cachememory.xml ${FFEAD_CPP_PATH}/web/te-benchmark-um-pq/config/cache.xml
+sed -i 's|EVH_SINGLE=false|EVH_SINGLE=true|g' ${FFEAD_CPP_PATH}/resources/server.prop
+#sed -i 's|LOGGING_ENABLED=false|LOGGING_ENABLED=true|g' ${FFEAD_CPP_PATH}/resources/server.prop
+nohup bash -c "./main --server_dir=$FFEAD_CPP_PATH --server_port=8080 > ffead.log &"
+sleep 10
+echo "ffead-cpp-v-picov with sql-raw support launched"
+wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \
+	-H 'Connection: keep-alive' --latency -d 5 -c 256 --timeout 8 -t 2 "http://localhost:8080/plaintext"
+wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \
+	-H 'Connection: keep-alive' --latency -d 5 -c 256 --timeout 8 -t 2 "http://localhost:8080/te-benchmark-um-pq/json"
+wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \
+	-H 'Connection: keep-alive' --latency -d 5 -c 256 --timeout 8 -t 2 "http://localhost:8080/te-benchmark-um-pq/fortunes"
+wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \
+	-H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/te-benchmark-um-pq/db"
+wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \
+	-H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/te-benchmark-um-pq/queries?queries=20"
+wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \
+	-H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/te-benchmark-um-pq/updates?queries=20"
+wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \
+	-H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/te-benchmark-um-pq/cached-worlds?count=20"
+echo "normal shutdown"
+pkill main
+
+cd /
+
+exit 0

+ 6 - 6
frameworks/C++/ffead-cpp/run_ffead.sh

@@ -7,10 +7,10 @@ rm -f /usr/local/lib/libdinter.so
 
 
 export FFEAD_CPP_PATH=${IROOT}/$1
 export FFEAD_CPP_PATH=${IROOT}/$1
 
 
-ln -s ${FFEAD_CPP_PATH}/lib/libte_benchmark_um.so /usr/local/lib/libte_benchmark_um.so
-ln -s ${FFEAD_CPP_PATH}/lib/libte_benchmark_um_pq.so /usr/local/lib/libte_benchmark_um_pq.so
-ln -s ${FFEAD_CPP_PATH}/lib/libte_benchmark_um_mgr.so /usr/local/lib/libte_benchmark_um_mgr.so
-ln -s ${FFEAD_CPP_PATH}/lib/libte_benchmark_um_pq_async.so /usr/local/lib/libte_benchmark_um_pq_async.so
+ln -s ${FFEAD_CPP_PATH}/lib/libte-benchmark-um.so /usr/local/lib/libte-benchmark-um.so
+ln -s ${FFEAD_CPP_PATH}/lib/libte-benchmark-um-pq.so /usr/local/lib/libte-benchmark-um-pq.so
+ln -s ${FFEAD_CPP_PATH}/lib/libte-benchmark-um-mgr.so /usr/local/lib/libte-benchmark-um-mgr.so
+ln -s ${FFEAD_CPP_PATH}/lib/libte-benchmark-um-pq-async.so /usr/local/lib/libte-benchmark-um-pq-async.so
 ln -s ${FFEAD_CPP_PATH}/lib/libffead-modules.so /usr/local/lib/libffead-modules.so
 ln -s ${FFEAD_CPP_PATH}/lib/libffead-modules.so /usr/local/lib/libffead-modules.so
 ln -s ${FFEAD_CPP_PATH}/lib/libffead-framework.so /usr/local/lib/libffead-framework.so
 ln -s ${FFEAD_CPP_PATH}/lib/libffead-framework.so /usr/local/lib/libffead-framework.so
 ln -s ${FFEAD_CPP_PATH}/lib/libinter.so /usr/local/lib/libinter.so
 ln -s ${FFEAD_CPP_PATH}/lib/libinter.so /usr/local/lib/libinter.so
@@ -120,8 +120,8 @@ elif [ "$2" = "apache" ]
 then
 then
 	if [ "$3" = "mysql" ] || [ "$3" = "postgresql" ]
 	if [ "$3" = "mysql" ] || [ "$3" = "postgresql" ]
 	then
 	then
-		sed -i 's|/installs/ffead-cpp-5.0|'/installs/ffead-cpp-5.0-sql'|g' /etc/apache2/apache2.conf
-		sed -i 's|/installs/ffead-cpp-5.0|'/installs/ffead-cpp-5.0-sql'|g' /etc/apache2/sites-enabled/000-default.conf /etc/apache2/sites-enabled/ffead-site.conf
+		sed -i 's|/installs/ffead-cpp-6.0|'/installs/ffead-cpp-6.0-sql'|g' /etc/apache2/apache2.conf
+		sed -i 's|/installs/ffead-cpp-6.0|'/installs/ffead-cpp-6.0-sql'|g' /etc/apache2/sites-enabled/000-default.conf /etc/apache2/sites-enabled/ffead-site.conf
 	fi
 	fi
 	sed -i 's|<pool-size>30</pool-size>|<pool-size>3</pool-size>|g' web/te-benchmark-um/config/sdorm.xml
 	sed -i 's|<pool-size>30</pool-size>|<pool-size>3</pool-size>|g' web/te-benchmark-um/config/sdorm.xml
 	sed -i 's|<pool-size>10</pool-size>|<pool-size>2</pool-size>|g' web/te-benchmark-um/config/cache.xml
 	sed -i 's|<pool-size>10</pool-size>|<pool-size>2</pool-size>|g' web/te-benchmark-um/config/cache.xml

+ 3 - 3
frameworks/C++/ffead-cpp/sql-async-profiled-install-clang-dbg.sh

@@ -4,7 +4,7 @@ rm -rf build
 mkdir build
 mkdir build
 cd build
 cd build
 CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -DSRV_EMB=on -DMOD_REDIS=on -DDEBUG=on ..
 CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -DSRV_EMB=on -DMOD_REDIS=on -DDEBUG=on ..
-make install && mv $IROOT/ffead-cpp-src/ffead-cpp-5.0-bin $IROOT/ffead-cpp-sql-raw
+make install && mv $IROOT/ffead-cpp-src/ffead-cpp-6.0-bin $IROOT/ffead-cpp-sql-raw
 
 
 #Start postgresql
 #Start postgresql
 service postgresql stop
 service postgresql stop
@@ -16,6 +16,6 @@ sed -i 's|cmake |CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake |g' $IROOT/ffead-c
 apt update -yqq && apt install -yqq vim gdb net-tools telnet iputils-ping
 apt update -yqq && apt install -yqq vim gdb net-tools telnet iputils-ping
 ./install_ffead-cpp-sql-raw-profiled.sh async
 ./install_ffead-cpp-sql-raw-profiled.sh async
 
 
-#mv $IROOT/ffead-cpp-sql-raw $IROOT/ffead-cpp-5.0-sql
-#sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-5.0-sql/web/te-benchmark-um-pq-async/config/sdorm.xml
+#mv $IROOT/ffead-cpp-sql-raw $IROOT/ffead-cpp-6.0-sql
+#sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-6.0-sql/web/te-benchmark-um-pq-async/config/sdorm.xml
 
 

+ 4 - 4
frameworks/C++/ffead-cpp/sql-async-profiled-install-clang.sh

@@ -4,7 +4,7 @@ rm -rf build
 mkdir build
 mkdir build
 cd build
 cd build
 CC=/usr/bin/clang CXX=/usr/bin/clang++ CXXFLAGS="-march=native -flto -fprofile-instr-generate=/tmp/cprof.prof" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
 CC=/usr/bin/clang CXX=/usr/bin/clang++ CXXFLAGS="-march=native -flto -fprofile-instr-generate=/tmp/cprof.prof" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
-make install && mv $IROOT/ffead-cpp-src/ffead-cpp-5.0-bin $IROOT/ffead-cpp-sql-raw
+make install && mv $IROOT/ffead-cpp-src/ffead-cpp-6.0-bin $IROOT/ffead-cpp-sql-raw
 
 
 #Start postgresql
 #Start postgresql
 service postgresql stop
 service postgresql stop
@@ -24,7 +24,7 @@ llvm-profdata-10 merge -output=/tmp/cprof.pgo  /tmp/cprof.prof
 #llvm-profdata-10 merge -output=/tmp/cprofdi.pgo  /tmp/cprofdi.prof
 #llvm-profdata-10 merge -output=/tmp/cprofdi.pgo  /tmp/cprofdi.prof
 ls -ltr /tmp/cprof*
 ls -ltr /tmp/cprof*
 CC=/usr/bin/clang CXX=/usr/bin/clang++ CXXFLAGS="-march=native -flto -fprofile-instr-use=/tmp/cprof.pgo" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
 CC=/usr/bin/clang CXX=/usr/bin/clang++ CXXFLAGS="-march=native -flto -fprofile-instr-use=/tmp/cprof.pgo" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
-make install && mv $IROOT/ffead-cpp-src/ffead-cpp-5.0-bin $IROOT/ffead-cpp-sql-raw
+make install && mv $IROOT/ffead-cpp-src/ffead-cpp-6.0-bin $IROOT/ffead-cpp-sql-raw
 
 
 #Start postgresql
 #Start postgresql
 service postgresql stop
 service postgresql stop
@@ -34,9 +34,9 @@ cd $IROOT/
 sed -i 's|cmake |CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake |g' $IROOT/ffead-cpp-sql-raw/resources/rundyn-automake.sh
 sed -i 's|cmake |CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake |g' $IROOT/ffead-cpp-sql-raw/resources/rundyn-automake.sh
 #sed -i 's|-fprofile-instr-use=/tmp/cprof.pgo|-fprofile-instr-use=/tmp/cprofdi.pgo|g' $IROOT/ffead-cpp-sql-raw/rtdcf/CMakeLists.txt.template
 #sed -i 's|-fprofile-instr-use=/tmp/cprof.pgo|-fprofile-instr-use=/tmp/cprofdi.pgo|g' $IROOT/ffead-cpp-sql-raw/rtdcf/CMakeLists.txt.template
 ./install_ffead-cpp-sql-raw-profiled.sh async
 ./install_ffead-cpp-sql-raw-profiled.sh async
-mv $IROOT/ffead-cpp-sql-raw $IROOT/ffead-cpp-5.0-sql
+mv $IROOT/ffead-cpp-sql-raw $IROOT/ffead-cpp-6.0-sql
 
 
-sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-5.0-sql/web/te-benchmark-um-pq-async/config/sdorm.xml
+sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-6.0-sql/web/te-benchmark-um-pq-async/config/sdorm.xml
 
 
 apt remove -yqq postgresql-13 postgresql-contrib-13 gnupg lsb-release
 apt remove -yqq postgresql-13 postgresql-contrib-13 gnupg lsb-release
 apt autoremove -yqq
 apt autoremove -yqq

+ 4 - 4
frameworks/C++/ffead-cpp/sql-async-profiled-install.sh

@@ -4,7 +4,7 @@ rm -rf build
 mkdir build
 mkdir build
 cd build
 cd build
 CXXFLAGS="-march=native -flto -fprofile-dir=/tmp/profile-data -fprofile-generate" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
 CXXFLAGS="-march=native -flto -fprofile-dir=/tmp/profile-data -fprofile-generate" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
-make install && mv $IROOT/ffead-cpp-src/ffead-cpp-5.0-bin $IROOT/ffead-cpp-sql-raw
+make install && mv $IROOT/ffead-cpp-src/ffead-cpp-6.0-bin $IROOT/ffead-cpp-sql-raw
 
 
 #Start postgresql
 #Start postgresql
 service postgresql stop
 service postgresql stop
@@ -20,7 +20,7 @@ rm -rf build
 mkdir build
 mkdir build
 cd build
 cd build
 CXXFLAGS="-march=native -flto -fprofile-dir=/tmp/profile-data -fprofile-use=/tmp/profile-data -fprofile-correction" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
 CXXFLAGS="-march=native -flto -fprofile-dir=/tmp/profile-data -fprofile-use=/tmp/profile-data -fprofile-correction" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
-make install && mv $IROOT/ffead-cpp-src/ffead-cpp-5.0-bin $IROOT/ffead-cpp-sql-raw
+make install && mv $IROOT/ffead-cpp-src/ffead-cpp-6.0-bin $IROOT/ffead-cpp-sql-raw
 
 
 #Start postgresql
 #Start postgresql
 service postgresql stop
 service postgresql stop
@@ -29,9 +29,9 @@ service postgresql stop
 cd $IROOT/
 cd $IROOT/
 #sed -i 's|cmake |CXXFLAGS="-march=native -fprofile-dir=/tmp/profile-data -fprofile-use -fprofile-correction" cmake |g' $IROOT/ffead-cpp-sql-raw/resources/rundyn-automake.sh
 #sed -i 's|cmake |CXXFLAGS="-march=native -fprofile-dir=/tmp/profile-data -fprofile-use -fprofile-correction" cmake |g' $IROOT/ffead-cpp-sql-raw/resources/rundyn-automake.sh
 ./install_ffead-cpp-sql-raw-profiled.sh async
 ./install_ffead-cpp-sql-raw-profiled.sh async
-mv $IROOT/ffead-cpp-sql-raw $IROOT/ffead-cpp-5.0-sql
+mv $IROOT/ffead-cpp-sql-raw $IROOT/ffead-cpp-6.0-sql
 
 
-sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-5.0-sql/web/te-benchmark-um-pq-async/config/sdorm.xml
+sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-6.0-sql/web/te-benchmark-um-pq-async/config/sdorm.xml
 
 
 apt remove -yqq postgresql-13 postgresql-contrib-13 gnupg lsb-release
 apt remove -yqq postgresql-13 postgresql-contrib-13 gnupg lsb-release
 apt autoremove -yqq
 apt autoremove -yqq

+ 4 - 4
frameworks/C++/ffead-cpp/sql-profiled-install-clang.sh

@@ -4,7 +4,7 @@ rm -rf build
 mkdir build
 mkdir build
 cd build
 cd build
 CC=/usr/bin/clang CXX=/usr/bin/clang++ CXXFLAGS="-march=native -flto -fprofile-instr-generate=/tmp/cprof.prof" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
 CC=/usr/bin/clang CXX=/usr/bin/clang++ CXXFLAGS="-march=native -flto -fprofile-instr-generate=/tmp/cprof.prof" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
-make install && mv $IROOT/ffead-cpp-src/ffead-cpp-5.0-bin $IROOT/ffead-cpp-sql-raw
+make install && mv $IROOT/ffead-cpp-src/ffead-cpp-6.0-bin $IROOT/ffead-cpp-sql-raw
 
 
 #Start postgresql
 #Start postgresql
 service postgresql stop
 service postgresql stop
@@ -24,7 +24,7 @@ llvm-profdata-10 merge -output=/tmp/cprof.pgo  /tmp/cprof.prof
 #llvm-profdata-10 merge -output=/tmp/cprofdi.pgo  /tmp/cprofdi.prof
 #llvm-profdata-10 merge -output=/tmp/cprofdi.pgo  /tmp/cprofdi.prof
 ls -ltr /tmp/cprof*
 ls -ltr /tmp/cprof*
 CC=/usr/bin/clang CXX=/usr/bin/clang++ CXXFLAGS="-march=native -flto -fprofile-instr-use=/tmp/cprof.pgo" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
 CC=/usr/bin/clang CXX=/usr/bin/clang++ CXXFLAGS="-march=native -flto -fprofile-instr-use=/tmp/cprof.pgo" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
-make install && mv $IROOT/ffead-cpp-src/ffead-cpp-5.0-bin $IROOT/ffead-cpp-sql-raw
+make install && mv $IROOT/ffead-cpp-src/ffead-cpp-6.0-bin $IROOT/ffead-cpp-sql-raw
 
 
 #Start postgresql
 #Start postgresql
 service postgresql stop
 service postgresql stop
@@ -34,9 +34,9 @@ cd $IROOT/
 sed -i 's|cmake |CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake |g' $IROOT/ffead-cpp-sql-raw/resources/rundyn-automake.sh
 sed -i 's|cmake |CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake |g' $IROOT/ffead-cpp-sql-raw/resources/rundyn-automake.sh
 #sed -i 's|-fprofile-instr-use=/tmp/cprof.pgo|-fprofile-instr-use=/tmp/cprofdi.pgo|g' $IROOT/ffead-cpp-sql-raw/rtdcf/CMakeLists.txt.template
 #sed -i 's|-fprofile-instr-use=/tmp/cprof.pgo|-fprofile-instr-use=/tmp/cprofdi.pgo|g' $IROOT/ffead-cpp-sql-raw/rtdcf/CMakeLists.txt.template
 ./install_ffead-cpp-sql-raw-profiled.sh
 ./install_ffead-cpp-sql-raw-profiled.sh
-mv $IROOT/ffead-cpp-sql-raw $IROOT/ffead-cpp-5.0-sql
+mv $IROOT/ffead-cpp-sql-raw $IROOT/ffead-cpp-6.0-sql
 
 
-sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-5.0-sql/web/te-benchmark-um-pq/config/sdorm.xml
+sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-6.0-sql/web/te-benchmark-um-pq/config/sdorm.xml
 
 
 apt remove -yqq postgresql-13 postgresql-contrib-13 gnupg lsb-release
 apt remove -yqq postgresql-13 postgresql-contrib-13 gnupg lsb-release
 apt autoremove -yqq
 apt autoremove -yqq

+ 4 - 4
frameworks/C++/ffead-cpp/sql-profiled-install.sh

@@ -4,7 +4,7 @@ rm -rf build
 mkdir build
 mkdir build
 cd build
 cd build
 CXXFLAGS="-march=native -flto -fprofile-dir=/tmp/profile-data -fprofile-generate" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
 CXXFLAGS="-march=native -flto -fprofile-dir=/tmp/profile-data -fprofile-generate" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
-make install && mv $IROOT/ffead-cpp-src/ffead-cpp-5.0-bin $IROOT/ffead-cpp-sql-raw
+make install && mv $IROOT/ffead-cpp-src/ffead-cpp-6.0-bin $IROOT/ffead-cpp-sql-raw
 
 
 #Start postgresql
 #Start postgresql
 service postgresql stop
 service postgresql stop
@@ -20,7 +20,7 @@ rm -rf build
 mkdir build
 mkdir build
 cd build
 cd build
 CXXFLAGS="-march=native -flto -fprofile-dir=/tmp/profile-data -fprofile-use=/tmp/profile-data -fprofile-correction" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
 CXXFLAGS="-march=native -flto -fprofile-dir=/tmp/profile-data -fprofile-use=/tmp/profile-data -fprofile-correction" cmake -DSRV_EMB=on -DMOD_REDIS=on ..
-make install && mv $IROOT/ffead-cpp-src/ffead-cpp-5.0-bin $IROOT/ffead-cpp-sql-raw
+make install && mv $IROOT/ffead-cpp-src/ffead-cpp-6.0-bin $IROOT/ffead-cpp-sql-raw
 
 
 #Start postgresql
 #Start postgresql
 service postgresql stop
 service postgresql stop
@@ -29,9 +29,9 @@ service postgresql stop
 cd $IROOT/
 cd $IROOT/
 #sed -i 's|cmake |CXXFLAGS="-march=native -fprofile-dir=/tmp/profile-data -fprofile-use -fprofile-correction" cmake |g' $IROOT/ffead-cpp-sql-raw/resources/rundyn-automake.sh
 #sed -i 's|cmake |CXXFLAGS="-march=native -fprofile-dir=/tmp/profile-data -fprofile-use -fprofile-correction" cmake |g' $IROOT/ffead-cpp-sql-raw/resources/rundyn-automake.sh
 ./install_ffead-cpp-sql-raw-profiled.sh
 ./install_ffead-cpp-sql-raw-profiled.sh
-mv $IROOT/ffead-cpp-sql-raw $IROOT/ffead-cpp-5.0-sql
+mv $IROOT/ffead-cpp-sql-raw $IROOT/ffead-cpp-6.0-sql
 
 
-sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-5.0-sql/web/te-benchmark-um-pq/config/sdorm.xml
+sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-6.0-sql/web/te-benchmark-um-pq/config/sdorm.xml
 
 
 apt remove -yqq postgresql-13 postgresql-contrib-13 gnupg lsb-release
 apt remove -yqq postgresql-13 postgresql-contrib-13 gnupg lsb-release
 apt autoremove -yqq
 apt autoremove -yqq

+ 5 - 5
frameworks/C++/ffead-cpp/sql-profiled-util.sh

@@ -1,6 +1,6 @@
 mkdir /tmp/profile-data
 mkdir /tmp/profile-data
 
 
-rm -rf $IROOT/ffead-cpp-5.0-sql
+rm -rf $IROOT/ffead-cpp-6.0-sql
 
 
 if [ "$1" = "batch" ]
 if [ "$1" = "batch" ]
 then
 then
@@ -37,18 +37,18 @@ rm -rf web/te-benchmark-um web/te-benchmark-um-mgr
 
 
 sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/te-benchmark-um)||g' CMakeLists.txt
 sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/te-benchmark-um)||g' CMakeLists.txt
 sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/te-benchmark-um-mgr)||g' CMakeLists.txt
 sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/te-benchmark-um-mgr)||g' CMakeLists.txt
-sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/te-benchmark-um/libte_benchmark_um${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
-sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/te-benchmark-um-mgr/libte_benchmark_um_mgr${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
+sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/te-benchmark-um/libte-benchmark-um${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
+sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/te-benchmark-um-mgr/libte-benchmark-um-mgr${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
 
 
 if [ "$3" = "async" ]
 if [ "$3" = "async" ]
 then
 then
 	sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/te-benchmark-um-pq)||g' CMakeLists.txt
 	sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/te-benchmark-um-pq)||g' CMakeLists.txt
-	sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/te-benchmark-um-pq/libte_benchmark_um_pq${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
+	sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/te-benchmark-um-pq/libte-benchmark-um-pq${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
 	sed -i 's|tfb-database|localhost|g' $IROOT/ffead-cpp-src/web/te-benchmark-um-pq-async/config/sdorm.xml
 	sed -i 's|tfb-database|localhost|g' $IROOT/ffead-cpp-src/web/te-benchmark-um-pq-async/config/sdorm.xml
 	rm -rf web/te-benchmark-um-pq
 	rm -rf web/te-benchmark-um-pq
 else
 else
 	sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/te-benchmark-um-pq-async)||g' CMakeLists.txt
 	sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/te-benchmark-um-pq-async)||g' CMakeLists.txt
-	sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/te-benchmark-um-pq-async/libte_benchmark_um_pq_async${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
+	sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/te-benchmark-um-pq-async/libte-benchmark-um-pq-async${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt
 	sed -i 's|tfb-database|localhost|g' $IROOT/ffead-cpp-src/web/te-benchmark-um-pq/config/sdorm.xml
 	sed -i 's|tfb-database|localhost|g' $IROOT/ffead-cpp-src/web/te-benchmark-um-pq/config/sdorm.xml
 	rm -rf web/te-benchmark-um-pq-async
 	rm -rf web/te-benchmark-um-pq-async
 fi
 fi

+ 30 - 0
frameworks/C++/ffead-cpp/sql-v-picov-profiled-install.sh

@@ -0,0 +1,30 @@
+export FFEAD_CPP_PATH=${IROOT}/ffead-cpp-6.0-sql
+export LD_LIBRARY_PATH=${IROOT}/:${IROOT}/lib:${FFEAD_CPP_PATH}/lib:/usr/local/lib:$LD_LIBRARY_PATH
+
+sed -i 's|tfb-database|localhost|g' $IROOT/ffead-cpp-6.0-sql/web/te-benchmark-um-pq/config/sdorm.xml
+
+cd $IROOT/lang-server-backends/v/pico.v
+v -prod -cflags '-std=gnu11 -Wall -O3 -march=native -mtune=native -no-pie -flto -fprofile-dir=/tmp/profile-data -fprofile-generate -lgcov --coverage' main.v
+
+#Start postgresql
+service postgresql start
+#For profiling/benchmarking
+
+cd $IROOT/
+./install_ffead-cpp-sql-raw-v-picov-profiled.sh
+
+cd $IROOT/lang-server-backends/v/pico.v
+v -prod -cflags '-std=gnu11 -Wall -O3 -march=native -mtune=native -no-pie -flto  -fprofile-dir=/tmp/profile-data -fprofile-use=/tmp/profile-data -fprofile-correction -lgcov --coverage' main.v
+
+cd $IROOT/
+./install_ffead-cpp-sql-raw-v-picov-profiled.sh
+
+mv $IROOT/lang-server-backends/v/pico.v/main $IROOT/
+
+sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-6.0-sql/web/te-benchmark-um-pq/config/sdorm.xml
+
+apt remove -yqq postgresql-13 postgresql-contrib-13 gnupg lsb-release
+apt autoremove -yqq
+rm -rf /ssd/postgresql
+rm -rf /tmp/postgresql
+rm -rf /tmp/wrk /usr/local/bin/wrk

+ 6 - 3
frameworks/C++/ffead-cpp/te-benchmark-um-mgr/CMakeLists.txt

@@ -5,6 +5,9 @@ file(GLOB sources
 )
 )
 
 
 include_directories("${CMAKE_SOURCE_DIR}/web/te-benchmark-um-mgr/include")
 include_directories("${CMAKE_SOURCE_DIR}/web/te-benchmark-um-mgr/include")
-add_library(te_benchmark_um_mgr SHARED ${sources})
-set_property(TARGET te_benchmark_um_mgr PROPERTY POSITION_INDEPENDENT_CODE ON)
-target_link_libraries(te_benchmark_um_mgr ffead-modules ffead-framework ${HAVE_PQLIB} ${HAVE_CURLLIB} ${HAVE_SSLLIB} ${HAVE_MEMCACHEDLIB} ${HAVE_ODBCLIB} ${HAVE_MONGOCLIB} ${HAVE_BSONLIB} ${HAVE_ZLIB} ${HAVE_CRYPTOLIB})
+if(BUILD_STATIC_LIBS OR EMSCRIPTEN)
+	add_library(te-benchmark-um-mgr STATIC ${sources})
+else()
+	add_library(te-benchmark-um-mgr ${sources})
+endif()
+target_link_libraries(te-benchmark-um-mgr ffead-modules ffead-framework ${HAVE_PQLIB} ${HAVE_CURLLIB} ${HAVE_SSLLIB} ${HAVE_MEMCACHEDLIB} ${HAVE_ODBCLIB} ${HAVE_MONGOCLIB} ${HAVE_BSONLIB} ${HAVE_ZLIB} ${HAVE_CRYPTOLIB})

+ 1 - 1
frameworks/C++/ffead-cpp/te-benchmark-um-mgr/config/application.xml

@@ -1,4 +1,4 @@
-<app libname="te_benchmark_um_mgr" router="TeBkUmMgrRouter">
+<app router="TeBkUmMgrRouter">
 	<cors-config>
 	<cors-config>
 		<allow-origins>*</allow-origins>
 		<allow-origins>*</allow-origins>
 		<allow-methods>GET, POST, HEAD, PUT, DELETE</allow-methods>
 		<allow-methods>GET, POST, HEAD, PUT, DELETE</allow-methods>

+ 0 - 13
frameworks/C++/ffead-cpp/te-benchmark-um-mgr/config/cache.xml

@@ -1,13 +0,0 @@
-<caches>
-        <cache>
-                <nodes>
-                        <node>
-                                <username>sumeet</username>
-                                <password>sumeet</password>
-                        </node>
-                </nodes>
-                <init>TeBkUmMgrRouter.updateCache</init>
-                <name>Memory-Cached</name>
-                <type>memory</type>
-        </cache>
-</caches>

+ 6 - 5
frameworks/C++/ffead-cpp/te-benchmark-um-mgr/include/TeBkUmMgr.h

@@ -43,8 +43,6 @@
 #include "yuarel.h"
 #include "yuarel.h"
 #include "Router.h"
 #include "Router.h"
 
 
-typedef void (*TeBkUmMgrTemplatePtr) (Context*, std::string&);
-
 class TeBkUmMgrWorld {
 class TeBkUmMgrWorld {
 	int id;
 	int id;
 	int randomNumber;
 	int randomNumber;
@@ -83,8 +81,11 @@ class TeBkUmMgrRouter : public Router {
 	static std::string WORLD;
 	static std::string WORLD;
 	static std::string FORTUNE;
 	static std::string FORTUNE;
 
 
-	static std::string APP_NAME;
-	static std::string TPE_FN_NAME;
+	static TemplatePtr tmplFunc;
+
+	static Ser m_ser;
+	static Ser w_ser;
+	static SerCont wcont_ser;
 
 
 	bool strToNum(const char* str, int len, int& ret);
 	bool strToNum(const char* str, int len, int& ret);
 
 
@@ -111,7 +112,7 @@ public:
 	TeBkUmMgrRouter();
 	TeBkUmMgrRouter();
 	virtual ~TeBkUmMgrRouter();
 	virtual ~TeBkUmMgrRouter();
 	void updateCache();
 	void updateCache();
-	bool route(HttpRequest* req, HttpResponse* res, void* dlib, void* ddlib, SocketInterface* sif);
+	bool route(HttpRequest* req, HttpResponse* res, SocketInterface* sif);
 };
 };
 
 
 #endif /* WEB_TE_BENCHMARK_UM_INCLUDE_TeBkUmMgr_H_ */
 #endif /* WEB_TE_BENCHMARK_UM_INCLUDE_TeBkUmMgr_H_ */

+ 15 - 0
frameworks/C++/ffead-cpp/te-benchmark-um-mgr/meson.build

@@ -0,0 +1,15 @@
+
+module_includes = ['/usr/local/include','../../src/modules/common','../../src/modules/cache','../../src/modules/cache/memory','../../src/modules/cache/redis',
+	'../../src/modules/cache/memcached','../../src/modules/client-util','../../src/modules/http','../../src/modules/http/http11','../../src/modules/http/http20',
+	'../../src/modules/ioc','../../src/modules/jobs','../../src/modules/reflection','../../src/modules/sdorm','../../src/modules/sdorm/sql','../../src/modules/sdorm/sql/libpq',
+	'../../src/modules/client-util/ssl','../../src/modules/sdorm/mongo','../../src/modules/sdorm/mongo/raw','../../src/modules/search','../../src/modules/serialization',
+	'../../src/modules/serialization/xml','../../src/modules/serialization/json','../../src/modules/server-util','../../src/modules/ssl','../../src/modules/threads',
+	'../../src/framework','include']
+module_includes += global_includes
+module_libs = [global_libs, libbson, libmongoc]
+
+c = run_command(meson_grabber, 'src/')
+module_sources = c.stdout().strip().split('\n')
+
+shared_library('te-benchmark-um-mgr', module_sources, include_directories: module_includes, dependencies: module_libs, link_with: [libffeadmodules, libffeadframework],
+	install: true, install_dir: bin_dir+'/lib')

+ 18 - 62
frameworks/C++/ffead-cpp/te-benchmark-um-mgr/src/TeBkUmMgr.cpp

@@ -333,106 +333,60 @@ bool TeBkUmMgrRouter::strToNum(const char* str, int len, int& ret) {
     return true;
     return true;
 }
 }
 
 
-bool TeBkUmMgrRouter::route(HttpRequest* req, HttpResponse* res, void* dlib, void* ddlib, SocketInterface* sif) {
-	//Timer t;
-	//t.start();
+bool TeBkUmMgrRouter::route(HttpRequest* req, HttpResponse* res, SocketInterface* sif) {
 	std::string_view path = req->getPath();
 	std::string_view path = req->getPath();
 	if(StringUtil::endsWith(path, "/plaintext")) {
 	if(StringUtil::endsWith(path, "/plaintext")) {
-		//t.end();
-		//CommonUtils::tsContRstLkp += t.timerNanoSeconds();
-		//t.start();
 		res->setContent(HELLO_WORLD);
 		res->setContent(HELLO_WORLD);
 		res->setContentType(ContentTypes::CONTENT_TYPE_TEXT_PLAIN);
 		res->setContentType(ContentTypes::CONTENT_TYPE_TEXT_PLAIN);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-		//t.end();
-		//CommonUtils::tsContRstSer += t.timerNanoSeconds();
 	} else if(StringUtil::endsWith(path, "/json")) {
 	} else if(StringUtil::endsWith(path, "/json")) {
-		//t.end();
-		//CommonUtils::tsContRstLkp += t.timerNanoSeconds();
-		//t.start();
 		TeBkUmMgrMessage msg;
 		TeBkUmMgrMessage msg;
 		msg.setMessage(HELLO_WORLD);
 		msg.setMessage(HELLO_WORLD);
-		JSONSerialize::serializeUnknown(&msg, 0, "TeBkUmMgrMessage", res->getContentP());
+		JSONSerialize::serializeObject(&msg, m_ser, res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-		//t.end();
-		//CommonUtils::tsContRstSer += t.timerNanoSeconds();
 	} else if(StringUtil::endsWith(path, "/db")) {
 	} else if(StringUtil::endsWith(path, "/db")) {
-		//t.end();
-		//CommonUtils::tsContRstLkp += t.timerNanoSeconds();
-		//t.start();
 		TeBkUmMgrWorld msg;
 		TeBkUmMgrWorld msg;
 		db(msg);
 		db(msg);
-		//t.end();
-		//CommonUtils::tsContExec += t.timerNanoSeconds();
-		//t.start();
-		JSONSerialize::serializeUnknown(&msg, 0, "TeBkUmMgrWorld", res->getContentP());
+		JSONSerialize::serializeObject(&msg, w_ser, res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-		//t.end();
-		//CommonUtils::tsContRstSer += t.timerNanoSeconds();
 	} else if(StringUtil::endsWith(path, "/queries")) {
 	} else if(StringUtil::endsWith(path, "/queries")) {
-		//t.end();
-		//CommonUtils::tsContRstLkp += t.timerNanoSeconds();
-		//t.start();
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		std::vector<TeBkUmMgrWorld> msg;
 		std::vector<TeBkUmMgrWorld> msg;
 		queries(params[0].val, params[0].val_len, msg);
 		queries(params[0].val, params[0].val_len, msg);
-		//t.end();
-		//CommonUtils::tsContExec += t.timerNanoSeconds();
-		//t.start();
-		JSONSerialize::serializeUnknown(&msg, 100, "std::vector<TeBkUmMgrWorld>", res->getContentP());
+		JSONSerialize::serializeObjectCont(&msg, wcont_ser, "vector", res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-		//t.end();
-		//CommonUtils::tsContRstSer += t.timerNanoSeconds();
 	} else if(StringUtil::endsWith(path, "/fortunes")) {
 	} else if(StringUtil::endsWith(path, "/fortunes")) {
 		Context ctx;
 		Context ctx;
 		getContext(req, &ctx);
 		getContext(req, &ctx);
 
 
-		void* mkr = dlsym(ddlib, TPE_FN_NAME.c_str());
-		if(mkr!=NULL)
+		if(tmplFunc!=NULL)
 		{
 		{
-			TeBkUmMgrTemplatePtr f =  (TeBkUmMgrTemplatePtr)mkr;
-			std::string msg;
-			f(&ctx, msg);
-			res->setContent(msg);
+			fcpstream str;
+			tmplFunc(&ctx, str);
+			res->setContent(str.str());
 			res->setContentType(ContentTypes::CONTENT_TYPE_TEXT_SHTML);
 			res->setContentType(ContentTypes::CONTENT_TYPE_TEXT_SHTML);
 			res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 			res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		}
 		}
 	} else if(StringUtil::endsWith(path, "/updates")) {
 	} else if(StringUtil::endsWith(path, "/updates")) {
-		//t.end();
-		//CommonUtils::tsContRstLkp += t.timerNanoSeconds();
-		//t.start();
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		std::vector<TeBkUmMgrWorld> msg;
 		std::vector<TeBkUmMgrWorld> msg;
 		updates(params[0].val, params[0].val_len, msg);
 		updates(params[0].val, params[0].val_len, msg);
-		//t.end();
-		//CommonUtils::tsContExec += t.timerNanoSeconds();
-		//t.start();
-		JSONSerialize::serializeUnknown(&msg, 100, "std::vector<TeBkUmMgrWorld>", res->getContentP());
+		JSONSerialize::serializeObjectCont(&msg, wcont_ser, "vector", res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-		//t.end();
-		//CommonUtils::tsContRstSer += t.timerNanoSeconds();
 	} else if(StringUtil::endsWith(path, "/cached-worlds")) {
 	} else if(StringUtil::endsWith(path, "/cached-worlds")) {
-		//t.end();
-		//CommonUtils::tsContRstLkp += t.timerNanoSeconds();
-		//t.start();
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		std::vector<TeBkUmMgrWorld> msg;
 		std::vector<TeBkUmMgrWorld> msg;
 		cachedWorlds(params[0].val, params[0].val_len, msg);
 		cachedWorlds(params[0].val, params[0].val_len, msg);
-		//t.end();
-		//CommonUtils::tsContExec += t.timerNanoSeconds();
-		//t.start();
-		JSONSerialize::serializeUnknown(&msg, 100, "std::vector<TeBkUmMgrWorld>", res->getContentP());
+		JSONSerialize::serializeObjectCont(&msg, wcont_ser, "vector", res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-		//t.end();
-		//CommonUtils::tsContRstSer += t.timerNanoSeconds();
 	} else {
 	} else {
 		res->setHTTPResponseStatus(HTTPResponseStatus::NotFound);
 		res->setHTTPResponseStatus(HTTPResponseStatus::NotFound);
 	}
 	}
@@ -440,17 +394,19 @@ bool TeBkUmMgrRouter::route(HttpRequest* req, HttpResponse* res, void* dlib, voi
 	return true;
 	return true;
 }
 }
 
 
-std::string TeBkUmMgrRouter::APP_NAME = "";
-std::string TeBkUmMgrRouter::TPE_FN_NAME = "";
+TemplatePtr TeBkUmMgrRouter::tmplFunc;
+Ser TeBkUmMgrRouter::m_ser;
+Ser TeBkUmMgrRouter::w_ser;
+SerCont TeBkUmMgrRouter::wcont_ser;
 
 
 TeBkUmMgrRouter::TeBkUmMgrRouter() {
 TeBkUmMgrRouter::TeBkUmMgrRouter() {
 #ifdef INC_SDORM_MONGO
 #ifdef INC_SDORM_MONGO
 	sqli = NULL;
 	sqli = NULL;
 #endif
 #endif
-	if(APP_NAME=="") {
-		APP_NAME = CommonUtils::normalizeAppName("te-benchmark-um-mgr");
-		TPE_FN_NAME = CommonUtils::getTpeFnName("tpe/fortunes.tpe", "te-benchmark-um-mgr");
-	}
+	tmplFunc = TemplateUtil::getTemplateFunc("te-benchmark-um-mgr", "tpe/fortunes.tpe");
+	m_ser = Serializer::getSerFuncForObject("te-benchmark-um-mgr", "TeBkUmMgrMessage");
+	w_ser = Serializer::getSerFuncForObject("te-benchmark-um-mgr", "TeBkUmMgrWorld");
+	wcont_ser = Serializer::getSerFuncForObjectCont("te-benchmark-um-mgr", "TeBkUmMgrWorld", "std::vector");
 }
 }
 
 
 TeBkUmMgrRouter::~TeBkUmMgrRouter() {
 TeBkUmMgrRouter::~TeBkUmMgrRouter() {

+ 1 - 1
frameworks/C++/ffead-cpp/te-benchmark-um-mgr/src/autotools/Makefile.am

@@ -8,7 +8,7 @@ distdir=${PACKAGE_NAME}-${PACKAGE_VERSION}-src
 fprefix=../../../../${packageIdentifier}
 fprefix=../../../../${packageIdentifier}
 prefix=${abs_builddir}
 prefix=${abs_builddir}
 
 
-lib_LTLIBRARIES = libte_benchmark_um_mgr.la
+lib_LTLIBRARIES = libte-benchmark-um-mgr.la
 libte_benchmark_um_mgr_la_SOURCES = ../TeBkUmMgr.cpp
 libte_benchmark_um_mgr_la_SOURCES = ../TeBkUmMgr.cpp
 
 
 libte_benchmark_um_mgr_la_LDFLAGS = -no-undefined 
 libte_benchmark_um_mgr_la_LDFLAGS = -no-undefined 

+ 1 - 1
frameworks/C++/ffead-cpp/te-benchmark-um-mgr/tpe/fortunes.tpe

@@ -6,7 +6,7 @@
 <table>
 <table>
 <tr><th>id</th><th>message</th></tr>
 <tr><th>id</th><th>message</th></tr>
 #for(int i=0;i<(int)fortunes.size();i++)#
 #for(int i=0;i<(int)fortunes.size();i++)#
-<tr><td>$_S{fortunes.at(i).getId()}</td><td>${fortunes.at(i).getMessage()}</td></tr>
+<tr><td>${fortunes.at(i).getId()}</td><td>${fortunes.at(i).getMessage()}</td></tr>
 #rof#
 #rof#
 </table>
 </table>
 </body>
 </body>

+ 12 - 0
frameworks/C++/ffead-cpp/te-benchmark-um-mgr/xmake.lua

@@ -0,0 +1,12 @@
+add_includedirs("include/")
+
+local bindir = "$(projectdir)/ffead-cpp-6.0-bin"
+
+target("te-benchmark-um-mgr")
+	set_languages("c++17")
+	add_deps("ffead-framework")
+	add_options(getOptions())
+	set_kind("shared")
+	on_load(setIncludes)
+	add_files("src/*.cpp")
+	set_installdir(bindir)

+ 7 - 3
frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/CMakeLists.txt

@@ -5,6 +5,10 @@ file(GLOB sources
 )
 )
 
 
 include_directories("${CMAKE_SOURCE_DIR}/web/te-benchmark-um-pq-async/include")
 include_directories("${CMAKE_SOURCE_DIR}/web/te-benchmark-um-pq-async/include")
-add_library(te_benchmark_um_pq_async SHARED ${sources})
-set_property(TARGET te_benchmark_um_pq_async PROPERTY POSITION_INDEPENDENT_CODE ON)
-target_link_libraries(te_benchmark_um_pq_async ffead-modules ffead-framework ${HAVE_PQLIB} ${HAVE_CURLLIB} ${HAVE_SSLLIB} ${HAVE_MEMCACHEDLIB} ${HAVE_ODBCLIB} ${HAVE_MONGOCLIB} ${HAVE_BSONLIB} ${HAVE_ZLIB} ${HAVE_CRYPTOLIB})
+if(BUILD_STATIC_LIBS OR EMSCRIPTEN)
+	add_library(te-benchmark-um-pq-async STATIC ${sources})
+else()
+	add_library(te-benchmark-um-pq-async ${sources})
+endif()
+set_property(TARGET te-benchmark-um-pq-async PROPERTY POSITION_INDEPENDENT_CODE ON)
+target_link_libraries(te-benchmark-um-pq-async ffead-modules ffead-framework ${HAVE_PQLIB} ${HAVE_CURLLIB} ${HAVE_SSLLIB} ${HAVE_MEMCACHEDLIB} ${HAVE_ODBCLIB} ${HAVE_MONGOCLIB} ${HAVE_BSONLIB} ${HAVE_ZLIB} ${HAVE_CRYPTOLIB})

+ 1 - 1
frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/config/application.xml

@@ -1,4 +1,4 @@
-<app libname="te_benchmark_um_pq_async" router="TeBkUmLpqAsyncRouter">
+<app router="TeBkUmLpqAsyncRouter">
 	<cors-config>
 	<cors-config>
 		<allow-origins>*</allow-origins>
 		<allow-origins>*</allow-origins>
 		<allow-methods>GET, POST, HEAD, PUT, DELETE</allow-methods>
 		<allow-methods>GET, POST, HEAD, PUT, DELETE</allow-methods>

+ 23 - 12
frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/include/TeBkUmLpqAsync.h

@@ -43,13 +43,13 @@
 #include "yuarel.h"
 #include "yuarel.h"
 #include "Router.h"
 #include "Router.h"
 
 
-typedef void (*TeBkUmLpqAsyncTemplatePtr) (Context*, std::string&);
-
 class TeBkUmLpqAsyncWorld {
 class TeBkUmLpqAsyncWorld {
 	int id;
 	int id;
 	int randomNumber;
 	int randomNumber;
 public:
 public:
 	TeBkUmLpqAsyncWorld();
 	TeBkUmLpqAsyncWorld();
+	TeBkUmLpqAsyncWorld(int id);
+	TeBkUmLpqAsyncWorld(int id, int randomNumber);
 	virtual ~TeBkUmLpqAsyncWorld();
 	virtual ~TeBkUmLpqAsyncWorld();
 	int getId() const;
 	int getId() const;
 	void setId(int id);
 	void setId(int id);
@@ -59,36 +59,44 @@ public:
 
 
 class TeBkUmLpqAsyncFortune {
 class TeBkUmLpqAsyncFortune {
 	int id;
 	int id;
-	std::string message;
 public:
 public:
+	std::string message_i;
+	std::string_view message;
+	bool allocd;
+	TeBkUmLpqAsyncFortune(int id);
+	TeBkUmLpqAsyncFortune(int id, std::string message);
 	TeBkUmLpqAsyncFortune();
 	TeBkUmLpqAsyncFortune();
 	virtual ~TeBkUmLpqAsyncFortune();
 	virtual ~TeBkUmLpqAsyncFortune();
 	int getId() const;
 	int getId() const;
 	void setId(int id);
 	void setId(int id);
-	const std::string& getMessage() const;
-	void setMessage(const std::string& message);
 	bool operator < (const TeBkUmLpqAsyncFortune& other) const;
 	bool operator < (const TeBkUmLpqAsyncFortune& other) const;
 };
 };
 
 
 class TeBkUmLpqAsyncMessage {
 class TeBkUmLpqAsyncMessage {
 	std::string message;
 	std::string message;
 public:
 public:
+	TeBkUmLpqAsyncMessage();
+	TeBkUmLpqAsyncMessage(std::string message);
 	virtual ~TeBkUmLpqAsyncMessage();
 	virtual ~TeBkUmLpqAsyncMessage();
 	const std::string& getMessage() const;
 	const std::string& getMessage() const;
 	void setMessage(const std::string& message);
 	void setMessage(const std::string& message);
 };
 };
 
 
 struct AsyncReq {
 struct AsyncReq {
-	HttpResponse r;
+	float httpVers;
+	bool conn_clos;
 	SocketInterface* sif;
 	SocketInterface* sif;
-	void* d;
-	void* ddlib;
 	LibpqDataSourceImpl* sqli;
 	LibpqDataSourceImpl* sqli;
+
+	TeBkUmLpqAsyncWorld w;
+	std::vector<TeBkUmLpqAsyncWorld> vec;
+	std::list<TeBkUmLpqAsyncFortune> flst;
 };
 };
 
 
 struct CacheReq {
 struct CacheReq {
-	void* d;
 	CacheInterface* cchi;
 	CacheInterface* cchi;
+
+	std::vector<TeBkUmLpqAsyncWorld> vec;
 };
 };
 
 
 class TeBkUmLpqAsyncRouter : public Router {
 class TeBkUmLpqAsyncRouter : public Router {
@@ -98,8 +106,11 @@ class TeBkUmLpqAsyncRouter : public Router {
 	static std::string WORLD_ALL_QUERY;
 	static std::string WORLD_ALL_QUERY;
 	static std::string FORTUNE_ALL_QUERY;
 	static std::string FORTUNE_ALL_QUERY;
 
 
-	static std::string APP_NAME;
-	static std::string TPE_FN_NAME;
+	static TemplatePtr tmplFunc;
+
+	static Ser m_ser;
+	static Ser w_ser;
+	static SerCont wcont_ser;
 
 
 	static bool strToNum(const char* str, int len, int& ret);
 	static bool strToNum(const char* str, int len, int& ret);
 
 
@@ -148,7 +159,7 @@ public:
 	TeBkUmLpqAsyncRouter();
 	TeBkUmLpqAsyncRouter();
 	virtual ~TeBkUmLpqAsyncRouter();
 	virtual ~TeBkUmLpqAsyncRouter();
 	void updateCache();
 	void updateCache();
-	bool route(HttpRequest* req, HttpResponse* res, void* dlib, void* ddlib, SocketInterface* sif);
+	bool route(HttpRequest* req, HttpResponse* res, SocketInterface* sif);
 };
 };
 
 
 #endif /* WEB_TE_BENCHMARK_UM_INCLUDE_TeBkUmLpqAsync_H_ */
 #endif /* WEB_TE_BENCHMARK_UM_INCLUDE_TeBkUmLpqAsync_H_ */

+ 15 - 0
frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/meson.build

@@ -0,0 +1,15 @@
+
+module_includes = ['/usr/local/include','../../src/modules/common','../../src/modules/cache','../../src/modules/cache/memory','../../src/modules/cache/redis',
+	'../../src/modules/cache/memcached','../../src/modules/client-util','../../src/modules/http','../../src/modules/http/http11','../../src/modules/http/http20',
+	'../../src/modules/ioc','../../src/modules/jobs','../../src/modules/reflection','../../src/modules/sdorm','../../src/modules/sdorm/sql','../../src/modules/sdorm/sql/libpq',
+	'../../src/modules/client-util/ssl','../../src/modules/sdorm/mongo','../../src/modules/sdorm/mongo/raw','../../src/modules/search','../../src/modules/serialization',
+	'../../src/modules/serialization/xml','../../src/modules/serialization/json','../../src/modules/server-util','../../src/modules/ssl','../../src/modules/threads',
+	'../../src/framework','include']
+module_includes += global_includes
+module_libs = [global_libs]
+
+c = run_command(meson_grabber, 'src/')
+module_sources = c.stdout().strip().split('\n')
+
+shared_library('te-benchmark-um-pq-async', module_sources, include_directories: module_includes, dependencies: module_libs, link_with: [libffeadmodules, libffeadframework],
+	install: true, install_dir: bin_dir+'/lib')

+ 156 - 169
frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/src/TeBkUmLpqAsync.cpp

@@ -37,6 +37,16 @@ void TeBkUmLpqAsyncWorld::setRandomNumber(int randomNumber) {
 	this->randomNumber = randomNumber;
 	this->randomNumber = randomNumber;
 }
 }
 
 
+TeBkUmLpqAsyncWorld::TeBkUmLpqAsyncWorld(int id, int randomNumber) {
+	this->id = id;
+	this->randomNumber = randomNumber;
+}
+
+TeBkUmLpqAsyncWorld::TeBkUmLpqAsyncWorld(int id) {
+	this->id = id;
+	randomNumber = 0;
+}
+
 TeBkUmLpqAsyncWorld::TeBkUmLpqAsyncWorld() {
 TeBkUmLpqAsyncWorld::TeBkUmLpqAsyncWorld() {
 	id = 0;
 	id = 0;
 	randomNumber = 0;
 	randomNumber = 0;
@@ -53,25 +63,40 @@ void TeBkUmLpqAsyncFortune::setId(int id) {
 	this->id = id;
 	this->id = id;
 }
 }
 
 
-const std::string& TeBkUmLpqAsyncFortune::getMessage() const {
-	return message;
+TeBkUmLpqAsyncFortune::TeBkUmLpqAsyncFortune(int id) {
+	this->id = id;
+	allocd = false;
 }
 }
 
 
-void TeBkUmLpqAsyncFortune::setMessage(const std::string& message) {
-	this->message = message;
+TeBkUmLpqAsyncFortune::TeBkUmLpqAsyncFortune(int id, std::string message) {
+	this->id = id;
+	this->message_i = message;
+	this->message = std::string_view(this->message_i);
+	allocd = false;
 }
 }
 
 
 TeBkUmLpqAsyncFortune::TeBkUmLpqAsyncFortune() {
 TeBkUmLpqAsyncFortune::TeBkUmLpqAsyncFortune() {
 	id = 0;
 	id = 0;
+	allocd = false;
 }
 }
 
 
 TeBkUmLpqAsyncFortune::~TeBkUmLpqAsyncFortune() {
 TeBkUmLpqAsyncFortune::~TeBkUmLpqAsyncFortune() {
+	if(allocd && message.size()>0) {
+		free((void *)message.data());
+	}
 }
 }
 
 
 bool TeBkUmLpqAsyncFortune::operator < (const TeBkUmLpqAsyncFortune& other) const {
 bool TeBkUmLpqAsyncFortune::operator < (const TeBkUmLpqAsyncFortune& other) const {
 	return message.compare(other.message)<0;
 	return message.compare(other.message)<0;
 }
 }
 
 
+TeBkUmLpqAsyncMessage::TeBkUmLpqAsyncMessage() {
+}
+
+TeBkUmLpqAsyncMessage::TeBkUmLpqAsyncMessage(std::string message) {
+	this->message = message;
+}
+
 TeBkUmLpqAsyncMessage::~TeBkUmLpqAsyncMessage() {
 TeBkUmLpqAsyncMessage::~TeBkUmLpqAsyncMessage() {
 }
 }
 
 
@@ -88,18 +113,15 @@ std::string TeBkUmLpqAsyncRouter::WORLD = "world";
 std::string TeBkUmLpqAsyncRouter::WORLD_ONE_QUERY = "select id, randomnumber from world where id = $1";
 std::string TeBkUmLpqAsyncRouter::WORLD_ONE_QUERY = "select id, randomnumber from world where id = $1";
 std::string TeBkUmLpqAsyncRouter::WORLD_ALL_QUERY = "select id, randomnumber from world";
 std::string TeBkUmLpqAsyncRouter::WORLD_ALL_QUERY = "select id, randomnumber from world";
 std::string TeBkUmLpqAsyncRouter::FORTUNE_ALL_QUERY = "select id, message from fortune";
 std::string TeBkUmLpqAsyncRouter::FORTUNE_ALL_QUERY = "select id, message from fortune";
-//Logger TeBkUmLpqAsyncRouter::logger = LoggerFactory::getLogger("TeBkUmLpqAsync");
 std::map<int, std::string> TeBkUmLpqAsyncRouter::_qC;
 std::map<int, std::string> TeBkUmLpqAsyncRouter::_qC;
 
 
 void TeBkUmLpqAsyncRouter::dbAsync(AsyncReq* req) {
 void TeBkUmLpqAsyncRouter::dbAsync(AsyncReq* req) {
-	req->d = new TeBkUmLpqAsyncWorld;
 	LibpqDataSourceImpl* sqli = getDb();
 	LibpqDataSourceImpl* sqli = getDb();
 	int rid = rand() % 10000 + 1;
 	int rid = rand() % 10000 + 1;
 	try {
 	try {
 		std::vector<LibpqParam> pars;
 		std::vector<LibpqParam> pars;
 		LibpqDataSourceImpl::ADD_INT4(pars, rid);
 		LibpqDataSourceImpl::ADD_INT4(pars, rid);
 		void* areq = sqli->executeQueryAsync(WORLD_ONE_QUERY, std::move(pars), req, &TeBkUmLpqAsyncRouter::dbAsyncUtil, &TeBkUmLpqAsyncRouter::dbAsyncCh, NULL);
 		void* areq = sqli->executeQueryAsync(WORLD_ONE_QUERY, std::move(pars), req, &TeBkUmLpqAsyncRouter::dbAsyncUtil, &TeBkUmLpqAsyncRouter::dbAsyncCh, NULL);
-		//logger << ("in API /db added to PG\n");
 		sqli->completeAsync(areq);
 		sqli->completeAsync(areq);
 	} catch(const std::exception& e) {
 	} catch(const std::exception& e) {
 		throw e;
 		throw e;
@@ -107,37 +129,31 @@ void TeBkUmLpqAsyncRouter::dbAsync(AsyncReq* req) {
 }
 }
 void TeBkUmLpqAsyncRouter::dbAsyncUtil(void* ctx, int rn, int cn, char * d) {
 void TeBkUmLpqAsyncRouter::dbAsyncUtil(void* ctx, int rn, int cn, char * d) {
 	AsyncReq* req = (AsyncReq*)ctx;
 	AsyncReq* req = (AsyncReq*)ctx;
-	TeBkUmLpqAsyncWorld* w = (TeBkUmLpqAsyncWorld*)req->d;
-	if(cn==0)w->setId(ntohl(*((uint32_t *) d)));
-	if(cn==1)w->setRandomNumber(ntohl(*((uint32_t *) d)));
-	//logger << ("in API /db received row from PG\n");
+	if(cn==0)req->w.setId(ntohl(*((uint32_t *) d)));
+	if(cn==1)req->w.setRandomNumber(ntohl(*((uint32_t *) d)));
 }
 }
 void TeBkUmLpqAsyncRouter::dbAsyncCh(void* ctx, bool status, const std::string& q, int counter) {
 void TeBkUmLpqAsyncRouter::dbAsyncCh(void* ctx, bool status, const std::string& q, int counter) {
 	AsyncReq* req = (AsyncReq*)ctx;
 	AsyncReq* req = (AsyncReq*)ctx;
-	TeBkUmLpqAsyncWorld* w = (TeBkUmLpqAsyncWorld*)req->d;
-	req->r.setHTTPResponseStatus(HTTPResponseStatus::Ok);
-	std::string c;
-	JSONSerialize::serializeUnknown(w, 0, "TeBkUmLpqAsyncWorld", &c, APP_NAME);
+	HttpResponse r;
+	r.setHTTPResponseStatus(HTTPResponseStatus::Ok);
+	JSONSerialize::serializeObject(&req->w, w_ser, r.getContentP());
 	std::string d;
 	std::string d;
-	req->r.generateHeadResponse(d, ContentTypes::CONTENT_TYPE_APPLICATION_JSON, (int)c.length());
-	int st = req->sif->writeDirect(d);
-	//logger.write("in API /db completion writeDirect headers to sock %d\n", st);
-	st = req->sif->writeDirect(c);
-	//logger.write("in API /db completion writeDirect data to sock %d\n", st);
+	r.generateHeadResponse(d, ContentTypes::CONTENT_TYPE_APPLICATION_JSON, req->httpVers, req->conn_clos);
+	req->sif->writeDirect(d);
+	req->sif->writeDirect(r.getContent());
 	req->sif->unUse();
 	req->sif->unUse();
-	delete w;
 	delete req;
 	delete req;
 }
 }
 
 
 
 
 void TeBkUmLpqAsyncRouter::queriesAsync(const char* q, int ql, AsyncReq* req) {
 void TeBkUmLpqAsyncRouter::queriesAsync(const char* q, int ql, AsyncReq* req) {
-	req->d = new std::vector<TeBkUmLpqAsyncWorld>;
-
 	int queryCount = 0;
 	int queryCount = 0;
 	strToNum(q, ql, queryCount);
 	strToNum(q, ql, queryCount);
 	if(queryCount<1)queryCount=1;
 	if(queryCount<1)queryCount=1;
 	else if(queryCount>500)queryCount=500;
 	else if(queryCount>500)queryCount=500;
 
 
+	req->vec.reserve(queryCount);
+
 	LibpqDataSourceImpl* sqli = getDb();
 	LibpqDataSourceImpl* sqli = getDb();
 
 
 	try {
 	try {
@@ -155,39 +171,35 @@ void TeBkUmLpqAsyncRouter::queriesAsync(const char* q, int ql, AsyncReq* req) {
 }
 }
 void TeBkUmLpqAsyncRouter::queriesAsyncUtil(void* ctx, int rn, int cn, char * d) {
 void TeBkUmLpqAsyncRouter::queriesAsyncUtil(void* ctx, int rn, int cn, char * d) {
 	AsyncReq* req = (AsyncReq*)ctx;
 	AsyncReq* req = (AsyncReq*)ctx;
-	std::vector<TeBkUmLpqAsyncWorld>* vec = (std::vector<TeBkUmLpqAsyncWorld>*)req->d;
 	if(cn==0) {
 	if(cn==0) {
-		vec->push_back(TeBkUmLpqAsyncWorld());
+		req->vec.emplace_back(ntohl(*((uint32_t *) d)));
+	} else {
+		req->vec.back().setRandomNumber(ntohl(*((uint32_t *) d)));
 	}
 	}
-	TeBkUmLpqAsyncWorld& w = vec->at(vec->size()-1);
-	if(cn==0)w.setId(ntohl(*((uint32_t *) d)));
-	if(cn==1)w.setRandomNumber(ntohl(*((uint32_t *) d)));
 }
 }
 void TeBkUmLpqAsyncRouter::queriesAsyncCh(void* ctx, bool status, const std::string& q, int counter) {
 void TeBkUmLpqAsyncRouter::queriesAsyncCh(void* ctx, bool status, const std::string& q, int counter) {
 	AsyncReq* req = (AsyncReq*)ctx;
 	AsyncReq* req = (AsyncReq*)ctx;
-	std::vector<TeBkUmLpqAsyncWorld>* vec = (std::vector<TeBkUmLpqAsyncWorld>*)req->d;
-	req->r.setHTTPResponseStatus(HTTPResponseStatus::Ok);
-	std::string c;
-	JSONSerialize::serializeUnknown(vec, 100, "std::vector<TeBkUmLpqAsyncWorld>", &c, APP_NAME);
+	HttpResponse r;
+	r.setHTTPResponseStatus(HTTPResponseStatus::Ok);
+	JSONSerialize::serializeObjectCont(&req->vec, wcont_ser, "vector", r.getContentP());
 	std::string d;
 	std::string d;
-	req->r.generateHeadResponse(d, ContentTypes::CONTENT_TYPE_APPLICATION_JSON, (int)c.length());
+	r.generateHeadResponse(d, ContentTypes::CONTENT_TYPE_APPLICATION_JSON, req->httpVers, req->conn_clos);
 	req->sif->writeDirect(d);
 	req->sif->writeDirect(d);
-	req->sif->writeDirect(c);
+	req->sif->writeDirect(r.getContent());
 	req->sif->unUse();
 	req->sif->unUse();
-	delete vec;
 	delete req;
 	delete req;
 }
 }
 
 
 
 
 #ifndef HAVE_LIBPQ_BATCH
 #ifndef HAVE_LIBPQ_BATCH
 void TeBkUmLpqAsyncRouter::queriesMultiAsync(const char* q, int ql, AsyncReq* req) {
 void TeBkUmLpqAsyncRouter::queriesMultiAsync(const char* q, int ql, AsyncReq* req) {
-	req->d = new std::vector<TeBkUmLpqAsyncWorld>;
-
 	int queryCount = 0;
 	int queryCount = 0;
 	strToNum(q, ql, queryCount);
 	strToNum(q, ql, queryCount);
 	if(queryCount<1)queryCount=1;
 	if(queryCount<1)queryCount=1;
 	else if(queryCount>500)queryCount=500;
 	else if(queryCount>500)queryCount=500;
 
 
+	req->vec.reserve(queryCount);
+
 	LibpqDataSourceImpl* sqli = getDb();
 	LibpqDataSourceImpl* sqli = getDb();
 
 
 	try {
 	try {
@@ -204,28 +216,24 @@ void TeBkUmLpqAsyncRouter::queriesMultiAsync(const char* q, int ql, AsyncReq* re
 }
 }
 void TeBkUmLpqAsyncRouter::queriesMultiAsyncUtil(void* ctx, int rn, int cn, char * d, int l) {
 void TeBkUmLpqAsyncRouter::queriesMultiAsyncUtil(void* ctx, int rn, int cn, char * d, int l) {
 	AsyncReq* req = (AsyncReq*)ctx;
 	AsyncReq* req = (AsyncReq*)ctx;
-	std::vector<TeBkUmLpqAsyncWorld>* vec = (std::vector<TeBkUmLpqAsyncWorld>*)req->d;
-	if(cn==0) {
-		vec->push_back(TeBkUmLpqAsyncWorld());
-	}
-	TeBkUmLpqAsyncWorld& w = vec->at(vec->size()-1);
 	int tmp = 0;
 	int tmp = 0;
 	strToNum(d, l, tmp);
 	strToNum(d, l, tmp);
-	if(cn==0)w.setId(tmp);
-	if(cn==1)w.setRandomNumber(tmp);
+	if(cn==0) {
+		req->vec.emplace_back(tmp);
+	} else {
+		req->vec.back().setRandomNumber(tmp);
+	}
 }
 }
 void TeBkUmLpqAsyncRouter::queriesMultiAsyncCh(void* ctx, bool status, const std::string& q, int counter) {
 void TeBkUmLpqAsyncRouter::queriesMultiAsyncCh(void* ctx, bool status, const std::string& q, int counter) {
 	AsyncReq* req = (AsyncReq*)ctx;
 	AsyncReq* req = (AsyncReq*)ctx;
-	std::vector<TeBkUmLpqAsyncWorld>* vec = (std::vector<TeBkUmLpqAsyncWorld>*)req->d;
-	req->r.setHTTPResponseStatus(HTTPResponseStatus::Ok);
-	std::string c;
-	JSONSerialize::serializeUnknown(vec, 100, "std::vector<TeBkUmLpqAsyncWorld>", &c, APP_NAME);
+	HttpResponse r;
+	r.setHTTPResponseStatus(HTTPResponseStatus::Ok);
+	JSONSerialize::serializeObjectCont(&req->vec, wcont_ser, "vector", r.getContentP());
 	std::string d;
 	std::string d;
-	req->r.generateHeadResponse(d, ContentTypes::CONTENT_TYPE_APPLICATION_JSON, (int)c.length());
+	r.generateHeadResponse(d, ContentTypes::CONTENT_TYPE_APPLICATION_JSON, req->httpVers, req->conn_clos);
 	req->sif->writeDirect(d);
 	req->sif->writeDirect(d);
-	req->sif->writeDirect(c);
+	req->sif->writeDirect(r.getContent());
 	req->sif->unUse();
 	req->sif->unUse();
-	delete vec;
 	delete req;
 	delete req;
 }
 }
 #endif
 #endif
@@ -260,13 +268,13 @@ std::string& TeBkUmLpqAsyncRouter::getUpdQuery(int count) {
 }
 }
 
 
 void TeBkUmLpqAsyncRouter::updatesAsyncb(const char* q, int ql, AsyncReq* req) {
 void TeBkUmLpqAsyncRouter::updatesAsyncb(const char* q, int ql, AsyncReq* req) {
-	req->d = new std::vector<TeBkUmLpqAsyncWorld>;
-
 	int queryCount = 0;
 	int queryCount = 0;
 	strToNum(q, ql, queryCount);
 	strToNum(q, ql, queryCount);
 	if(queryCount<1)queryCount=1;
 	if(queryCount<1)queryCount=1;
 	else if(queryCount>500)queryCount=500;
 	else if(queryCount>500)queryCount=500;
 
 
+	req->vec.reserve(queryCount);
+
 	LibpqDataSourceImpl* sqli = getDb();
 	LibpqDataSourceImpl* sqli = getDb();
 	req->sqli = sqli;
 	req->sqli = sqli;
 
 
@@ -285,28 +293,27 @@ void TeBkUmLpqAsyncRouter::updatesAsyncb(const char* q, int ql, AsyncReq* req) {
 }
 }
 void TeBkUmLpqAsyncRouter::updatesAsyncbChQ(void* ctx, bool status, const std::string& q, int counter) {
 void TeBkUmLpqAsyncRouter::updatesAsyncbChQ(void* ctx, bool status, const std::string& q, int counter) {
 	AsyncReq* req = (AsyncReq*)ctx;
 	AsyncReq* req = (AsyncReq*)ctx;
-	std::vector<TeBkUmLpqAsyncWorld>* vec = (std::vector<TeBkUmLpqAsyncWorld>*)req->d;
 
 
 	LibpqDataSourceImpl* sqli = req->sqli;
 	LibpqDataSourceImpl* sqli = req->sqli;
 
 
-	int queryCount = (int)vec->size();
+	int queryCount = (int)req->vec.size();
 	std::vector<LibpqParam> pars;
 	std::vector<LibpqParam> pars;
 
 
-	for (int c = 0; c < queryCount; ++c) {
-		LibpqDataSourceImpl::ADD_INT4(pars, vec->at(c).getId());
+	for(std::vector<TeBkUmLpqAsyncWorld>::iterator it=req->vec.begin(); it != req->vec.end(); ++it) {
+		LibpqDataSourceImpl::ADD_INT4(pars, (*it).getId());
 
 
 		int newRandomNumber = rand() % 10000 + 1;
 		int newRandomNumber = rand() % 10000 + 1;
-		if(vec->at(c).getRandomNumber() == newRandomNumber) {
+		if((*it).getRandomNumber() == newRandomNumber) {
 			newRandomNumber += 1;
 			newRandomNumber += 1;
 			if(newRandomNumber>=10000) {
 			if(newRandomNumber>=10000) {
 				newRandomNumber = 1;
 				newRandomNumber = 1;
 			}
 			}
 		}
 		}
 		LibpqDataSourceImpl::ADD_INT4(pars, newRandomNumber);
 		LibpqDataSourceImpl::ADD_INT4(pars, newRandomNumber);
-		vec->at(c).setRandomNumber(newRandomNumber);
+		(*it).setRandomNumber(newRandomNumber);
 	}
 	}
-	for (int c = 0; c < queryCount; ++c) {
-		LibpqDataSourceImpl::ADD_INT4(pars, vec->at(c).getId());
+	for(std::vector<TeBkUmLpqAsyncWorld>::iterator it=req->vec.begin(); it != req->vec.end(); ++it) {
+		LibpqDataSourceImpl::ADD_INT4(pars, (*it).getId());
 	}
 	}
 
 
 	void* areq = sqli->beginAsync(NULL);
 	void* areq = sqli->beginAsync(NULL);
@@ -315,9 +322,9 @@ void TeBkUmLpqAsyncRouter::updatesAsyncbChQ(void* ctx, bool status, const std::s
 
 
 	AsyncReq* ar = new AsyncReq;
 	AsyncReq* ar = new AsyncReq;
 	ar->sif = req->sif;
 	ar->sif = req->sif;
-	ar->r = std::move(req->r);
-	ar->d = req->d;
-	req->d = NULL;
+	ar->httpVers = req->httpVers;
+	ar->conn_clos = req->conn_clos;
+	ar->vec = std::move(req->vec);
 	req->sif = NULL;
 	req->sif = NULL;
 
 
 	try {
 	try {
@@ -328,27 +335,25 @@ void TeBkUmLpqAsyncRouter::updatesAsyncbChQ(void* ctx, bool status, const std::s
 }
 }
 void TeBkUmLpqAsyncRouter::updatesAsyncbChU(void* ctx, bool status, const std::string& q, int counter) {
 void TeBkUmLpqAsyncRouter::updatesAsyncbChU(void* ctx, bool status, const std::string& q, int counter) {
 	AsyncReq* req = (AsyncReq*)ctx;
 	AsyncReq* req = (AsyncReq*)ctx;
-	std::vector<TeBkUmLpqAsyncWorld>* vec = (std::vector<TeBkUmLpqAsyncWorld>*)req->d;
-	req->r.setHTTPResponseStatus(HTTPResponseStatus::Ok);
-	std::string c;
-	JSONSerialize::serializeUnknown(vec, 100, "std::vector<TeBkUmLpqAsyncWorld>", &c, APP_NAME);
+	HttpResponse r;
+	r.setHTTPResponseStatus(HTTPResponseStatus::Ok);
+	JSONSerialize::serializeObjectCont(&req->vec, wcont_ser, "vector", r.getContentP());
 	std::string d;
 	std::string d;
-	req->r.generateHeadResponse(d, ContentTypes::CONTENT_TYPE_APPLICATION_JSON, (int)c.length());
+	r.generateHeadResponse(d, ContentTypes::CONTENT_TYPE_APPLICATION_JSON, req->httpVers, req->conn_clos);
 	req->sif->writeDirect(d);
 	req->sif->writeDirect(d);
-	req->sif->writeDirect(c);
+	req->sif->writeDirect(r.getContent());
 	req->sif->unUse();
 	req->sif->unUse();
-	delete vec;
 	delete req;
 	delete req;
 }
 }
 
 
 void TeBkUmLpqAsyncRouter::updatesAsync(const char* q, int ql, AsyncReq* req) {
 void TeBkUmLpqAsyncRouter::updatesAsync(const char* q, int ql, AsyncReq* req) {
-	req->d = new std::vector<TeBkUmLpqAsyncWorld>;
-
 	int queryCount = 0;
 	int queryCount = 0;
 	strToNum(q, ql, queryCount);
 	strToNum(q, ql, queryCount);
 	if(queryCount<1)queryCount=1;
 	if(queryCount<1)queryCount=1;
 	else if(queryCount>500)queryCount=500;
 	else if(queryCount>500)queryCount=500;
 
 
+	req->vec.reserve(queryCount);
+
 	LibpqDataSourceImpl* sqli = getDb();
 	LibpqDataSourceImpl* sqli = getDb();
 	req->sqli = sqli;
 	req->sqli = sqli;
 
 
@@ -367,7 +372,6 @@ void TeBkUmLpqAsyncRouter::updatesAsync(const char* q, int ql, AsyncReq* req) {
 }
 }
 void TeBkUmLpqAsyncRouter::updatesAsyncChQ(void* ctx, bool status, const std::string& q, int counter) {
 void TeBkUmLpqAsyncRouter::updatesAsyncChQ(void* ctx, bool status, const std::string& q, int counter) {
 	AsyncReq* req = (AsyncReq*)ctx;
 	AsyncReq* req = (AsyncReq*)ctx;
-	std::vector<TeBkUmLpqAsyncWorld>* vec = (std::vector<TeBkUmLpqAsyncWorld>*)req->d;
 
 
 	std::stringstream ss;
 	std::stringstream ss;
 	//ss << "update world as t set randomnumber = c.randomnumber from (values";
 	//ss << "update world as t set randomnumber = c.randomnumber from (values";
@@ -375,16 +379,15 @@ void TeBkUmLpqAsyncRouter::updatesAsyncChQ(void* ctx, bool status, const std::st
 	LibpqDataSourceImpl* sqli = req->sqli;
 	LibpqDataSourceImpl* sqli = req->sqli;
 
 
 	void* areq = NULL;
 	void* areq = NULL;
-	int queryCount = (int)vec->size();
-	for (int c = 0; c < queryCount; ++c) {
+	for(std::vector<TeBkUmLpqAsyncWorld>::iterator it=req->vec.begin(); it != req->vec.end(); ++it) {
 		int newRandomNumber = rand() % 10000 + 1;
 		int newRandomNumber = rand() % 10000 + 1;
-		if(vec->at(c).getRandomNumber() == newRandomNumber) {
+		if((*it).getRandomNumber() == newRandomNumber) {
 			newRandomNumber += 1;
 			newRandomNumber += 1;
 			if(newRandomNumber>=10000) {
 			if(newRandomNumber>=10000) {
 				newRandomNumber = 1;
 				newRandomNumber = 1;
 			}
 			}
 		}
 		}
-		vec->at(c).setRandomNumber(newRandomNumber);
+		(*it).setRandomNumber(newRandomNumber);
 		if(areq==NULL) {
 		if(areq==NULL) {
 			areq = sqli->beginAsync(areq);
 			areq = sqli->beginAsync(areq);
 		} else {
 		} else {
@@ -392,7 +395,7 @@ void TeBkUmLpqAsyncRouter::updatesAsyncChQ(void* ctx, bool status, const std::st
 		}
 		}
 		ss.str(std::string());
 		ss.str(std::string());
 		std::vector<LibpqParam> pars;
 		std::vector<LibpqParam> pars;
-		ss << "update world set randomnumber = " << newRandomNumber << " where id = " << vec->at(c).getId();
+		ss << "update world set randomnumber = " << newRandomNumber << " where id = " << (*it).getId();
 		sqli->executeUpdateQueryAsync(ss.str(), std::move(pars), NULL, NULL, areq, false);
 		sqli->executeUpdateQueryAsync(ss.str(), std::move(pars), NULL, NULL, areq, false);
 		sqli->commitAsync(areq);
 		sqli->commitAsync(areq);
 		/*if(c!=queryCount-1) {
 		/*if(c!=queryCount-1) {
@@ -403,9 +406,9 @@ void TeBkUmLpqAsyncRouter::updatesAsyncChQ(void* ctx, bool status, const std::st
 
 
 	AsyncReq* ar = new AsyncReq;
 	AsyncReq* ar = new AsyncReq;
 	ar->sif = req->sif;
 	ar->sif = req->sif;
-	ar->r = std::move(req->r);
-	ar->d = req->d;
-	req->d = NULL;
+	ar->httpVers = req->httpVers;
+	ar->conn_clos = req->conn_clos;
+	ar->vec = std::move(req->vec);
 	req->sif = NULL;
 	req->sif = NULL;
 
 
 	try {
 	try {
@@ -416,16 +419,14 @@ void TeBkUmLpqAsyncRouter::updatesAsyncChQ(void* ctx, bool status, const std::st
 }
 }
 void TeBkUmLpqAsyncRouter::updatesAsyncChU(void* ctx, bool status, const std::string& q, int counter) {
 void TeBkUmLpqAsyncRouter::updatesAsyncChU(void* ctx, bool status, const std::string& q, int counter) {
 	AsyncReq* req = (AsyncReq*)ctx;
 	AsyncReq* req = (AsyncReq*)ctx;
-	std::vector<TeBkUmLpqAsyncWorld>* vec = (std::vector<TeBkUmLpqAsyncWorld>*)req->d;
-	req->r.setHTTPResponseStatus(HTTPResponseStatus::Ok);
-	std::string c;
-	JSONSerialize::serializeUnknown(vec, 100, "std::vector<TeBkUmLpqAsyncWorld>", &c, APP_NAME);
+	HttpResponse r;
+	r.setHTTPResponseStatus(HTTPResponseStatus::Ok);
+	JSONSerialize::serializeObjectCont(&req->vec, wcont_ser, "vector", r.getContentP());
 	std::string d;
 	std::string d;
-	req->r.generateHeadResponse(d, ContentTypes::CONTENT_TYPE_APPLICATION_JSON, (int)c.length());
+	r.generateHeadResponse(d, ContentTypes::CONTENT_TYPE_APPLICATION_JSON, req->httpVers, req->conn_clos);
 	req->sif->writeDirect(d);
 	req->sif->writeDirect(d);
-	req->sif->writeDirect(c);
+	req->sif->writeDirect(r.getContent());
 	req->sif->unUse();
 	req->sif->unUse();
-	delete vec;
 	delete req;
 	delete req;
 }
 }
 
 
@@ -433,7 +434,6 @@ void TeBkUmLpqAsyncRouter::updateCache() {
 	LibpqDataSourceImpl* sqli = getDb();
 	LibpqDataSourceImpl* sqli = getDb();
 
 
 	CacheReq* req = new CacheReq;
 	CacheReq* req = new CacheReq;
-	req->d = new std::vector<TeBkUmLpqAsyncWorld>;
 	req->cchi = CacheManager::getImpl();
 	req->cchi = CacheManager::getImpl();
 
 
 	try {
 	try {
@@ -446,30 +446,22 @@ void TeBkUmLpqAsyncRouter::updateCache() {
 }
 }
 void TeBkUmLpqAsyncRouter::updateCacheAsyncUtil(void* ctx, int rn, std::vector<LibpqRes>& data) {
 void TeBkUmLpqAsyncRouter::updateCacheAsyncUtil(void* ctx, int rn, std::vector<LibpqRes>& data) {
 	CacheReq* req = (CacheReq*)ctx;
 	CacheReq* req = (CacheReq*)ctx;
-	std::vector<TeBkUmLpqAsyncWorld>* wlist = (std::vector<TeBkUmLpqAsyncWorld>*)req->d;
-	TeBkUmLpqAsyncWorld w;
-	w.setId(ntohl(*((uint32_t *) data.at(0).d)));
-	w.setRandomNumber(ntohl(*((uint32_t *) data.at(1).d)));
-	wlist->push_back(w);
+	req->vec.emplace_back(ntohl(*((uint32_t *) data.at(0).d)), ntohl(*((uint32_t *) data.at(1).d)));
 }
 }
 void TeBkUmLpqAsyncRouter::updateCacheAsyncCh(void* ctx, bool status, const std::string& q, int counter) {
 void TeBkUmLpqAsyncRouter::updateCacheAsyncCh(void* ctx, bool status, const std::string& q, int counter) {
 	CacheReq* req = (CacheReq*)ctx;
 	CacheReq* req = (CacheReq*)ctx;
-	std::vector<TeBkUmLpqAsyncWorld>* wlist = (std::vector<TeBkUmLpqAsyncWorld>*)req->d;
 	CacheInterface* cchi = req->cchi;
 	CacheInterface* cchi = req->cchi;
 
 
 	try {
 	try {
-		for (int c = 0; c < (int)wlist->size(); ++c) {
-			TeBkUmLpqAsyncWorld& w = wlist->at(c);
+		for(std::vector<TeBkUmLpqAsyncWorld>::iterator it=req->vec.begin(); it != req->vec.end(); ++it) {
 			char str[12];
 			char str[12];
-			sprintf(str, "%d;%d", w.getId(), w.getRandomNumber());
-			cchi->setRaw(CastUtil::fromNumber(w.getId()), str);
+			sprintf(str, "%d;%d", (*it).getId(), (*it).getRandomNumber());
+			cchi->setRaw(CastUtil::fromNumber((*it).getId()), str);
 		}
 		}
-		delete wlist;
 		CacheManager::cleanImpl(cchi);
 		CacheManager::cleanImpl(cchi);
 		delete req;
 		delete req;
 		CacheManager::triggerAppInitCompletion("te-benchmark-um-pq-async");
 		CacheManager::triggerAppInitCompletion("te-benchmark-um-pq-async");
 	} catch(const std::exception& e) {
 	} catch(const std::exception& e) {
-		delete wlist;
 		CacheManager::cleanImpl(cchi);
 		CacheManager::cleanImpl(cchi);
 		delete req;
 		delete req;
 		throw e;
 		throw e;
@@ -482,22 +474,21 @@ void TeBkUmLpqAsyncRouter::cachedWorlds(const char* q, int ql, std::vector<TeBkU
 	if(queryCount<1)queryCount=1;
 	if(queryCount<1)queryCount=1;
 	else if(queryCount>500)queryCount=500;
 	else if(queryCount>500)queryCount=500;
 
 
+	wlst.reserve(queryCount);
+
 	CacheInterface* cchi = CacheManager::getImpl();
 	CacheInterface* cchi = CacheManager::getImpl();
 
 
 	try {
 	try {
 		std::vector<std::string> keys;
 		std::vector<std::string> keys;
 		for (int c = 0; c < queryCount; ++c) {
 		for (int c = 0; c < queryCount; ++c) {
 			int rid = rand() % 10000 + 1;
 			int rid = rand() % 10000 + 1;
-			TeBkUmLpqAsyncWorld w;
 			std::string v = cchi->getValue(CastUtil::fromNumber(rid));
 			std::string v = cchi->getValue(CastUtil::fromNumber(rid));
 			size_t fn = v.find(";");
 			size_t fn = v.find(";");
 			int tmp = 0;
 			int tmp = 0;
 			strToNum(v.substr(0, fn).c_str(), fn, tmp);
 			strToNum(v.substr(0, fn).c_str(), fn, tmp);
-			w.setId(tmp);
-			tmp = 0;
-			strToNum(v.substr(fn+1).c_str(), v.length()-fn-1, tmp);
-			w.setRandomNumber(tmp);
-			wlst.push_back(w);
+			int tmp1 = 0;
+			strToNum(v.substr(fn+1).c_str(), v.length()-fn-1, tmp1);
+			wlst.emplace_back(tmp, tmp1);
 		}
 		}
 		CacheManager::cleanImpl(cchi);
 		CacheManager::cleanImpl(cchi);
 	} catch(const std::exception& e) {
 	} catch(const std::exception& e) {
@@ -508,8 +499,6 @@ void TeBkUmLpqAsyncRouter::cachedWorlds(const char* q, int ql, std::vector<TeBkU
 
 
 
 
 void TeBkUmLpqAsyncRouter::getContextAsync(AsyncReq* req) {
 void TeBkUmLpqAsyncRouter::getContextAsync(AsyncReq* req) {
-	req->d = new std::vector<TeBkUmLpqAsyncFortune>;
-
 	LibpqDataSourceImpl* sqli = getDb();
 	LibpqDataSourceImpl* sqli = getDb();
 
 
 	try {
 	try {
@@ -522,50 +511,40 @@ void TeBkUmLpqAsyncRouter::getContextAsync(AsyncReq* req) {
 }
 }
 void TeBkUmLpqAsyncRouter::getContextAsyncUtil(void* ctx, int rn, int cn, char * d, int l) {
 void TeBkUmLpqAsyncRouter::getContextAsyncUtil(void* ctx, int rn, int cn, char * d, int l) {
 	AsyncReq* req = (AsyncReq*)ctx;
 	AsyncReq* req = (AsyncReq*)ctx;
-	std::vector<TeBkUmLpqAsyncFortune>* flst = (std::vector<TeBkUmLpqAsyncFortune>*)req->d;
 	if(cn==0) {
 	if(cn==0) {
-		flst->push_back(TeBkUmLpqAsyncFortune());
-	}
-	TeBkUmLpqAsyncFortune& w = flst->at(flst->size()-1);
-	if(cn==0)w.setId(ntohl(*((uint32_t *) d)));
-	else {
-		std::string nm = std::string(d, l);
-		CryptoHandler::sanitizeHtml(nm);
-		w.setMessage(nm);
+		req->flst.emplace_back(ntohl(*((uint32_t *) d)));
+	} else {
+		TeBkUmLpqAsyncFortune& w = req->flst.back();
+		w.message = CryptoHandler::sanitizeHtmlFast((const uint8_t *)d, (size_t)l, w.message_i, w.allocd);
 	}
 	}
 }
 }
+
 void TeBkUmLpqAsyncRouter::getContextAsyncCh(void* ctx, bool status, const std::string& q, int counter) {
 void TeBkUmLpqAsyncRouter::getContextAsyncCh(void* ctx, bool status, const std::string& q, int counter) {
 	AsyncReq* req = (AsyncReq*)ctx;
 	AsyncReq* req = (AsyncReq*)ctx;
-	std::vector<TeBkUmLpqAsyncFortune>* flst = (std::vector<TeBkUmLpqAsyncFortune>*)req->d;
-
 	Context context;
 	Context context;
 
 
-	TeBkUmLpqAsyncFortune nf;
-	nf.setId(0);
-	nf.setMessage("Additional fortune added at request time.");
-	flst->push_back(nf);
-	std::sort (flst->begin(), flst->end());
+	req->flst.emplace_back(0, "Additional fortune added at request time.");
+	req->flst.sort();
 
 
-	context.insert(std::pair<std::string, void*>("fortunes", flst));
+	context.insert(std::pair<std::string, void*>("fortunes", &req->flst));
 
 
-	void* mkr = dlsym(req->ddlib, TPE_FN_NAME.c_str());
-	if(mkr!=NULL)
+	if(tmplFunc!=NULL)
 	{
 	{
-		TeBkUmLpqAsyncTemplatePtr f =  (TeBkUmLpqAsyncTemplatePtr)mkr;
-		std::string msg;
-		f(&context, msg);
-		req->r.setContent(msg);
-		req->r.setHTTPResponseStatus(HTTPResponseStatus::Ok);
+		fcpstream str;
+		tmplFunc(&context, str);
+		HttpResponse r;
+		r.setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		std::string d;
 		std::string d;
-		req->r.generateHeadResponse(d, ContentTypes::CONTENT_TYPE_TEXT_SHTML, (int)msg.length());
+		r.generateHeadResponse(d, ContentTypes::CONTENT_TYPE_TEXT_SHTML, req->httpVers, req->conn_clos, (int)str.str().length());
 		req->sif->writeDirect(d);
 		req->sif->writeDirect(d);
-		req->sif->writeDirect(msg);
+		req->sif->writeDirect(str.str());
 		req->sif->unUse();
 		req->sif->unUse();
 	}
 	}
 	else
 	else
 	{
 	{
 		ResponseData d;
 		ResponseData d;
-		req->r.generateHeadResponse(d._b);
+		HttpResponse r;
+		r.generateHeadResponse(d._b, req->httpVers, req->conn_clos);
 		req->sif->writeTo(&d);
 		req->sif->writeTo(&d);
 		req->sif->unUse();
 		req->sif->unUse();
 	}
 	}
@@ -582,82 +561,88 @@ bool TeBkUmLpqAsyncRouter::strToNum(const char* str, int len, int& ret) {
     return true;
     return true;
 }
 }
 
 
-bool TeBkUmLpqAsyncRouter::route(HttpRequest* req, HttpResponse* res, void* dlib, void* ddlib, SocketInterface* sif) {
-	std::string_view path = req->getPath();
+bool TeBkUmLpqAsyncRouter::route(HttpRequest* req, HttpResponse* res, SocketInterface* sif) {
 	sif->use();
 	sif->use();
-	if(StringUtil::endsWith(path, "/plaintext")) {
+	if(StringUtil::endsWith(req->getPath(), "/plaintext")) {
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		std::string d;
 		std::string d;
 		res->generateHeadResponse(d, ContentTypes::CONTENT_TYPE_TEXT_PLAIN, (int)HELLO_WORLD.length());
 		res->generateHeadResponse(d, ContentTypes::CONTENT_TYPE_TEXT_PLAIN, (int)HELLO_WORLD.length());
 		sif->writeDirect(d);
 		sif->writeDirect(d);
 		sif->writeDirect(HELLO_WORLD);
 		sif->writeDirect(HELLO_WORLD);
 		sif->unUse();
 		sif->unUse();
-	} else if(StringUtil::endsWith(path, "/json")) {
+	} else if(StringUtil::endsWith(req->getPath(), "/json")) {
 		TeBkUmLpqAsyncMessage msg;
 		TeBkUmLpqAsyncMessage msg;
 		msg.setMessage(HELLO_WORLD);
 		msg.setMessage(HELLO_WORLD);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-		std::string c;
-		JSONSerialize::serializeUnknown(&msg, 0, "TeBkUmLpqAsyncMessage", &c, APP_NAME);
+		JSONSerialize::serializeObject(&msg, m_ser, res->getContentP());
 		std::string d;
 		std::string d;
-		res->generateHeadResponse(d, ContentTypes::CONTENT_TYPE_APPLICATION_JSON, (int)c.length());
+		res->generateHeadResponse(d, ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		sif->writeDirect(d);
 		sif->writeDirect(d);
-		sif->writeDirect(c);
+		sif->writeDirect(res->getContent());
 		sif->unUse();
 		sif->unUse();
-	} else if(StringUtil::endsWith(path, "/db")) {
+	} else if(StringUtil::endsWith(req->getPath(), "/db")) {
 		AsyncReq* ar = new AsyncReq;
 		AsyncReq* ar = new AsyncReq;
 		ar->sif = sif;
 		ar->sif = sif;
-		ar->r.update(req);
+		ar->httpVers = req->getHttpVers();
+		ar->conn_clos = req->isClose();
 		dbAsync(ar);
 		dbAsync(ar);
-	} else if(StringUtil::endsWith(path, "/queries")) {
+	} else if(StringUtil::endsWith(req->getPath(), "/queries")) {
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		AsyncReq* ar = new AsyncReq;
 		AsyncReq* ar = new AsyncReq;
 		ar->sif = sif;
 		ar->sif = sif;
-		ar->r.update(req);
+		ar->httpVers = req->getHttpVers();
+		ar->conn_clos = req->isClose();
 		queriesAsync(params[0].val, params[0].val_len, ar);
 		queriesAsync(params[0].val, params[0].val_len, ar);
 	}
 	}
 #ifndef HAVE_LIBPQ_BATCH
 #ifndef HAVE_LIBPQ_BATCH
-	else if(StringUtil::endsWith(path, "/queriem")) {
+	else if(StringUtil::endsWith(req->getPath(), "/queriem")) {
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		AsyncReq* ar = new AsyncReq;
 		AsyncReq* ar = new AsyncReq;
 		ar->sif = sif;
 		ar->sif = sif;
-		ar->r.update(req);
+		ar->sif = sif;
+		ar->httpVers = req->getHttpVers();
+		ar->conn_clos = req->isClose();
 		queriesMultiAsync(params[0].val, params[0].val_len, ar);
 		queriesMultiAsync(params[0].val, params[0].val_len, ar);
 	}
 	}
 #endif
 #endif
-	else if(StringUtil::endsWith(path, "/fortunes")) {
+	else if(StringUtil::endsWith(req->getPath(), "/fortunes")) {
 		AsyncReq* ar = new AsyncReq;
 		AsyncReq* ar = new AsyncReq;
 		ar->sif = sif;
 		ar->sif = sif;
-		ar->ddlib = ddlib;
-		ar->r.update(req);
+		ar->sif = sif;
+		ar->httpVers = req->getHttpVers();
+		ar->conn_clos = req->isClose();
 		getContextAsync(ar);
 		getContextAsync(ar);
-	} else if(StringUtil::endsWith(path, "/bupdates")) {
+	} else if(StringUtil::endsWith(req->getPath(), "/bupdates")) {
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		AsyncReq* ar = new AsyncReq;
 		AsyncReq* ar = new AsyncReq;
 		ar->sif = sif;
 		ar->sif = sif;
-		ar->r.update(req);
+		ar->sif = sif;
+		ar->httpVers = req->getHttpVers();
+		ar->conn_clos = req->isClose();
 		updatesAsyncb(params[0].val, params[0].val_len, ar);
 		updatesAsyncb(params[0].val, params[0].val_len, ar);
-	} else if(StringUtil::endsWith(path, "/updates")) {
+	} else if(StringUtil::endsWith(req->getPath(), "/updates")) {
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		AsyncReq* ar = new AsyncReq;
 		AsyncReq* ar = new AsyncReq;
 		ar->sif = sif;
 		ar->sif = sif;
-		ar->r.update(req);
+		ar->sif = sif;
+		ar->httpVers = req->getHttpVers();
+		ar->conn_clos = req->isClose();
 		updatesAsync(params[0].val, params[0].val_len, ar);
 		updatesAsync(params[0].val, params[0].val_len, ar);
-	} else if(StringUtil::endsWith(path, "/cached-worlds")) {
+	} else if(StringUtil::endsWith(req->getPath(), "/cached-worlds")) {
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		std::vector<TeBkUmLpqAsyncWorld> msg;
 		std::vector<TeBkUmLpqAsyncWorld> msg;
 		cachedWorlds(params[0].val, params[0].val_len, msg);
 		cachedWorlds(params[0].val, params[0].val_len, msg);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-		std::string c;
-		JSONSerialize::serializeUnknown(&msg, 100, "std::vector<TeBkUmLpqAsyncWorld>", &c, APP_NAME);
+		JSONSerialize::serializeObjectCont(&msg, wcont_ser, "vector", res->getContentP());
 		std::string d;
 		std::string d;
-		res->generateHeadResponse(d, ContentTypes::CONTENT_TYPE_APPLICATION_JSON, (int)c.length());
+		res->generateHeadResponse(d, ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		sif->writeDirect(d);
 		sif->writeDirect(d);
-		sif->writeDirect(c);
+		sif->writeDirect(res->getContent());
 		sif->unUse();
 		sif->unUse();
 	} else {
 	} else {
 		res->setHTTPResponseStatus(HTTPResponseStatus::NotFound);
 		res->setHTTPResponseStatus(HTTPResponseStatus::NotFound);
@@ -669,15 +654,17 @@ bool TeBkUmLpqAsyncRouter::route(HttpRequest* req, HttpResponse* res, void* dlib
 	return false;
 	return false;
 }
 }
 
 
-std::string TeBkUmLpqAsyncRouter::APP_NAME = "";
-std::string TeBkUmLpqAsyncRouter::TPE_FN_NAME = "";
+TemplatePtr TeBkUmLpqAsyncRouter::tmplFunc;
+Ser TeBkUmLpqAsyncRouter::m_ser;
+Ser TeBkUmLpqAsyncRouter::w_ser;
+SerCont TeBkUmLpqAsyncRouter::wcont_ser;
 
 
 TeBkUmLpqAsyncRouter::TeBkUmLpqAsyncRouter() {
 TeBkUmLpqAsyncRouter::TeBkUmLpqAsyncRouter() {
 	sqli = NULL;
 	sqli = NULL;
-	if(APP_NAME=="") {
-		APP_NAME = CommonUtils::normalizeAppName("te-benchmark-um-pq-async");
-		TPE_FN_NAME = CommonUtils::getTpeFnName("tpe/fortunes.tpe", "te-benchmark-um-pq-async");
-	}
+	tmplFunc = TemplateUtil::getTemplateFunc("te-benchmark-um-pq-async", "tpe/fortunes.tpe");
+	m_ser = Serializer::getSerFuncForObject("te-benchmark-um-pq-async", "TeBkUmLpqAsyncMessage");
+	w_ser = Serializer::getSerFuncForObject("te-benchmark-um-pq-async", "TeBkUmLpqAsyncWorld");
+	wcont_ser = Serializer::getSerFuncForObjectCont("te-benchmark-um-pq-async", "TeBkUmLpqAsyncWorld", "std::vector");
 }
 }
 
 
 TeBkUmLpqAsyncRouter::~TeBkUmLpqAsyncRouter() {
 TeBkUmLpqAsyncRouter::~TeBkUmLpqAsyncRouter() {

+ 1 - 1
frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/src/autotools/Makefile.am

@@ -8,7 +8,7 @@ distdir=${PACKAGE_NAME}-${PACKAGE_VERSION}-src
 fprefix=../../../../${packageIdentifier}
 fprefix=../../../../${packageIdentifier}
 prefix=${abs_builddir}
 prefix=${abs_builddir}
 
 
-lib_LTLIBRARIES = libte_benchmark_um_pq_async.la
+lib_LTLIBRARIES = libte-benchmark-um-pq-async.la
 libte_benchmark_um_pq_async_la_SOURCES = ../TeBkUmLpqAsync.cpp
 libte_benchmark_um_pq_async_la_SOURCES = ../TeBkUmLpqAsync.cpp
 
 
 libte_benchmark_um_pq_async_la_LDFLAGS = -no-undefined 
 libte_benchmark_um_pq_async_la_LDFLAGS = -no-undefined 

+ 3 - 3
frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/tpe/fortunes.tpe

@@ -1,12 +1,12 @@
-#declare std::vector<TeBkUmLpqAsyncFortune> fortunes#
+#declareref std::list<TeBkUmLpqAsyncFortune>* fortunes#
 <!DOCTYPE html>
 <!DOCTYPE html>
 <html>
 <html>
 <head><title>Fortunes</title></head>
 <head><title>Fortunes</title></head>
 <body>
 <body>
 <table>
 <table>
 <tr><th>id</th><th>message</th></tr>
 <tr><th>id</th><th>message</th></tr>
-#for(int i=0;i<(int)fortunes.size();i++)#
-<tr><td>$_S{fortunes.at(i).getId()}</td><td>${fortunes.at(i).getMessage()}</td></tr>
+#for(std::list<TeBkUmLpqAsyncFortune>::iterator it=fortunes->begin(); it != fortunes->end(); ++it)#
+<tr><td>${(*it).getId()}</td><td>${(*it).message}</td></tr>
 #rof#
 #rof#
 </table>
 </table>
 </body>
 </body>

+ 12 - 0
frameworks/C++/ffead-cpp/te-benchmark-um-pq-async/xmake.lua

@@ -0,0 +1,12 @@
+add_includedirs("include/")
+
+local bindir = "$(projectdir)/ffead-cpp-6.0-bin"
+
+target("te-benchmark-um-pq-async")
+	set_languages("c++17")
+	add_deps("ffead-framework")
+	add_options(getOptions())
+	set_kind("shared")
+	on_load(setIncludes)
+	add_files("src/*.cpp")
+	set_installdir(bindir)

+ 7 - 3
frameworks/C++/ffead-cpp/te-benchmark-um-pq/CMakeLists.txt

@@ -5,6 +5,10 @@ file(GLOB sources
 )
 )
 
 
 include_directories("${CMAKE_SOURCE_DIR}/web/te-benchmark-um-pq/include")
 include_directories("${CMAKE_SOURCE_DIR}/web/te-benchmark-um-pq/include")
-add_library(te_benchmark_um_pq SHARED ${sources})
-set_property(TARGET te_benchmark_um_pq PROPERTY POSITION_INDEPENDENT_CODE ON)
-target_link_libraries(te_benchmark_um_pq ffead-modules ffead-framework ${HAVE_PQLIB} ${HAVE_CURLLIB} ${HAVE_SSLLIB} ${HAVE_MEMCACHEDLIB} ${HAVE_ODBCLIB} ${HAVE_MONGOCLIB} ${HAVE_BSONLIB} ${HAVE_ZLIB} ${HAVE_CRYPTOLIB})
+if(BUILD_STATIC_LIBS OR EMSCRIPTEN)
+	add_library(te-benchmark-um-pq STATIC ${sources})
+else()
+	add_library(te-benchmark-um-pq ${sources})
+endif()
+set_property(TARGET te-benchmark-um-pq PROPERTY POSITION_INDEPENDENT_CODE ON)
+target_link_libraries(te-benchmark-um-pq ffead-modules ffead-framework ${HAVE_PQLIB} ${HAVE_CURLLIB} ${HAVE_SSLLIB} ${HAVE_MEMCACHEDLIB} ${HAVE_ODBCLIB} ${HAVE_MONGOCLIB} ${HAVE_BSONLIB} ${HAVE_ZLIB} ${HAVE_CRYPTOLIB})

+ 1 - 1
frameworks/C++/ffead-cpp/te-benchmark-um-pq/config/application.xml

@@ -1,4 +1,4 @@
-<app libname="te_benchmark_um_pq" router="TeBkUmLpqRouter">
+<app router="TeBkUmLpqRouter">
 	<cors-config>
 	<cors-config>
 		<allow-origins>*</allow-origins>
 		<allow-origins>*</allow-origins>
 		<allow-methods>GET, POST, HEAD, PUT, DELETE</allow-methods>
 		<allow-methods>GET, POST, HEAD, PUT, DELETE</allow-methods>

+ 0 - 13
frameworks/C++/ffead-cpp/te-benchmark-um-pq/config/cache.xml

@@ -1,13 +0,0 @@
-<caches>
-        <cache>
-                <nodes>
-                        <node>
-                                <username>sumeet</username>
-                                <password>sumeet</password>
-                        </node>
-                </nodes>
-                <init>TeBkUmLpqRouter.updateCache</init>
-                <name>Memory-Cached</name>
-                <type>memory</type>
-        </cache>
-</caches>

+ 18 - 10
frameworks/C++/ffead-cpp/te-benchmark-um-pq/include/TeBkUmLpq.h

@@ -24,6 +24,7 @@
 #define WEB_TE_BENCHMARK_UM_INCLUDE_TeBkUmLpq_H_
 #define WEB_TE_BENCHMARK_UM_INCLUDE_TeBkUmLpq_H_
 #include "TemplateHandler.h"
 #include "TemplateHandler.h"
 #include "vector"
 #include "vector"
+#include "list"
 #ifndef OS_MINGW
 #ifndef OS_MINGW
 #include <netinet/in.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <arpa/inet.h>
@@ -32,7 +33,6 @@
 #include <stdlib.h>
 #include <stdlib.h>
 #include <algorithm>
 #include <algorithm>
 #include "CryptoHandler.h"
 #include "CryptoHandler.h"
-#include "vector"
 #include "CastUtil.h"
 #include "CastUtil.h"
 #include <stdlib.h>
 #include <stdlib.h>
 #include "CacheManager.h"
 #include "CacheManager.h"
@@ -42,13 +42,14 @@
 #include "string"
 #include "string"
 #include "yuarel.h"
 #include "yuarel.h"
 #include "Router.h"
 #include "Router.h"
-
-typedef void (*TeBkUmLpqTemplatePtr) (Context*, std::string&);
+#include "Reflector.h"
 
 
 class TeBkUmLpqWorld {
 class TeBkUmLpqWorld {
 	int id;
 	int id;
 	int randomNumber;
 	int randomNumber;
 public:
 public:
+	TeBkUmLpqWorld(int id);
+	TeBkUmLpqWorld(int id, int randomNumber);
 	TeBkUmLpqWorld();
 	TeBkUmLpqWorld();
 	virtual ~TeBkUmLpqWorld();
 	virtual ~TeBkUmLpqWorld();
 	int getId() const;
 	int getId() const;
@@ -66,20 +67,24 @@ struct UpdQrData {
 
 
 class TeBkUmLpqFortune {
 class TeBkUmLpqFortune {
 	int id;
 	int id;
-	std::string message;
 public:
 public:
+	std::string message_i;
+	std::string_view message;
+	bool allocd;
+	TeBkUmLpqFortune(int id);
+	TeBkUmLpqFortune(int id, std::string message);
 	TeBkUmLpqFortune();
 	TeBkUmLpqFortune();
 	virtual ~TeBkUmLpqFortune();
 	virtual ~TeBkUmLpqFortune();
 	int getId() const;
 	int getId() const;
 	void setId(int id);
 	void setId(int id);
-	const std::string& getMessage() const;
-	void setMessage(const std::string& message);
 	bool operator < (const TeBkUmLpqFortune& other) const;
 	bool operator < (const TeBkUmLpqFortune& other) const;
 };
 };
 
 
 class TeBkUmLpqMessage {
 class TeBkUmLpqMessage {
 	std::string message;
 	std::string message;
 public:
 public:
+	TeBkUmLpqMessage();
+	TeBkUmLpqMessage(std::string message);
 	virtual ~TeBkUmLpqMessage();
 	virtual ~TeBkUmLpqMessage();
 	const std::string& getMessage() const;
 	const std::string& getMessage() const;
 	void setMessage(const std::string& message);
 	void setMessage(const std::string& message);
@@ -92,8 +97,11 @@ class TeBkUmLpqRouter : public Router {
 	static std::string WORLD_ALL_QUERY;
 	static std::string WORLD_ALL_QUERY;
 	static std::string FORTUNE_ALL_QUERY;
 	static std::string FORTUNE_ALL_QUERY;
 
 
-	static std::string APP_NAME;
-	static std::string TPE_FN_NAME;
+	static TemplatePtr tmplFunc;
+
+	static Ser m_ser;
+	static Ser w_ser;
+	static SerCont wcont_ser;
 
 
 	static bool strToNum(const char* str, int len, int& ret);
 	static bool strToNum(const char* str, int len, int& ret);
 
 
@@ -112,7 +120,7 @@ class TeBkUmLpqRouter : public Router {
 	void cachedWorlds(const char*, int, std::vector<TeBkUmLpqWorld>&);
 	void cachedWorlds(const char*, int, std::vector<TeBkUmLpqWorld>&);
 	static void updateCacheUtil(void* ctx, int rn, std::vector<LibpqRes>& data);
 	static void updateCacheUtil(void* ctx, int rn, std::vector<LibpqRes>& data);
 
 
-	void getContext(HttpRequest* request, Context* context);
+	void handleTemplate(HttpResponse* res);
 	static void getContextUtil(void* ctx, int, int, char *, int);
 	static void getContextUtil(void* ctx, int, int, char *, int);
 
 
 	std::map<int, std::string> _qC;
 	std::map<int, std::string> _qC;
@@ -124,7 +132,7 @@ public:
 	TeBkUmLpqRouter();
 	TeBkUmLpqRouter();
 	virtual ~TeBkUmLpqRouter();
 	virtual ~TeBkUmLpqRouter();
 	void updateCache();
 	void updateCache();
-	bool route(HttpRequest* req, HttpResponse* res, void* dlib, void* ddlib, SocketInterface* sif);
+	bool route(HttpRequest* req, HttpResponse* res, SocketInterface* sif);
 };
 };
 
 
 #endif /* WEB_TE_BENCHMARK_UM_INCLUDE_TeBkUmLpq_H_ */
 #endif /* WEB_TE_BENCHMARK_UM_INCLUDE_TeBkUmLpq_H_ */

+ 15 - 0
frameworks/C++/ffead-cpp/te-benchmark-um-pq/meson.build

@@ -0,0 +1,15 @@
+
+module_includes = ['/usr/local/include','../../src/modules/common','../../src/modules/cache','../../src/modules/cache/memory','../../src/modules/cache/redis',
+	'../../src/modules/cache/memcached','../../src/modules/client-util','../../src/modules/http','../../src/modules/http/http11','../../src/modules/http/http20',
+	'../../src/modules/ioc','../../src/modules/jobs','../../src/modules/reflection','../../src/modules/sdorm','../../src/modules/sdorm/sql','../../src/modules/sdorm/sql/libpq',
+	'../../src/modules/client-util/ssl','../../src/modules/sdorm/mongo','../../src/modules/sdorm/mongo/raw','../../src/modules/search','../../src/modules/serialization',
+	'../../src/modules/serialization/xml','../../src/modules/serialization/json','../../src/modules/server-util','../../src/modules/ssl','../../src/modules/threads',
+	'../../src/framework','include']
+module_includes += global_includes
+module_libs = [global_libs]
+
+c = run_command(meson_grabber, 'src/')
+module_sources = c.stdout().strip().split('\n')
+
+shared_library('te-benchmark-um-pq', module_sources, include_directories: module_includes, dependencies: module_libs, link_with: [libffeadmodules, libffeadframework],
+	install: true, install_dir: bin_dir+'/lib')

+ 122 - 110
frameworks/C++/ffead-cpp/te-benchmark-um-pq/src/TeBkUmLpq.cpp

@@ -37,6 +37,16 @@ void TeBkUmLpqWorld::setRandomNumber(int randomNumber) {
 	this->randomNumber = randomNumber;
 	this->randomNumber = randomNumber;
 }
 }
 
 
+TeBkUmLpqWorld::TeBkUmLpqWorld(int id) {
+	this->id = id;
+	randomNumber = 0;
+}
+
+TeBkUmLpqWorld::TeBkUmLpqWorld(int id, int randomNumber) {
+	this->id = id;
+	this->randomNumber = randomNumber;
+}
+
 TeBkUmLpqWorld::TeBkUmLpqWorld() {
 TeBkUmLpqWorld::TeBkUmLpqWorld() {
 	id = 0;
 	id = 0;
 	randomNumber = 0;
 	randomNumber = 0;
@@ -53,25 +63,40 @@ void TeBkUmLpqFortune::setId(int id) {
 	this->id = id;
 	this->id = id;
 }
 }
 
 
-const std::string& TeBkUmLpqFortune::getMessage() const {
-	return message;
+TeBkUmLpqFortune::TeBkUmLpqFortune(int id) {
+	this->id = id;
+	allocd = false;
 }
 }
 
 
-void TeBkUmLpqFortune::setMessage(const std::string& message) {
-	this->message = message;
+TeBkUmLpqFortune::TeBkUmLpqFortune(int id, std::string message) {
+	this->id = id;
+	this->message_i = message;
+	this->message = std::string_view(this->message_i);
+	allocd = false;
 }
 }
 
 
 TeBkUmLpqFortune::TeBkUmLpqFortune() {
 TeBkUmLpqFortune::TeBkUmLpqFortune() {
 	id = 0;
 	id = 0;
+	allocd = false;
 }
 }
 
 
 TeBkUmLpqFortune::~TeBkUmLpqFortune() {
 TeBkUmLpqFortune::~TeBkUmLpqFortune() {
+	if(allocd && message.size()>0) {
+		free((void *)message.data());
+	}
 }
 }
 
 
 bool TeBkUmLpqFortune::operator < (const TeBkUmLpqFortune& other) const {
 bool TeBkUmLpqFortune::operator < (const TeBkUmLpqFortune& other) const {
 	return message.compare(other.message)<0;
 	return message.compare(other.message)<0;
 }
 }
 
 
+TeBkUmLpqMessage::TeBkUmLpqMessage() {
+}
+
+TeBkUmLpqMessage::TeBkUmLpqMessage(std::string message) {
+	this->message = message;
+}
+
 TeBkUmLpqMessage::~TeBkUmLpqMessage() {
 TeBkUmLpqMessage::~TeBkUmLpqMessage() {
 }
 }
 
 
@@ -93,9 +118,9 @@ void TeBkUmLpqRouter::db(TeBkUmLpqWorld& w) {
 	LibpqDataSourceImpl* sqli = getDb();
 	LibpqDataSourceImpl* sqli = getDb();
 	int rid = rand() % 10000 + 1;
 	int rid = rand() % 10000 + 1;
 	try {
 	try {
-		std::vector<LibpqParam> pars;
-		LibpqDataSourceImpl::ADD_INT4(pars, rid);
-		sqli->executeQuery(WORLD_ONE_QUERY, pars, &w, &TeBkUmLpqRouter::dbUtil);
+		LibpqParams<1> pars;
+		pars.int4(rid);
+		sqli->executeQuery(WORLD_ONE_QUERY, &pars, &w, &TeBkUmLpqRouter::dbUtil);
 	} catch(const std::exception& e) {
 	} catch(const std::exception& e) {
 		throw e;
 		throw e;
 	}
 	}
@@ -106,26 +131,28 @@ void TeBkUmLpqRouter::dbUtil(void* ctx, int rn, int cn, char * d) {
 	if(cn==1)w->setRandomNumber(ntohl(*((uint32_t *) d)));
 	if(cn==1)w->setRandomNumber(ntohl(*((uint32_t *) d)));
 }
 }
 
 
-
 void TeBkUmLpqRouter::queries(const char* q, int ql, std::vector<TeBkUmLpqWorld>& wlst) {
 void TeBkUmLpqRouter::queries(const char* q, int ql, std::vector<TeBkUmLpqWorld>& wlst) {
 	int queryCount = 0;
 	int queryCount = 0;
 	strToNum(q, ql, queryCount);
 	strToNum(q, ql, queryCount);
 	if(queryCount<1)queryCount=1;
 	if(queryCount<1)queryCount=1;
 	else if(queryCount>500)queryCount=500;
 	else if(queryCount>500)queryCount=500;
 
 
+	wlst.reserve(queryCount);
+
 	LibpqDataSourceImpl* sqli = getDb();
 	LibpqDataSourceImpl* sqli = getDb();
 
 
+	LibpqParamsBase* pars = sqli->getParams(queryCount);
 	try {
 	try {
-		TeBkUmLpqWorld w;
-		std::vector<LibpqParam> pars;
 		for (int c = 0; c < queryCount; ++c) {
 		for (int c = 0; c < queryCount; ++c) {
 			int rid = rand() % 10000 + 1;
 			int rid = rand() % 10000 + 1;
-			pars.clear();
-			LibpqDataSourceImpl::ADD_INT4(pars, rid);
+			pars->int4(rid);
+			wlst.emplace_back();
+			TeBkUmLpqWorld& w = wlst.back();
 			sqli->executeQuery(WORLD_ONE_QUERY, pars, &w, &TeBkUmLpqRouter::dbUtil);
 			sqli->executeQuery(WORLD_ONE_QUERY, pars, &w, &TeBkUmLpqRouter::dbUtil);
-			wlst.push_back(w);
 		}
 		}
+		delete pars;
 	} catch(const std::exception& e) {
 	} catch(const std::exception& e) {
+		delete pars;
 		throw e;
 		throw e;
 	}
 	}
 }
 }
@@ -137,6 +164,8 @@ void TeBkUmLpqRouter::queriesMulti(const char* q, int ql, std::vector<TeBkUmLpqW
 	if(queryCount<1)queryCount=1;
 	if(queryCount<1)queryCount=1;
 	else if(queryCount>500)queryCount=500;
 	else if(queryCount>500)queryCount=500;
 
 
+	wlst.reserve(queryCount);
+
 	LibpqDataSourceImpl* sqli = getDb();
 	LibpqDataSourceImpl* sqli = getDb();
 
 
 	UpdQrData updt;
 	UpdQrData updt;
@@ -161,14 +190,13 @@ void TeBkUmLpqRouter::queriesMulti(const char* q, int ql, std::vector<TeBkUmLpqW
 }
 }
 void TeBkUmLpqRouter::queriesMultiUtil(void* ctx, int rn, int cn, char * d, int l) {
 void TeBkUmLpqRouter::queriesMultiUtil(void* ctx, int rn, int cn, char * d, int l) {
 	std::vector<TeBkUmLpqWorld>* wlst = (std::vector<TeBkUmLpqWorld>*)ctx;
 	std::vector<TeBkUmLpqWorld>* wlst = (std::vector<TeBkUmLpqWorld>*)ctx;
-	if(cn==0) {
-		wlst->push_back(TeBkUmLpqWorld());
-	}
-	TeBkUmLpqWorld& w = wlst->at(wlst->size()-1);
 	int tmp = 0;
 	int tmp = 0;
 	strToNum(d, l, tmp);
 	strToNum(d, l, tmp);
-	if(cn==0)w.setId(tmp);
-	if(cn==1)w.setRandomNumber(tmp);
+	if(cn==0) {
+		wlst->emplace_back(tmp);
+	} else {
+		wlst->back().setRandomNumber(tmp);
+	}
 }
 }
 
 
 std::string& TeBkUmLpqRouter::getUpdQuery(int count) {
 std::string& TeBkUmLpqRouter::getUpdQuery(int count) {
@@ -204,23 +232,23 @@ void TeBkUmLpqRouter::updates(const char* q, int ql, std::vector<TeBkUmLpqWorld>
 	if(queryCount<1)queryCount=1;
 	if(queryCount<1)queryCount=1;
 	else if(queryCount>500)queryCount=500;
 	else if(queryCount>500)queryCount=500;
 
 
+	wlst.reserve(queryCount);
+
 	LibpqDataSourceImpl* sqli = getDb();
 	LibpqDataSourceImpl* sqli = getDb();
 
 
+	LibpqParamsBase* pars = sqli->getParams(queryCount*3);
 	try {
 	try {
-		std::vector<LibpqParam> pars;
-		std::vector<LibpqParam> qp;
-
 		std::string& query = getUpdQuery(queryCount);
 		std::string& query = getUpdQuery(queryCount);
 
 
 		for (int c = 0; c < queryCount; ++c) {
 		for (int c = 0; c < queryCount; ++c) {
 			int rid = rand() % 10000 + 1;
 			int rid = rand() % 10000 + 1;
-			qp.clear();
-			LibpqDataSourceImpl::ADD_INT4(qp, rid);
-			TeBkUmLpqWorld w;
-			sqli->executeQuery(WORLD_ONE_QUERY, qp, &w, &TeBkUmLpqRouter::dbUtil);
-			wlst.push_back(w);
+			LibpqParams<1> qp;
+			qp.int4(rid);
+			wlst.emplace_back();
+			TeBkUmLpqWorld& w = wlst.back();
+			sqli->executeQuery(WORLD_ONE_QUERY, &qp, &w, &TeBkUmLpqRouter::dbUtil);
 
 
-			LibpqDataSourceImpl::ADD_INT4(pars, w.getId());
+			pars->int4(w.getId());
 
 
 			int newRandomNumber = rand() % 10000 + 1;
 			int newRandomNumber = rand() % 10000 + 1;
 			if(w.getRandomNumber() == newRandomNumber) {
 			if(w.getRandomNumber() == newRandomNumber) {
@@ -229,17 +257,19 @@ void TeBkUmLpqRouter::updates(const char* q, int ql, std::vector<TeBkUmLpqWorld>
 					newRandomNumber = 1;
 					newRandomNumber = 1;
 				}
 				}
 			}
 			}
-			LibpqDataSourceImpl::ADD_INT4(pars, newRandomNumber);
+			pars->int4(newRandomNumber);
 			w.setRandomNumber(newRandomNumber);
 			w.setRandomNumber(newRandomNumber);
 		}
 		}
-		for (int c = 0; c < queryCount; ++c) {
-			LibpqDataSourceImpl::ADD_INT4(pars, wlst.at(c).getId());
+		for(std::vector<TeBkUmLpqWorld>::iterator it=wlst.begin(); it != wlst.end(); ++it) {
+			pars->int4((*it).getId());
 		}
 		}
 		
 		
 		sqli->begin();
 		sqli->begin();
 		sqli->executeUpdateQuery(query, pars);
 		sqli->executeUpdateQuery(query, pars);
 		sqli->commit();
 		sqli->commit();
+		delete pars;
 	} catch(const std::exception& e) {
 	} catch(const std::exception& e) {
+		delete pars;
 		sqli->rollback();
 		sqli->rollback();
 		throw e;
 		throw e;
 	}
 	}
@@ -251,6 +281,8 @@ void TeBkUmLpqRouter::updatesMulti(const char* q, int ql, std::vector<TeBkUmLpqW
 	if(queryCount<1)queryCount=1;
 	if(queryCount<1)queryCount=1;
 	else if(queryCount>500)queryCount=500;
 	else if(queryCount>500)queryCount=500;
 
 
+	wlst.reserve(queryCount);
+
 	LibpqDataSourceImpl* sqli = getDb();
 	LibpqDataSourceImpl* sqli = getDb();
 
 
 	try {
 	try {
@@ -288,14 +320,12 @@ void TeBkUmLpqRouter::updatesMulti(const char* q, int ql, std::vector<TeBkUmLpqW
 void TeBkUmLpqRouter::updatesMultiUtil(void* ctx, int rn, int cn, char * d, int l) {
 void TeBkUmLpqRouter::updatesMultiUtil(void* ctx, int rn, int cn, char * d, int l) {
 	UpdQrData* updt = (UpdQrData*)ctx;
 	UpdQrData* updt = (UpdQrData*)ctx;
 	std::stringstream* ss = updt->ss;
 	std::stringstream* ss = updt->ss;
-	if(cn==0) {
-		updt->wlist->push_back(TeBkUmLpqWorld());
-	}
-	TeBkUmLpqWorld& w = updt->wlist->at(updt->wlist->size()-1);
 	int tmp = 0;
 	int tmp = 0;
 	strToNum(d, l, tmp);
 	strToNum(d, l, tmp);
-	if(cn==0)w.setId(tmp);
-	else {
+	if(cn==0) {
+		updt->wlist->emplace_back(tmp);
+	} else {
+		TeBkUmLpqWorld& w = updt->wlist->back();
 		int newRandomNumber = rand() % 10000 + 1;
 		int newRandomNumber = rand() % 10000 + 1;
 		if(tmp == newRandomNumber) {
 		if(tmp == newRandomNumber) {
 			newRandomNumber += 1;
 			newRandomNumber += 1;
@@ -320,14 +350,12 @@ void TeBkUmLpqRouter::updateCache() {
 
 
 	try {
 	try {
 		std::vector<TeBkUmLpqWorld> wlist;
 		std::vector<TeBkUmLpqWorld> wlist;
-		std::vector<LibpqParam> pars;
-		sqli->executeQuery(WORLD_ALL_QUERY, pars, &wlist, &TeBkUmLpqRouter::updateCacheUtil);
+		sqli->executeQuery(WORLD_ALL_QUERY, NULL, &wlist, &TeBkUmLpqRouter::updateCacheUtil);
 
 
-		for (int c = 0; c < (int)wlist.size(); ++c) {
-			TeBkUmLpqWorld& w = wlist.at(c);
+		for(std::vector<TeBkUmLpqWorld>::iterator it=wlist.begin(); it != wlist.end(); ++it) {
 			char str[12];
 			char str[12];
-			sprintf(str, "%d;%d", w.getId(), w.getRandomNumber());
-			cchi->setRaw(CastUtil::fromNumber(w.getId()), str);
+			sprintf(str, "%d;%d", (*it).getId(), (*it).getRandomNumber());
+			cchi->setRaw(CastUtil::fromNumber((*it).getId()), str);
 		}
 		}
 		CacheManager::cleanImpl(cchi);
 		CacheManager::cleanImpl(cchi);
 		CacheManager::triggerAppInitCompletion();
 		CacheManager::triggerAppInitCompletion();
@@ -338,10 +366,7 @@ void TeBkUmLpqRouter::updateCache() {
 }
 }
 void TeBkUmLpqRouter::updateCacheUtil(void* ctx, int rn, std::vector<LibpqRes>& data) {
 void TeBkUmLpqRouter::updateCacheUtil(void* ctx, int rn, std::vector<LibpqRes>& data) {
 	std::vector<TeBkUmLpqWorld>* wlist = (std::vector<TeBkUmLpqWorld>*)ctx;
 	std::vector<TeBkUmLpqWorld>* wlist = (std::vector<TeBkUmLpqWorld>*)ctx;
-	TeBkUmLpqWorld w;
-	w.setId(ntohl(*((uint32_t *) data.at(0).d)));
-	w.setRandomNumber(ntohl(*((uint32_t *) data.at(1).d)));
-	wlist->push_back(w);
+	wlist->emplace_back(ntohl(*((uint32_t *) data.at(0).d)), ntohl(*((uint32_t *) data.at(1).d)));
 }
 }
 
 
 void TeBkUmLpqRouter::cachedWorlds(const char* q, int ql, std::vector<TeBkUmLpqWorld>& wlst) {
 void TeBkUmLpqRouter::cachedWorlds(const char* q, int ql, std::vector<TeBkUmLpqWorld>& wlst) {
@@ -350,25 +375,25 @@ void TeBkUmLpqRouter::cachedWorlds(const char* q, int ql, std::vector<TeBkUmLpqW
 	if(queryCount<1)queryCount=1;
 	if(queryCount<1)queryCount=1;
 	else if(queryCount>500)queryCount=500;
 	else if(queryCount>500)queryCount=500;
 
 
+	wlst.reserve(queryCount);
+
 	CacheInterface* cchi = CacheManager::getImpl();
 	CacheInterface* cchi = CacheManager::getImpl();
 
 
 	try {
 	try {
 		std::vector<std::string> keys, values;
 		std::vector<std::string> keys, values;
 		for (int c = 0; c < queryCount; ++c) {
 		for (int c = 0; c < queryCount; ++c) {
 			int rid = rand() % 10000 + 1;
 			int rid = rand() % 10000 + 1;
-			keys.push_back(CastUtil::fromNumber(rid));
+			keys.emplace_back(CastUtil::fromNumber(rid));
 		}
 		}
 		cchi->mgetRaw(keys, values);
 		cchi->mgetRaw(keys, values);
 		for (int c = 0; c < queryCount; ++c) {
 		for (int c = 0; c < queryCount; ++c) {
-			TeBkUmLpqWorld w;
 			std::string& v = values.at(c);
 			std::string& v = values.at(c);
 			size_t fn = v.find(";");
 			size_t fn = v.find(";");
 			int tmp = 0;
 			int tmp = 0;
 			strToNum(v.substr(0, fn).c_str(), fn, tmp);
 			strToNum(v.substr(0, fn).c_str(), fn, tmp);
-			w.setId(tmp);
-			strToNum(v.substr(fn+1).c_str(), v.length()-fn-1, tmp);
-			w.setRandomNumber(tmp);
-			wlst.push_back(w);
+			int tmp1 = 0;
+			strToNum(v.substr(fn+1).c_str(), v.length()-fn-1, tmp1);
+			wlst.emplace_back(tmp, tmp1);
 		}
 		}
 		CacheManager::cleanImpl(cchi);
 		CacheManager::cleanImpl(cchi);
 	} catch(const std::exception& e) {
 	} catch(const std::exception& e) {
@@ -377,40 +402,38 @@ void TeBkUmLpqRouter::cachedWorlds(const char* q, int ql, std::vector<TeBkUmLpqW
 	}
 	}
 }
 }
 
 
-void TeBkUmLpqRouter::getContext(HttpRequest* request, Context* context) {
+void TeBkUmLpqRouter::handleTemplate(HttpResponse* res) {
 	LibpqDataSourceImpl* sqli = getDb();
 	LibpqDataSourceImpl* sqli = getDb();
 
 
 	try {
 	try {
-		std::vector<TeBkUmLpqFortune>* flst = new std::vector<TeBkUmLpqFortune>;
-		std::vector<LibpqParam> pars;
-		sqli->executeQuery(FORTUNE_ALL_QUERY, pars, flst, &TeBkUmLpqRouter::getContextUtil);
+		Context ctx;
+		std::list<TeBkUmLpqFortune> flst;
+		sqli->executeQuery(FORTUNE_ALL_QUERY, NULL, &flst, &TeBkUmLpqRouter::getContextUtil);
 
 
-		TeBkUmLpqFortune nf;
-		nf.setId(0);
-		nf.setMessage("Additional fortune added at request time.");
-		flst->push_back(nf);
-		std::sort (flst->begin(), flst->end());
+		flst.emplace_back(0, "Additional fortune added at request time.");
+		flst.sort();
 
 
-		context->insert(std::pair<std::string, void*>("fortunes", flst));
+		ctx.insert(std::pair<std::string, void*>("fortunes", &flst));
+
+		fcpstream str;
+		tmplFunc(&ctx, str);
+		res->setContent(str.str());
+		res->setContentType(ContentTypes::CONTENT_TYPE_TEXT_SHTML);
+		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 	} catch(...) {
 	} catch(...) {
 		throw;
 		throw;
 	}
 	}
 }
 }
 void TeBkUmLpqRouter::getContextUtil(void* ctx, int rn, int cn, char * d, int l) {
 void TeBkUmLpqRouter::getContextUtil(void* ctx, int rn, int cn, char * d, int l) {
-	std::vector<TeBkUmLpqFortune>* flst = (std::vector<TeBkUmLpqFortune>*)ctx;
+	std::list<TeBkUmLpqFortune>* flst = (std::list<TeBkUmLpqFortune>*)ctx;
 	if(cn==0) {
 	if(cn==0) {
-		flst->push_back(TeBkUmLpqFortune());
-	}
-	TeBkUmLpqFortune& w = flst->at(flst->size()-1);
-	if(cn==0)w.setId(ntohl(*((uint32_t *) d)));
-	else {
-		std::string nm = std::string(d, l);
-		CryptoHandler::sanitizeHtml(nm);
-		w.setMessage(nm);
+		flst->emplace_back(ntohl(*((uint32_t *) d)));
+	} else {
+		TeBkUmLpqFortune& w = flst->back();
+		w.message = CryptoHandler::sanitizeHtmlFast((const uint8_t *)d, (size_t)l, w.message_i, w.allocd);
 	}
 	}
 }
 }
 
 
-
 //https://stackoverflow.com/questions/9631225/convert-strings-specified-by-length-not-nul-terminated-to-int-float
 //https://stackoverflow.com/questions/9631225/convert-strings-specified-by-length-not-nul-terminated-to-int-float
 bool TeBkUmLpqRouter::strToNum(const char* str, int len, int& ret) {
 bool TeBkUmLpqRouter::strToNum(const char* str, int len, int& ret) {
     ret = 0;
     ret = 0;
@@ -422,76 +445,63 @@ bool TeBkUmLpqRouter::strToNum(const char* str, int len, int& ret) {
     return true;
     return true;
 }
 }
 
 
-bool TeBkUmLpqRouter::route(HttpRequest* req, HttpResponse* res, void* dlib, void* ddlib, SocketInterface* sif) {
-	std::string_view path = req->getPath();
-	if(StringUtil::endsWith(path, "/plaintext")) {
+bool TeBkUmLpqRouter::route(HttpRequest* req, HttpResponse* res, SocketInterface* sif) {
+	if(StringUtil::endsWith(req->getPath(), "/plaintext")) {
 		res->setContent(HELLO_WORLD);
 		res->setContent(HELLO_WORLD);
 		res->setContentType(ContentTypes::CONTENT_TYPE_TEXT_PLAIN);
 		res->setContentType(ContentTypes::CONTENT_TYPE_TEXT_PLAIN);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-	} else if(StringUtil::endsWith(path, "/json")) {
+	} else if(StringUtil::endsWith(req->getPath(), "/json")) {
 		TeBkUmLpqMessage msg;
 		TeBkUmLpqMessage msg;
 		msg.setMessage(HELLO_WORLD);
 		msg.setMessage(HELLO_WORLD);
-		JSONSerialize::serializeUnknown(&msg, 0, "TeBkUmLpqMessage", res->getContentP());
+		JSONSerialize::serializeObject(&msg, m_ser, res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-	} else if(StringUtil::endsWith(path, "/db")) {
+	} else if(StringUtil::endsWith(req->getPath(), "/db")) {
 		TeBkUmLpqWorld msg;
 		TeBkUmLpqWorld msg;
 		db(msg);
 		db(msg);
-		JSONSerialize::serializeUnknown(&msg, 0, "TeBkUmLpqWorld", res->getContentP());
+		JSONSerialize::serializeObject(&msg, w_ser, res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-	} else if(StringUtil::endsWith(path, "/queries_old")) {
+	} else if(StringUtil::endsWith(req->getPath(), "/queries_old")) {
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		std::vector<TeBkUmLpqWorld> msg;
 		std::vector<TeBkUmLpqWorld> msg;
 		queries(params[0].val, params[0].val_len, msg);
 		queries(params[0].val, params[0].val_len, msg);
-		JSONSerialize::serializeUnknown(&msg, 100, "std::vector<TeBkUmLpqWorld>", res->getContentP());
+		JSONSerialize::serializeObjectCont(&msg, wcont_ser, "vector", res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-	} else if(StringUtil::endsWith(path, "/queries")) {
+	} else if(StringUtil::endsWith(req->getPath(), "/queries")) {
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		std::vector<TeBkUmLpqWorld> msg;
 		std::vector<TeBkUmLpqWorld> msg;
 		queriesMulti(params[0].val, params[0].val_len, msg);
 		queriesMulti(params[0].val, params[0].val_len, msg);
-		JSONSerialize::serializeUnknown(&msg, 100, "std::vector<TeBkUmLpqWorld>", res->getContentP());
+		JSONSerialize::serializeObjectCont(&msg, wcont_ser, "vector", res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-	} else if(StringUtil::endsWith(path, "/fortunes")) {
-		Context ctx;
-		getContext(req, &ctx);
-
-		void* mkr = dlsym(ddlib, TPE_FN_NAME.c_str());
-		if(mkr!=NULL)
-		{
-			TeBkUmLpqTemplatePtr f =  (TeBkUmLpqTemplatePtr)mkr;
-			std::string msg;
-			f(&ctx, msg);
-			res->setContent(msg);
-			res->setContentType(ContentTypes::CONTENT_TYPE_TEXT_SHTML);
-			res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-		}
-	} else if(StringUtil::endsWith(path, "/bupdates")) {
+	} else if(StringUtil::endsWith(req->getPath(), "/fortunes")) {
+		handleTemplate(res);
+	} else if(StringUtil::endsWith(req->getPath(), "/bupdates")) {
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		std::vector<TeBkUmLpqWorld> msg;
 		std::vector<TeBkUmLpqWorld> msg;
 		updates(params[0].val, params[0].val_len, msg);
 		updates(params[0].val, params[0].val_len, msg);
-		JSONSerialize::serializeUnknown(&msg, 100, "std::vector<TeBkUmLpqWorld>", res->getContentP());
+		JSONSerialize::serializeObjectCont(&msg, wcont_ser, "vector", res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-	} else if(StringUtil::endsWith(path, "/updates")) {
+	} else if(StringUtil::endsWith(req->getPath(), "/updates")) {
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		std::vector<TeBkUmLpqWorld> msg;
 		std::vector<TeBkUmLpqWorld> msg;
 		updatesMulti(params[0].val, params[0].val_len, msg);
 		updatesMulti(params[0].val, params[0].val_len, msg);
-		JSONSerialize::serializeUnknown(&msg, 100, "std::vector<TeBkUmLpqWorld>", res->getContentP());
+		JSONSerialize::serializeObjectCont(&msg, wcont_ser, "vector", res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-	} else if(StringUtil::endsWith(path, "/cached-worlds")) {
+	} else if(StringUtil::endsWith(req->getPath(), "/cached-worlds")) {
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		std::vector<TeBkUmLpqWorld> msg;
 		std::vector<TeBkUmLpqWorld> msg;
 		cachedWorlds(params[0].val, params[0].val_len, msg);
 		cachedWorlds(params[0].val, params[0].val_len, msg);
-		JSONSerialize::serializeUnknown(&msg, 100, "std::vector<TeBkUmLpqWorld>", res->getContentP());
+		JSONSerialize::serializeObjectCont(&msg, wcont_ser, "vector", res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 	} else {
 	} else {
@@ -501,15 +511,17 @@ bool TeBkUmLpqRouter::route(HttpRequest* req, HttpResponse* res, void* dlib, voi
 	return true;
 	return true;
 }
 }
 
 
-std::string TeBkUmLpqRouter::APP_NAME = "";
-std::string TeBkUmLpqRouter::TPE_FN_NAME = "";
+TemplatePtr TeBkUmLpqRouter::tmplFunc;
+Ser TeBkUmLpqRouter::m_ser;
+Ser TeBkUmLpqRouter::w_ser;
+SerCont TeBkUmLpqRouter::wcont_ser;
 
 
 TeBkUmLpqRouter::TeBkUmLpqRouter() {
 TeBkUmLpqRouter::TeBkUmLpqRouter() {
 	sqli = NULL;
 	sqli = NULL;
-	if(APP_NAME=="") {
-		APP_NAME = CommonUtils::normalizeAppName("te-benchmark-um-pq");
-		TPE_FN_NAME = CommonUtils::getTpeFnName("tpe/fortunes.tpe", "te-benchmark-um-pq");
-	}
+	tmplFunc = TemplateUtil::getTemplateFunc("te-benchmark-um-pq", "tpe/fortunes.tpe");
+	m_ser = Serializer::getSerFuncForObject("te-benchmark-um-pq", "TeBkUmLpqMessage");
+	w_ser = Serializer::getSerFuncForObject("te-benchmark-um-pq", "TeBkUmLpqWorld");
+	wcont_ser = Serializer::getSerFuncForObjectCont("te-benchmark-um-pq", "TeBkUmLpqWorld", "std::vector");
 }
 }
 
 
 TeBkUmLpqRouter::~TeBkUmLpqRouter() {
 TeBkUmLpqRouter::~TeBkUmLpqRouter() {

+ 1 - 1
frameworks/C++/ffead-cpp/te-benchmark-um-pq/src/autotools/Makefile.am

@@ -8,7 +8,7 @@ distdir=${PACKAGE_NAME}-${PACKAGE_VERSION}-src
 fprefix=../../../../${packageIdentifier}
 fprefix=../../../../${packageIdentifier}
 prefix=${abs_builddir}
 prefix=${abs_builddir}
 
 
-lib_LTLIBRARIES = libte_benchmark_um_pq.la
+lib_LTLIBRARIES = libte-benchmark-um-pq.la
 libte_benchmark_um_pq_la_SOURCES = ../TeBkUmLpq.cpp
 libte_benchmark_um_pq_la_SOURCES = ../TeBkUmLpq.cpp
 
 
 libte_benchmark_um_pq_la_LDFLAGS = -no-undefined 
 libte_benchmark_um_pq_la_LDFLAGS = -no-undefined 

+ 3 - 3
frameworks/C++/ffead-cpp/te-benchmark-um-pq/tpe/fortunes.tpe

@@ -1,12 +1,12 @@
-#declare std::vector<TeBkUmLpqFortune> fortunes#
+#declareref std::list<TeBkUmLpqFortune>* fortunes#
 <!DOCTYPE html>
 <!DOCTYPE html>
 <html>
 <html>
 <head><title>Fortunes</title></head>
 <head><title>Fortunes</title></head>
 <body>
 <body>
 <table>
 <table>
 <tr><th>id</th><th>message</th></tr>
 <tr><th>id</th><th>message</th></tr>
-#for(int i=0;i<(int)fortunes.size();i++)#
-<tr><td>$_S{fortunes.at(i).getId()}</td><td>${fortunes.at(i).getMessage()}</td></tr>
+#for(std::list<TeBkUmLpqFortune>::iterator it=fortunes->begin(); it != fortunes->end(); ++it)#
+<tr><td>${(*it).getId()}</td><td>${(*it).message}</td></tr>
 #rof#
 #rof#
 </table>
 </table>
 </body>
 </body>

+ 12 - 0
frameworks/C++/ffead-cpp/te-benchmark-um-pq/xmake.lua

@@ -0,0 +1,12 @@
+add_includedirs("include/")
+
+local bindir = "$(projectdir)/ffead-cpp-6.0-bin"
+
+target("te-benchmark-um-pq")
+	set_languages("c++17")
+	add_deps("ffead-framework")
+	add_options(getOptions())
+	set_kind("shared")
+	on_load(setIncludes)
+	add_files("src/*.cpp")
+	set_installdir(bindir)

+ 6 - 3
frameworks/C++/ffead-cpp/te-benchmark-um/CMakeLists.txt

@@ -5,6 +5,9 @@ file(GLOB sources
 )
 )
 
 
 include_directories("${CMAKE_SOURCE_DIR}/web/te-benchmark-um/include")
 include_directories("${CMAKE_SOURCE_DIR}/web/te-benchmark-um/include")
-add_library(te_benchmark_um SHARED ${sources})
-set_property(TARGET te_benchmark_um PROPERTY POSITION_INDEPENDENT_CODE ON)
-target_link_libraries(te_benchmark_um ffead-modules ffead-framework ${HAVE_CURLLIB} ${HAVE_SSLLIB} ${HAVE_MEMCACHEDLIB} ${HAVE_ODBCLIB} ${HAVE_MONGOCLIB} ${HAVE_BSONLIB} ${HAVE_ZLIB} ${HAVE_CRYPTOLIB})
+if(BUILD_STATIC_LIBS OR EMSCRIPTEN)
+	add_library(te-benchmark-um STATIC ${sources})
+else()
+	add_library(te-benchmark-um ${sources})
+endif()
+target_link_libraries(te-benchmark-um ffead-modules ffead-framework ${HAVE_CURLLIB} ${HAVE_SSLLIB} ${HAVE_MEMCACHEDLIB} ${HAVE_ODBCLIB} ${HAVE_MONGOCLIB} ${HAVE_BSONLIB} ${HAVE_ZLIB} ${HAVE_CRYPTOLIB})

+ 1 - 1
frameworks/C++/ffead-cpp/te-benchmark-um/config/application.xml

@@ -1,4 +1,4 @@
-<app libname="te_benchmark_um" router="TeBkUmRouter">
+<app router="TeBkUmRouter">
 	<cors-config>
 	<cors-config>
 		<allow-origins>*</allow-origins>
 		<allow-origins>*</allow-origins>
 		<allow-methods>GET, POST, HEAD, PUT, DELETE</allow-methods>
 		<allow-methods>GET, POST, HEAD, PUT, DELETE</allow-methods>

+ 0 - 13
frameworks/C++/ffead-cpp/te-benchmark-um/config/cache.xml

@@ -1,13 +0,0 @@
-<caches>
-        <cache>
-                <nodes>
-                        <node>
-                                <username>sumeet</username>
-                                <password>sumeet</password>
-                        </node>
-                </nodes>
-                <init>TeBkUmRouter.updateCache</init>
-                <name>Memory-Cached</name>
-                <type>memory</type>
-        </cache>
-</caches>

+ 0 - 16
frameworks/C++/ffead-cpp/te-benchmark-um/config/sdorm.xml

@@ -1,16 +0,0 @@
-<sdorm>
-	<data-source>
-		<config>
-			<nodes>
-				<node>
-					<host>localhost</host>
-					<port>27017</port>
-					<databaseName>hello_world</databaseName>
-				</node>
-			</nodes>
-			<pool-size>30</pool-size>
-			<name>MongoDB-DSN</name>
-			<type>mongo</type>
-		</config>
-	</data-source>
-</sdorm>

+ 6 - 5
frameworks/C++/ffead-cpp/te-benchmark-um/include/TeBkUm.h

@@ -40,8 +40,6 @@
 #include "yuarel.h"
 #include "yuarel.h"
 #include "Router.h"
 #include "Router.h"
 
 
-typedef void (*TeBkUmTemplatePtr) (Context*, std::string&);
-
 #pragma @Entity
 #pragma @Entity
 #pragma @Table name="fortune"
 #pragma @Table name="fortune"
 class TeBkUmFortune {
 class TeBkUmFortune {
@@ -71,8 +69,11 @@ class TeBkUmRouter : public Router {
 	static const std::string HELLO_WORLD;
 	static const std::string HELLO_WORLD;
 	static std::string WORLD;
 	static std::string WORLD;
 
 
-	static std::string APP_NAME;
-	static std::string TPE_FN_NAME;
+	static TemplatePtr tmplFunc;
+
+	static Ser m_ser;
+	static Ser w_ser;
+	static SerCont wcont_ser;
 
 
 	bool strToNum(const char* str, int len, int& ret);
 	bool strToNum(const char* str, int len, int& ret);
 	void db(TeBkUmWorld&);
 	void db(TeBkUmWorld&);
@@ -84,7 +85,7 @@ public:
 	TeBkUmRouter();
 	TeBkUmRouter();
 	virtual ~TeBkUmRouter();
 	virtual ~TeBkUmRouter();
 	void updateCache();
 	void updateCache();
-	bool route(HttpRequest* req, HttpResponse* res, void* dlib, void* ddlib, SocketInterface* sif);
+	bool route(HttpRequest* req, HttpResponse* res, SocketInterface* sif);
 };
 };
 
 
 #endif /* WEB_TE_BENCHMARK_UM_INCLUDE_TeBkUm_H_ */
 #endif /* WEB_TE_BENCHMARK_UM_INCLUDE_TeBkUm_H_ */

+ 15 - 0
frameworks/C++/ffead-cpp/te-benchmark-um/meson.build

@@ -0,0 +1,15 @@
+
+module_includes = ['/usr/local/include','../../src/modules/common','../../src/modules/cache','../../src/modules/cache/memory','../../src/modules/cache/redis',
+	'../../src/modules/cache/memcached','../../src/modules/client-util','../../src/modules/http','../../src/modules/http/http11','../../src/modules/http/http20',
+	'../../src/modules/ioc','../../src/modules/jobs','../../src/modules/reflection','../../src/modules/sdorm','../../src/modules/sdorm/sql','../../src/modules/sdorm/sql/libpq',
+	'../../src/modules/client-util/ssl','../../src/modules/sdorm/mongo','../../src/modules/sdorm/mongo/raw','../../src/modules/search','../../src/modules/serialization',
+	'../../src/modules/serialization/xml','../../src/modules/serialization/json','../../src/modules/server-util','../../src/modules/ssl','../../src/modules/threads',
+	'../../src/framework','include']
+module_includes += global_includes
+module_libs = [global_libs]
+
+c = run_command(meson_grabber, 'src/')
+module_sources = c.stdout().strip().split('\n')
+
+shared_library('te-benchmark-um', module_sources, include_directories: module_includes, dependencies: module_libs, link_with: [libffeadmodules, libffeadframework],
+	install: true, install_dir: bin_dir+'/lib')

+ 18 - 62
frameworks/C++/ffead-cpp/te-benchmark-um/src/TeBkUm.cpp

@@ -225,106 +225,60 @@ bool TeBkUmRouter::strToNum(const char* str, int len, int& ret) {
     return true;
     return true;
 }
 }
 
 
-bool TeBkUmRouter::route(HttpRequest* req, HttpResponse* res, void* dlib, void* ddlib, SocketInterface* sif) {
-	//Timer t;
-	//t.start();
+bool TeBkUmRouter::route(HttpRequest* req, HttpResponse* res, SocketInterface* sif) {
 	std::string_view path = req->getPath();
 	std::string_view path = req->getPath();
 	if(StringUtil::endsWith(path, "/plaintext")) {
 	if(StringUtil::endsWith(path, "/plaintext")) {
-		//t.end();
-		//CommonUtils::tsContRstLkp += t.timerNanoSeconds();
-		//t.start();
 		res->setContent(HELLO_WORLD);
 		res->setContent(HELLO_WORLD);
 		res->setContentType(ContentTypes::CONTENT_TYPE_TEXT_PLAIN);
 		res->setContentType(ContentTypes::CONTENT_TYPE_TEXT_PLAIN);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-		//t.end();
-		//CommonUtils::tsContRstSer += t.timerNanoSeconds();
 	} else if(StringUtil::endsWith(path, "/json")) {
 	} else if(StringUtil::endsWith(path, "/json")) {
-		//t.end();
-		//CommonUtils::tsContRstLkp += t.timerNanoSeconds();
-		//t.start();
 		TeBkUmMessage msg;
 		TeBkUmMessage msg;
 		msg.setMessage(HELLO_WORLD);
 		msg.setMessage(HELLO_WORLD);
-		JSONSerialize::serializeUnknown(&msg, 0, "TeBkUmMessage", res->getContentP());
+		JSONSerialize::serializeObject(&msg, m_ser, res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-		//t.end();
-		//CommonUtils::tsContRstSer += t.timerNanoSeconds();
 	} else if(StringUtil::endsWith(path, "/db")) {
 	} else if(StringUtil::endsWith(path, "/db")) {
-		//t.end();
-		//CommonUtils::tsContRstLkp += t.timerNanoSeconds();
-		//t.start();
 		TeBkUmWorld msg;
 		TeBkUmWorld msg;
 		db(msg);
 		db(msg);
-		//t.end();
-		//CommonUtils::tsContExec += t.timerNanoSeconds();
-		//t.start();
-		JSONSerialize::serializeUnknown(&msg, 0, "TeBkUmWorld", res->getContentP());
+		JSONSerialize::serializeObject(&msg, w_ser, res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-		//t.end();
-		//CommonUtils::tsContRstSer += t.timerNanoSeconds();
 	} else if(StringUtil::endsWith(path, "/queries")) {
 	} else if(StringUtil::endsWith(path, "/queries")) {
-		//t.end();
-		//CommonUtils::tsContRstLkp += t.timerNanoSeconds();
-		//t.start();
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		std::vector<TeBkUmWorld> msg;
 		std::vector<TeBkUmWorld> msg;
 		queries(params[0].val, params[0].val_len, msg);
 		queries(params[0].val, params[0].val_len, msg);
-		//t.end();
-		//CommonUtils::tsContExec += t.timerNanoSeconds();
-		//t.start();
-		JSONSerialize::serializeUnknown(&msg, 100, "std::vector<TeBkUmWorld>", res->getContentP());
+		JSONSerialize::serializeObjectCont(&msg, wcont_ser, "vector", res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-		//t.end();
-		//CommonUtils::tsContRstSer += t.timerNanoSeconds();
 	} else if(StringUtil::endsWith(path, "/fortunes")) {
 	} else if(StringUtil::endsWith(path, "/fortunes")) {
 		Context ctx;
 		Context ctx;
 		getContext(req, &ctx);
 		getContext(req, &ctx);
 
 
-		void* mkr = dlsym(ddlib, TPE_FN_NAME.c_str());
-		if(mkr!=NULL)
+		if(tmplFunc!=NULL)
 		{
 		{
-			TeBkUmTemplatePtr f =  (TeBkUmTemplatePtr)mkr;
-			std::string msg;
-			f(&ctx, msg);
-			res->setContent(msg);
+			fcpstream str;
+			tmplFunc(&ctx, str);
+			res->setContent(str.str());
 			res->setContentType(ContentTypes::CONTENT_TYPE_TEXT_SHTML);
 			res->setContentType(ContentTypes::CONTENT_TYPE_TEXT_SHTML);
 			res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 			res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		}
 		}
 	} else if(StringUtil::endsWith(path, "/updates")) {
 	} else if(StringUtil::endsWith(path, "/updates")) {
-		//t.end();
-		//CommonUtils::tsContRstLkp += t.timerNanoSeconds();
-		//t.start();
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		std::vector<TeBkUmWorld> msg;
 		std::vector<TeBkUmWorld> msg;
 		updates(params[0].val, params[0].val_len, msg);
 		updates(params[0].val, params[0].val_len, msg);
-		//t.end();
-		//CommonUtils::tsContExec += t.timerNanoSeconds();
-		//t.start();
-		JSONSerialize::serializeUnknown(&msg, 100, "std::vector<TeBkUmWorld>", res->getContentP());
+		JSONSerialize::serializeObjectCont(&msg, wcont_ser, "vector", res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-		//t.end();
-		//CommonUtils::tsContRstSer += t.timerNanoSeconds();
 	} else if(StringUtil::endsWith(path, "/cached-worlds")) {
 	} else if(StringUtil::endsWith(path, "/cached-worlds")) {
-		//t.end();
-		//CommonUtils::tsContRstLkp += t.timerNanoSeconds();
-		//t.start();
 		struct yuarel_param params[1];
 		struct yuarel_param params[1];
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		yuarel_parse_query((char*)req->getQueryStr().data(), req->getQueryStr().size(), params, 1);
 		std::vector<TeBkUmWorld> msg;
 		std::vector<TeBkUmWorld> msg;
 		cachedWorlds(params[0].val, params[0].val_len, msg);
 		cachedWorlds(params[0].val, params[0].val_len, msg);
-		//t.end();
-		//CommonUtils::tsContExec += t.timerNanoSeconds();
-		//t.start();
-		JSONSerialize::serializeUnknown(&msg, 100, "std::vector<TeBkUmWorld>", res->getContentP());
+		JSONSerialize::serializeObjectCont(&msg, wcont_ser, "vector", res->getContentP());
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setContentType(ContentTypes::CONTENT_TYPE_APPLICATION_JSON);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
 		res->setHTTPResponseStatus(HTTPResponseStatus::Ok);
-		//t.end();
-		//CommonUtils::tsContRstSer += t.timerNanoSeconds();
 	} else {
 	} else {
 		res->setHTTPResponseStatus(HTTPResponseStatus::NotFound);
 		res->setHTTPResponseStatus(HTTPResponseStatus::NotFound);
 	}
 	}
@@ -332,14 +286,16 @@ bool TeBkUmRouter::route(HttpRequest* req, HttpResponse* res, void* dlib, void*
 	return true;
 	return true;
 }
 }
 
 
-std::string TeBkUmRouter::APP_NAME = "";
-std::string TeBkUmRouter::TPE_FN_NAME = "";
+TemplatePtr TeBkUmRouter::tmplFunc;
+Ser TeBkUmRouter::m_ser;
+Ser TeBkUmRouter::w_ser;
+SerCont TeBkUmRouter::wcont_ser;
 
 
 TeBkUmRouter::TeBkUmRouter() {
 TeBkUmRouter::TeBkUmRouter() {
-	if(APP_NAME=="") {
-		APP_NAME = CommonUtils::normalizeAppName("te-benchmark-um");
-		TPE_FN_NAME = CommonUtils::getTpeFnName("tpe/fortunes.tpe", "te-benchmark-um");
-	}
+	tmplFunc = TemplateUtil::getTemplateFunc("te-benchmark-um", "tpe/fortunes.tpe");
+	m_ser = Serializer::getSerFuncForObject("te-benchmark-um", "TeBkUmMessage");
+	w_ser = Serializer::getSerFuncForObject("te-benchmark-um", "TeBkUmWorld");
+	wcont_ser = Serializer::getSerFuncForObjectCont("te-benchmark-um", "TeBkUmWorld", "std::vector");
 }
 }
 
 
 TeBkUmRouter::~TeBkUmRouter() {
 TeBkUmRouter::~TeBkUmRouter() {

+ 1 - 1
frameworks/C++/ffead-cpp/te-benchmark-um/src/autotools/Makefile.am

@@ -8,7 +8,7 @@ distdir=${PACKAGE_NAME}-${PACKAGE_VERSION}-src
 fprefix=../../../../${packageIdentifier}
 fprefix=../../../../${packageIdentifier}
 prefix=${abs_builddir}
 prefix=${abs_builddir}
 
 
-lib_LTLIBRARIES = libte_benchmark_um.la
+lib_LTLIBRARIES = libte-benchmark-um.la
 libte_benchmark_um_la_SOURCES = ../TeBkUmWorld.cpp \
 libte_benchmark_um_la_SOURCES = ../TeBkUmWorld.cpp \
 				../TeBkUm.cpp
 				../TeBkUm.cpp
 
 

Some files were not shown because too many files changed in this diff