Deprecate SnapshotConnection.openRemote
and make SnapshotConnection.openFile
IPC only
#7171
+41
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Public API changes
SnapshotConnection.openRemote
API.SnapshotConnection.openFile
only available in IPC apps.Motivation
SnapshotConnection
relies onSnapshotIModelRpcInterface
for it's communication with the backend. With deprecation and eventual replacement of RPC, all RPC interfaces owned by core need to reviewed and rewritten as needed. While some of the other RPC interfaces (e.g.IModelReadRpcInterface
) will need to be converted to the new architecture, I believe,SnapshotIModelRpcInterface
can be moved to IPC as it doesn't make sense to have Web implementation for it.Details
SnapshotConnection
/SnapshotIModelRpcInterface
has two main methods:openFile(filePath: string, ...)
- opening iModel using file path only makes sense if backend is on the same machine. This is the case in Electron and mobile in which IPC can be used. For that reason newIpcApp.appFunctionIpc.openSnapshot
was added.openRemote(key: string, ...)
- as far as I can tell, this was intended to be used in Web Viewer. Web Viewer and other iTwin.js web applications should be usingCheckpointConnection.openRemote(...)
. Since GPB doesn't have implementation registered forSnapshotIModelRpcInterface
, this is not even usable in the web without custom backend.TODO
SnapshotConnection.openFile
in full-stack-tests/core as we will want to keep running those tests in Chrome.SnapshotConnection.openFile
in full-stack-tests/presentation or support IPC there.