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

Http ws nonjsonrpc support #554

Merged
merged 22 commits into from
Jul 15, 2024
Merged

Http ws nonjsonrpc support #554

merged 22 commits into from
Jul 15, 2024

Conversation

satlead
Copy link
Collaborator

@satlead satlead commented Jul 1, 2024

What

Adds support for Rule Engine to Broker requests to Websockets and HTTP which are non json rpc.
Adds Unit test support for mocking Websockets

Why

Each device offers so many other HTTP and WS services which are not JSON RPC based. This change opens up the possibility for Ripple to Broker requests to those services within the device.

How

Websocket Broker and HTTP Broker is updated to handle Non Json Rpc request and responses.

Test

How has this been tested?
Using Unit tests and internal Websocket implementation

How can a reviewer test it?
Reviewer can run a Websocket server and add rules in mock rules json and validate

Checklist

  • I have self-reviewed this PR
  • I have added tests that prove the feature works or the fix is effective

core/main/src/broker/websocket_broker.rs Show resolved Hide resolved
core/main/src/broker/websocket_broker.rs Outdated Show resolved Hide resolved
core/main/src/broker/websocket_broker.rs Outdated Show resolved Hide resolved
core/main/src/broker/endpoint_broker.rs Show resolved Hide resolved
Copy link

Code Coverage

Package Line Rate Health
core.sdk.src.extn.ffi 80%
core.sdk.src.api.manifest 91%
core.main.src.state.cap 44%
core.launcher.src 0%
core.main.src.service 31%
core.sdk.src.api.observability 68%
core.tdk.src.gateway 100%
device.thunder_ripple_sdk.src.bootstrap 0%
core.main.src.utils 29%
openrpc_validator.src 90%
core.sdk.src.api 78%
core.main.src.broker 35%
core.main.src.processor 0%
core.main.src.service.apps 47%
device.mock_device.src 52%
device.thunder.src 0%
core.sdk.src.api.device 77%
core.sdk.src.api.gateway 87%
core.main.src.processor.storage 0%
device.thunder_ripple_sdk.src.client 74%
device.thunder_ripple_sdk.src.events 4%
core.main.src.firebolt.handlers 1%
core.tdk.src.utils 0%
core.sdk.src.framework 75%
device.thunder_ripple_sdk.src.processors 10%
distributor.general.src 2%
core.sdk.src.extn 83%
core.sdk.src.api.distributor 84%
core.main.src.broker.thunder 55%
core.sdk.src.api.firebolt 78%
core.main.src 0%
core.main.src.firebolt 1%
core.main.src.bootstrap.extn 0%
device.thunder_ripple_sdk.src 15%
core.sdk.src.utils 53%
core.main.src.bootstrap 0%
core.main.src.service.extn 40%
core.sdk.src.extn.client 91%
core.main.src.bootstrap.manifest 0%
core.launcher.src.manager 7%
device.thunder.src.bootstrap 0%
core.main.src.state 22%
device.thunder_ripple_sdk.src.processors.events 0%
Summary 43% (17187 / 40035)

Minimum allowed line rate is 41%

@satlead satlead merged commit a312c07 into main Jul 15, 2024
8 checks passed
@satlead satlead deleted the http-ws-nonjsonrpc-support branch July 15, 2024 22:15
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.

3 participants