Skip to content

Concern over fqname of classes being passed around between client and server #485

@lsafer-meemer

Description

@lsafer-meemer

Is your feature request related to a problem? Please describe.
Here is a sample of messages passed around in the websocket session. You see the fully qualified class names are concerning in terms of performance.

{
    "type": "org.jetbrains.krpc.RPCMessage.CallData",
    "callId": "1:subscribe:1",
    "serviceType": "net.lsafer.rkrpc.internal.RkrpcService",
    "method": "subscribe",
    "callType": "Method",
    "data": "{}",
    "connectionId": 1,
    "serviceId": 1,
    "pluginParams": {
        "-32763": ""
    }
}

Especially when using a transport over transport (for nested and reverse clients)

{
    "type": "org.jetbrains.krpc.RPCMessage.StreamMessage",
    "callId": "1:subscribe:1",
    "serviceType": "net.lsafer.rkrpc.internal.RkrpcService",
    "flowId": "1",
    "data": "{\"type\":\"0\",\"value\":\"{\\\"type\\\":\\\"org.jetbrains.krpc.internal.transport.RPCProtocolMessage.Handshake\\\",\\\"supportedPlugins\\\":[-32767,-32766,-32765,-32764]}\"}",
    "connectionId": 1,
    "serviceId": 1
}

Also, you can see that function names, too, have the same issue.

Describe the solution you'd like
Maybe make service and function qualifiers customizable (same as @SerialName) or use hashing.

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions