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

Support bidirectional streaming on websockets #1111

Merged
merged 27 commits into from
Aug 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
815c9fb
Initial draft of server changes to use headers for browser streams
niloc132 Aug 19, 2021
9936a6a
Client changes to support new stream magic
niloc132 Aug 19, 2021
e672c17
Checkpoint commit a bit past working bidi streams in js
niloc132 Aug 23, 2021
c17be03
Tidy up autocomplete
niloc132 Aug 23, 2021
2cdd471
Further specialize the override builder to our needs
niloc132 Aug 23, 2021
73f98d6
Flatten out the "diamond" and cut grpc out of db
niloc132 Aug 23, 2021
39d345e
Remove dead code
niloc132 Aug 23, 2021
045eb45
Presubmit cleanup
niloc132 Aug 23, 2021
07d4fe5
Make websocket usage a global, and start toward generic stream creation
niloc132 Aug 23, 2021
da4e412
Self review
niloc132 Aug 24, 2021
1accec3
slack review feedback:
niloc132 Aug 25, 2021
e9cdd82
Enable safe grpc error handling by default
niloc132 Aug 25, 2021
960f25b
review feedback
niloc132 Aug 25, 2021
0b302b7
better feedback to browser clients
niloc132 Aug 25, 2021
94dea20
Skip dagger wiring for browser interceptor, skip an object allocation
niloc132 Aug 25, 2021
b0c95bd
autocomplete should let client match request to response
niloc132 Aug 25, 2021
beec0f5
Generate gwt protos
niloc132 Aug 25, 2021
cfc03b5
Implement js side of autocomplete response matching
niloc132 Aug 26, 2021
7272386
review feedback
niloc132 Aug 26, 2021
20c6b9c
doc tweak
niloc132 Aug 26, 2021
515b7e6
De-dup a formerly required noinspection
niloc132 Aug 26, 2021
9484982
Merge tag 'pre-style-guide-apply' into 834-websocket-bidi-streaming
niloc132 Aug 26, 2021
1cfbc90
style guide
niloc132 Aug 26, 2021
74de0d2
Merge tag 'post-style-guide-apply' into 834-websocket-bidi-streaming
niloc132 Aug 26, 2021
6bcc520
Merge remote-tracking branch 'upstream/main' into 834-websocket-bidi-…
niloc132 Aug 26, 2021
5b3569c
more style changes
niloc132 Aug 26, 2021
6c21de1
dedup methods that were copied?
niloc132 Aug 26, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import io.deephaven.db.v2.sources.chunk.Attributes;
import io.deephaven.db.v2.sources.chunk.Chunk;
import io.deephaven.db.v2.utils.Index;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;

import static io.deephaven.util.QueryConstants.NULL_BYTE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
import io.deephaven.db.v2.sources.chunk.Attributes;
import io.deephaven.db.v2.sources.chunk.Chunk;
import io.deephaven.db.v2.utils.Index;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;

import static io.deephaven.util.QueryConstants.NULL_CHAR;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import io.deephaven.db.v2.sources.chunk.Attributes;
import io.deephaven.db.v2.sources.chunk.Chunk;
import io.deephaven.db.v2.utils.Index;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;

import static io.deephaven.util.QueryConstants.NULL_DOUBLE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import io.deephaven.db.v2.sources.chunk.Attributes;
import io.deephaven.db.v2.sources.chunk.Chunk;
import io.deephaven.db.v2.utils.Index;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;

import static io.deephaven.util.QueryConstants.NULL_FLOAT;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import io.deephaven.db.v2.sources.chunk.Attributes;
import io.deephaven.db.v2.sources.chunk.Chunk;
import io.deephaven.db.v2.utils.Index;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;

import static io.deephaven.util.QueryConstants.NULL_INT;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import io.deephaven.db.v2.sources.chunk.Attributes;
import io.deephaven.db.v2.sources.chunk.Chunk;
import io.deephaven.db.v2.utils.Index;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;

import static io.deephaven.util.QueryConstants.NULL_LONG;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
import io.deephaven.db.v2.sources.chunk.Attributes;
import io.deephaven.db.v2.sources.chunk.Chunk;
import io.deephaven.db.v2.utils.Index;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;

public final class ObjectValueTracker<T extends Comparable<T>> extends ValueTracker {
private final ObjectArraySource<T> source;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import io.deephaven.db.v2.sources.chunk.Attributes;
import io.deephaven.db.v2.sources.chunk.Chunk;
import io.deephaven.db.v2.utils.Index;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;

import static io.deephaven.util.QueryConstants.NULL_SHORT;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import io.deephaven.db.v2.sources.chunk.Chunk;
import io.deephaven.db.v2.utils.Index;
import io.deephaven.db.v2.utils.IndexShiftData;
import org.jetbrains.annotations.Nullable;

import javax.annotation.Nullable;
import java.util.List;

/**
Expand Down
4 changes: 2 additions & 2 deletions DB/DB.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ dependencies {
project(':deephaven-jpy-ext'),
project(':Parquet'),
project(':DHProcess'),
project(':proto:proto-backplane-grpc-util'),
project(':log-factory'),
project(':open-api-lang-api'),
project(':Container'),
project(':table-api'),
project(':qst'),
Expand All @@ -79,6 +77,8 @@ dependencies {

annotationProcessor 'org.immutables:value:2.8.1'
compileOnly 'org.immutables:value-annotations:2.8.1'

compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
}

task jmhRun(type: JavaExec) {
Expand Down
4 changes: 2 additions & 2 deletions DB/src/main/java/io/deephaven/db/tables/CodecLookup.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import io.deephaven.util.codec.ExternalizableCodec;
import io.deephaven.util.codec.ObjectCodec;
import io.deephaven.util.codec.SerializableCodec;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.annotation.Nullable;
import javax.validation.constraints.NotNull;
import java.io.Externalizable;

/**
Expand Down
20 changes: 0 additions & 20 deletions DB/src/main/java/io/deephaven/db/util/AbstractScriptSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
import io.deephaven.db.tables.select.QueryScope;
import io.deephaven.db.util.liveness.LivenessScope;
import io.deephaven.db.util.liveness.LivenessScopeStack;
import io.deephaven.lang.parse.api.CompletionParseService;
import io.deephaven.lang.parse.api.CompletionParseServiceNoOp;
import io.deephaven.util.SafeCloseable;
import org.jetbrains.annotations.Nullable;

Expand Down Expand Up @@ -47,7 +45,6 @@ private static void createOrClearDirectory(final File directory) {
protected final QueryScope queryScope;
protected final QueryLibrary queryLibrary;
protected final CompilerTools.Context compilerContext;
private final CompletionParseService<?, ?, ?> parser;

protected AbstractScriptSession(boolean isDefaultScriptSession) {
final UUID scriptCacheId = UuidCreator.getRandomBased();
Expand Down Expand Up @@ -78,16 +75,6 @@ public String getClassPath() {
QueryScope.setDefaultScope(queryScope);
QueryLibrary.setDefaultLibrary(queryLibrary);
}
@SuppressWarnings("rawtypes")
ServiceLoader<CompletionParseService> loader = ServiceLoader.load(CompletionParseService.class);
@SuppressWarnings("rawtypes")
final Iterator<CompletionParseService> itr = loader.iterator();
if (itr.hasNext()) {
parser = itr.next();
} else {
// hm, should maybe log to the user that we are using a do-nothing completer...
parser = new CompletionParseServiceNoOp();
}
}

@Override
Expand Down Expand Up @@ -176,13 +163,6 @@ protected void destroy() {
*/
protected abstract QueryScope newQueryScope();

@Override
@SuppressWarnings("rawtypes")
public CompletionParseService getParser() {
return parser;
}


@Override
public Class getVariableType(final String var) {
final Object result = getVariable(var, null);
Expand Down
3 changes: 0 additions & 3 deletions DB/src/main/java/io/deephaven/db/util/ScriptSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import io.deephaven.db.util.liveness.ReleasableLivenessManager;
import io.deephaven.db.util.scripts.ScriptPathLoader;
import io.deephaven.db.util.scripts.ScriptPathLoaderState;
import io.deephaven.lang.parse.api.CompletionParseService;
import org.jetbrains.annotations.Nullable;

import java.util.HashMap;
Expand Down Expand Up @@ -50,8 +49,6 @@ public interface ScriptSession extends ReleasableLivenessManager, LivenessNode {
*/
VariableProvider getVariableProvider();

CompletionParseService getParser();

class Changes {
public Map<String, ExportedObjectType> created = new HashMap<>();
public Map<String, ExportedObjectType> updated = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import io.deephaven.hash.KeyedObjectHashMap;
import io.deephaven.hash.KeyedObjectKey;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.annotation.Nullable;
import java.util.Collection;
import java.util.Collections;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package io.deephaven.db.v2.sources;

import io.deephaven.base.verify.Require;
import io.deephaven.db.tables.ColumnDefinition;
import io.deephaven.db.v2.sources.chunk.*;
import io.deephaven.db.v2.sources.chunk.Attributes.Values;
import io.deephaven.db.v2.tuples.TupleSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import io.deephaven.base.verify.Require;

import javax.annotation.Nullable;
import javax.annotation.OverridingMethodsMustInvokeSuper;
import io.deephaven.db.tables.ColumnDefinition;
import io.deephaven.db.v2.locations.ColumnLocation;
import io.deephaven.db.v2.sources.chunk.Attributes;
import io.deephaven.util.annotations.TestUseOnly;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.function.Supplier;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
import io.deephaven.db.v2.sources.ColumnSourceGetDefaults;
import io.deephaven.db.v2.sources.chunk.Attributes.Values;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nullable;
import java.util.function.Supplier;
import org.jetbrains.annotations.Nullable;

import static io.deephaven.db.v2.utils.ReadOnlyIndex.NULL_KEY;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
package io.deephaven.db.v2.utils;

import org.jetbrains.annotations.NotNull;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;

public class ImmutableColumnHolder<T> extends ColumnHolder<T> {
@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import io.deephaven.db.tables.TableDefinition;
import io.deephaven.db.tables.utils.TableTools;
import io.deephaven.db.v2.TableMap;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.annotation.Nullable;
import javax.validation.constraints.NotNull;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
Expand Down
Loading