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

rework IModelApp and IModelHost initialization #687

Merged
merged 74 commits into from
Feb 10, 2021
Merged

Conversation

kabentley
Copy link
Contributor

@kabentley kabentley commented Jan 30, 2021

  • On the Backend:

    • IModelHost: supports all configurations must always be initialized. Doesn’t necessarily have a FE, but only supports RPC
      IpcHost: supports Ipc requests. Requires a dedicated/paired FE/BE. Initializes IModelHost, but requires a previously initialized IpcSocketBackend instance
    • WebViewerHost: for the backend of web viewing apps.
    • IpcHost: for dedicated backends that may use IPC
      • WebEditHost: for the BE of WEAs. Creates web socket and Initializes IpcHost
      • NativeHost: only valid when FE and BE are on the same computer. Initializes IpcHost. Provides access to local file system
        • ElectronHost: for desktop apps. Initializes NativeHost. Also initializes electron-manager/lib/ElectronBackend
        • MobileHost: for mobile apps. Initializes NativeHost and all Mobile startup
          • IOSHost: for IOS backends
          • AndroidHost: for Android backends
  • On the Frontend::

    • IModelApp: must always be initialized. For RPC, connects to previously-initialized IModelHost(s) through routing.
    • WebViewerApp: FE of web viewing apps. May only open iModels readonly, and may not use Ipc
    • IpcApp : for frontends with a dedicated backend. Intializes IModelApp. Must be able to connect to its previously-initialized IpcHost through IpcSocketFrontend
      • WebEditApp: for WEA FE. Initializes IpcApp via WebSocket. Must have proper previously obtained credentials.
      • ElectronApp: for desktop apps. Initializes IpcApp via electron-manager/lib/ElectronFrontend
      • MobileApp: for mobile apps. Initializes IpcApp via mobile-manager/lib/MobileFrontend using websocket
        • IOSApp: FE for IOS apps
        • AndroidApp: FE for Android apps

Corresponding imodel02 PR.

core/bentley/src/ProcessDetector.ts Show resolved Hide resolved
core/backend/src/IpcHost.ts Outdated Show resolved Hide resolved
@swbsi
Copy link
Contributor

swbsi commented Feb 8, 2021

DTA works on iOS now on this branch.

@kabentley
Copy link
Contributor Author

DTA works on iOS now on this branch.

Did you make any additional changes?

@swbsi
Copy link
Contributor

swbsi commented Feb 8, 2021

DTA works on iOS now on this branch.

Did you make any additional changes?

The tile issue turned out to be a stale local build of the native side (which failed the tile major version check). DTA is working with my changes from yesterday.

@bbastings bbastings self-requested a review February 9, 2021 22:48
@kabentley kabentley merged commit b9a21f4 into imodel02 Feb 10, 2021
@kabentley kabentley deleted the geometry-changes branch February 10, 2021 14:28
kabentley added a commit that referenced this pull request Feb 11, 2021
* Presentation: Enable an option for presentation backend to use memory mapped i/o for worker SQLite connections (#690)

* presentation/default units (#657)

* Add default-units functionality and testing

* change and API

* PR Fixes

* PR fixes

* renaming

* PR fix

* style fix

* PR fixes

* NextVersion and minor fixes

* PR fixes

* minor fix

* PR fixes

* minor fix

* Presentation: Enforce result paging for hierarchy compare (#678)

* Enforce hierarchy compare result paging

* extract-api

* rush change

* Restore broken public api

* rush extract-api

* Rename to 'continuationToken'

* Add test for hierarchy compare paging

* Update RPC version

* Adjustments to latest ECDb changes for moving properties (#730)

* rework IModelApp and IModelHost initialization (#687)

* add ipc response handler

* use responseHandler for NativeApp

* extract-api

* split out TxnManager

* extract-api, again

* remove EventSink and EventSource

* wip

* wip

* get tests working

* ElectronHost and ElectronApp

* clean up startup code

* clean up documenation

* work on mobile-manager

* wip

* add mobile-manager

* IOSApp and AndroidApp

* directory case change

* wip

* wip

* lint cleanup

* use Ipc for StandaloneConnection

* clean up documentation

* rename callBackend to callXxxHost

* clear subcategories in beforeClose rather than in each subclass

* deprecate RemoteBriefcaseConnection, added RemoteIModelConnection

* extract-api

* rename RemoteIModelConnection to CheckpointConnection

* more documentation

* always import IModelStatus from bentleyjs-core in backend

* fix presentation-backend test failures

* Get presentation update-related tests working again

* Update docs/learning/backend/IModelHost.md

Co-authored-by: Grigas <35135765+grigasp@users.noreply.github.com>

* Update core/common/tsconfig.json

Co-authored-by: Grigas <35135765+grigasp@users.noreply.github.com>

* add ProcessDetector

* extract-api

* make StandaloneConnection subclass of BriefcaseConnection

* use IModelDb rather than BriefcaseDb for IModelWriteRpc

* Working mockmobile tests

* restore mobileeventloop

* restored previous mobile ipc fix

* eliminate StandaloneConnection class

* fix openStandalone test

* remove naked require('electron') in favor of ElectronHost.electron

* fix for restarting IModelApp in InteractiveEditingSession.test

* fix interactiveEditingSession test

* fix IModelVersion interface

* fix lint errors

* steps toward getting mobile app working...still an issue in oidc

* typo...authInit being called now. just need a MobileHost.device now, I think

* move websocket ipc to mobilehost...still need to port device over

* IOSDevice back in action. App launches...but no tiles???

* rework IOSHost.startup

* typo

* documentation for TxnManager

* fix lint errors

* rename StandaloneConnection test to OpenStandalone

* ios/mobile refactoring

* api

* add test for classNameToId and classIdToName

* NextVersion.md

* typo

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Grigas <35135765+grigasp@users.noreply.github.com>
Co-authored-by: swbsi <69857376+swbsi@users.noreply.github.com>

* lint

* extract-api

* merge

* lint errors

* documenation descriptions

* doc errors

* documentation cleanup

* revert ecschema-metadata changes

Co-authored-by: Grigas <35135765+grigasp@users.noreply.github.com>
Co-authored-by: aurislt7 <30312645+aurislt7@users.noreply.github.com>
Co-authored-by: Saulius Skliutas <24278440+saskliutas@users.noreply.github.com>
Co-authored-by: Robert Schili <rschili@users.noreply.github.com>
Co-authored-by: kabentley <33296803+kabentley@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: swbsi <69857376+swbsi@users.noreply.github.com>
Co-authored-by: Caleb Shafer <31107829+calebmshafer@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants