Skip to content

Commit

Permalink
Support jetty as a server for deephaven (#1731)
Browse files Browse the repository at this point in the history
This patch introduces a new server implementation that uses Jetty as the http server rather than Netty, so is able to avoid using nginx, grpc-proxy, and envoy to let browsers connect.

There are a few known bugs with this, and so for now this is not expected to replace the existing server which uses docker, until we've had more time to test and investigate.

In order to use Jetty, slf4j is updated to an alpha release.

Fixes #1270
  • Loading branch information
niloc132 authored Dec 28, 2021
1 parent 09f21cd commit e90b74c
Show file tree
Hide file tree
Showing 220 changed files with 1,913 additions and 925 deletions.
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Set<Project> modsAreBasic = subprojects.findAll {it.name in [
'docker-runtime-base',
'docker-server',
'docker-server-slim',
'raw-js-openapi'
] }

Set<Project> modsAreBin = subprojects.findAll {it.name in ['bin', 'configs', 'test-configs'] }
Expand Down Expand Up @@ -400,7 +401,7 @@ tasks.register 'allJavadoc', Javadoc, {
':ModelFarm',
':Numerics',
':Plot',
':grpc-api',
':server',
':qst',
':table-api',
':uri',
Expand Down Expand Up @@ -472,7 +473,7 @@ tasks.register('quick') {
allprojects.collect { it.tasks.matching { it.name == 'compileTestJava' } } +\
allprojects.collect { it.tasks.matching { it.name == 'spotlessCheck' } }
}
it.dependsOn project(':grpc-api').tasks.findByName(LifecycleBasePlugin.CHECK_TASK_NAME)
it.dependsOn project(':server').tasks.findByName(LifecycleBasePlugin.CHECK_TASK_NAME)
it.dependsOn project(':Generators').tasks.findByName(LifecycleBasePlugin.CHECK_TASK_NAME)
}

Expand All @@ -494,7 +495,7 @@ tasks.register('smoke') {
allprojects.collect { it.tasks.matching { it.name == 'compileTestJava' } } +\
allprojects.collect { it.tasks.matching { it.name == 'spotlessCheck' } }
}
it.dependsOn project(':grpc-api').tasks.findByName(LifecycleBasePlugin.CHECK_TASK_NAME)
it.dependsOn project(':server').tasks.findByName(LifecycleBasePlugin.CHECK_TASK_NAME)
it.dependsOn project(':docker-server-slim').tasks.findByName('prepareDocker')
it.dependsOn project(':docker-server').tasks.findByName('prepareDocker')
it.dependsOn project(':web').tasks.findByName(LifecycleBasePlugin.ASSEMBLE_TASK_NAME)
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/groovy/Classpaths.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Classpaths {
static final String ARROW_VERSION = '5.0.0'

static final String SLF4J_GROUP = 'org.slf4j'
static final String SLF4J_VERSION = '1.7.32'
static final String SLF4J_VERSION = '2.0.0-alpha5'

static final String FLATBUFFER_GROUP = 'com.google.flatbuffers'
static final String FLATBUFFER_NAME = 'flatbuffers-java'
Expand All @@ -76,7 +76,7 @@ class Classpaths {

static final String LOGBACK_GROUP = 'ch.qos.logback'
static final String LOGBACK_NAME = 'logback-classic'
static final String LOGBACK_VERSION = '1.2.3'
static final String LOGBACK_VERSION = '1.3.0-alpha12'

static final String GROOVY_GROUP = 'org.codehaus.groovy'
static final String GROOVY_VERSION = '3.0.9'
Expand Down
2 changes: 1 addition & 1 deletion docker/server-slim/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ configurations {
}

dependencies {
serverApplicationDist project(path: ':grpc-api-server-native', configuration: 'applicationDist')
serverApplicationDist project(path: ':server-netty', configuration: 'applicationDist')
}

def dockerContext = project.layout.buildDirectory.dir('context')
Expand Down
2 changes: 1 addition & 1 deletion docker/server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ configurations {
}

dependencies {
serverApplicationDist project(path: ':grpc-api-server-native', configuration: 'applicationDist')
serverApplicationDist project(path: ':server-netty', configuration: 'applicationDist')
}

def dockerLicenses = License.createFrom(project).syncDockerLicense().get()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public boolean useDeephavenNulls() {
* subscriptions to that table.
*
* The default interval can be set on the server with the flag
* {@code io.deephaven.grpc_api.arrow.ArrowFlightUtil#DEFAULT_UPDATE_INTERVAL_MS}, or
* {@code io.deephaven.server.arrow.ArrowFlightUtil#DEFAULT_UPDATE_INTERVAL_MS}, or
* {@code -Dbarrage.minUpdateInterval=1000}.
*
* Related, when shortening the minUpdateInterval, you typically want to shorten the server's UGP cycle enough to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
import io.deephaven.engine.table.Table;
import io.deephaven.engine.table.TableDefinition;
import io.deephaven.engine.table.MatchPair;
import io.deephaven.proto.flight.util.MessageHelper;
import io.deephaven.proto.flight.util.SchemaHelper;
import io.deephaven.time.DateTime;
import io.deephaven.api.util.NameValidator;
import io.deephaven.engine.util.ColumnFormattingValues;
import io.deephaven.engine.util.config.MutableInputTable;
import io.deephaven.engine.table.impl.HierarchicalTableInfo;
import io.deephaven.engine.table.impl.RollupInfo;
import io.deephaven.chunk.ChunkType;
import io.deephaven.grpc_api.util.MessageHelper;
import io.deephaven.grpc_api.util.SchemaHelper;
import io.deephaven.proto.backplane.grpc.ExportedTableCreationResponse;
import io.deephaven.util.type.TypeUtils;
import org.apache.arrow.flatbuf.KeyValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

package io.deephaven.extensions.barrage.util;

import io.deephaven.grpc_api.util.Exceptions;
import io.deephaven.io.logger.Logger;
import com.google.rpc.Code;
import io.deephaven.engine.liveness.LivenessScopeStack;
import io.deephaven.proto.util.Exceptions;
import io.deephaven.util.FunctionalInterfaces;
import io.deephaven.util.SafeCloseable;
import io.deephaven.internal.log.LoggerFactory;
Expand Down
33 changes: 0 additions & 33 deletions grpc-api/README.md

This file was deleted.

79 changes: 0 additions & 79 deletions grpc-api/grpc-api.gradle

This file was deleted.

28 changes: 0 additions & 28 deletions grpc-api/server/native/README.md

This file was deleted.

75 changes: 0 additions & 75 deletions grpc-api/server/native/build.gradle

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions grpc-api/src/test/app.d/00-static.app

This file was deleted.

2 changes: 0 additions & 2 deletions grpc-api/src/test/app.d/04-dynamic.app

This file was deleted.

2 changes: 1 addition & 1 deletion java-client/flight-dagger/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {

Classpaths.inheritAssertJ(project)

testImplementation TestTools.projectDependency(project, 'grpc-api')
testImplementation TestTools.projectDependency(project, 'server')
testImplementation project(':log-to-slf4j')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import io.deephaven.client.impl.DaggerDeephavenFlightRoot;
import io.deephaven.client.impl.FlightSession;
import io.deephaven.grpc_api.runner.DeephavenApiServerTestBase;
import io.deephaven.server.runner.DeephavenApiServerTestBase;
import io.grpc.ManagedChannel;
import org.apache.arrow.memory.BufferAllocator;
import org.apache.arrow.memory.RootAllocator;
Expand Down
Loading

0 comments on commit e90b74c

Please sign in to comment.