Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switched to using the uWebSockets library for http. #364

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v2

- name: Install dependencies
run: sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev
run: sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev zlib1g-dev openssl libssl-dev
- name: Install clang 13
run: wget https://apt.llvm.org/llvm.sh && sudo chmod +x llvm.sh && sudo ./llvm.sh 13
- name: Install libc++-13
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
[submodule "third_party/antlr4"]
path = third_party/antlr4
url = https://github.com/antlr/antlr4.git
[submodule "third_party/uWebSockets/src"]
path = third_party/uWebSockets/src
url = https://github.com/uNetworking/uWebSockets.git
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ if (${PERFTOOLS_PROFILER})
message(STATUS "Adding -lprofiler (make sure your have google-perftools installed.)")
endif ()

if (${ALLOW_SHUTDOWN})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DALLOW_SHUTDOWN")
message(STATUS "Adding -DALLOW_SHUTDOWN")
endif ()


set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")

Expand Down Expand Up @@ -175,6 +170,11 @@ message(STATUS "IMPORTANT: Make sure you have selected the desired CMAKE_BUILD_T
message(STATUS "CMAKE_BUILD_TYPE is ${CMAKE_BUILD_TYPE}")
message(STATUS ---)

################################
# uWebSockets
################################
add_subdirectory(third_party/uWebSockets)

###############################################################################
##### Actual project configuration #####
###############################################################################
Expand Down Expand Up @@ -218,7 +218,7 @@ add_executable(SparqlEngineMain src/SparqlEngineMain.cpp)
target_link_libraries (SparqlEngineMain engine ${CMAKE_THREAD_LIBS_INIT})

add_executable(ServerMain src/ServerMain.cpp)
target_link_libraries (ServerMain engine ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries (ServerMain engine server ${CMAKE_THREAD_LIBS_INIT})

add_executable(WriteIndexListsMain src/WriteIndexListsMain.cpp)
target_link_libraries (WriteIndexListsMain engine ${CMAKE_THREAD_LIBS_INIT})
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENV DEBIAN_FRONTEND=noninteractive

FROM base as builder
RUN apt-get update && apt-get install -y build-essential cmake libicu-dev tzdata pkg-config uuid-runtime uuid-dev git
RUN apt install -y libjemalloc-dev ninja-build libzstd-dev
RUN apt install -y libjemalloc-dev ninja-build libzstd-dev openssl libssl-dev zlib1g-dev

COPY . /app/

Expand All @@ -22,7 +22,7 @@ FROM base as runtime
WORKDIR /app
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y wget python3-yaml unzip curl bzip2 pkg-config libicu-dev python3-icu libgomp1 uuid-runtime
RUN apt install -y lbzip2 libjemalloc-dev libzstd-dev
RUN apt install -y lbzip2 libjemalloc-dev libzstd-dev openssl libssl-dev

ARG UID=1000
RUN groupadd -r qlever && useradd --no-log-init -r -u $UID -g qlever qlever && chown qlever:qlever /app
Expand Down
6 changes: 5 additions & 1 deletion src/engine/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
add_subdirectory(sparqlExpressions)
add_library(SortPerformanceEstimator SortPerformanceEstimator.cpp SortPerformanceEstimator.h)

add_library(engine
Engine.h
IndexSequence.h
Expand All @@ -19,7 +20,6 @@ add_library(engine
Distinct.h Distinct.cpp
OrderBy.h OrderBy.cpp
Filter.h Filter.cpp
Server.h Server.cpp
QueryPlanner.cpp QueryPlanner.h
QueryPlanningCostFactors.cpp QueryPlanningCostFactors.h
TwoColumnJoin.cpp TwoColumnJoin.h
Expand All @@ -38,3 +38,7 @@ add_library(engine
ResultType.h)

target_link_libraries(engine index parser sparqlExpressions SortPerformanceEstimator absl::flat_hash_set ${ICU_LIBRARIES})

add_library(server Server.h Server.cpp)
target_compile_options(server PUBLIC -Wno-unused-parameter -Wno-sign-compare)
target_link_libraries(server engine uWebSockets)