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

*DO NOT MERGE* Topology changes - One consumer for multiple topics #4955

Conversation

mbrkic-r3
Copy link
Contributor

@mbrkic-r3 mbrkic-r3 commented Oct 23, 2023

This is alternative solution to #4931

Using new topology Kafka topics (flow.start, flow.session, flow.mapper.start, flow.mapper.session.in, flow.mapper.session.out).

One Kafka consumer subscribes to multiple input topics.

mbrkic-r3 and others added 30 commits October 13, 2023 17:09
Adds support for state metadata to the state and event processor.

Components using the event mediator to process events and states may wish to set metadata alongside the state that is written back to the underlying state storage. This change adds to the StateAndEventProcessor API to facilitate this, as well as migrating existing state and event processors to use this.

---------

Co-authored-by: James Higgs <[email protected]>
…diator in FlowWorker (#4832)

Using Multi-Source Event Mediator instead of State and Event Subscription in FlowWorker.

Polling consumers and committing offsets performed in mediator thread in a synchronous way (without using coroutines)
Add support for parallel flows executing within the flow pipeline.

This includes:
- Temporary multi-thread implementation of the state and event pattern.
- Using the SameThreadExecutor for flow fibers, which causes the fiber to run on the thread that started the fiber.
- Using a Kryo Pool for Kryo instances, as kryo instances are not thread-safe themselves.

Add TaskManager and a TaskManagerFactory which is a wrapper around a ScheduledExecutorService used for gathering metrics on executing tasks. The built-in Micrometer metrics for executor services are used, along with some additional metrics in the TaskManager that are more specific to our use-cases.
---------

Co-authored-by: Conal Smith <[email protected]>
Co-authored-by: Dan Newton <[email protected]>
Co-authored-by: Dries Samyn <[email protected]>
…integration with StateManager (#4874)

Integration of Multi-Source Event Mediator with StateManager.
…tion

CORE-15419 5.1 Performace Integration
…e Event Mediator (#4875)

Using Multi-Source Event Mediator instead of State and Event Subscription in FlowMapperWorker.

---------

Co-authored-by: James Higgs <[email protected]>
…tion-2

CORE-15419 5.1 Performance Integration #2
… flow.mapper.start, flow.mapper.session.in, flow.mapper.session.out).
…rics-2

CORE-17562 Metrics for Multi-Source Event Mediator
…rker (#4820)

HTTP RPC server integration into the Crypto processor. Allows Crypto processor to receive HTTP external event requests sent from the flow engine. Client integration will come later.
Adds the state status key to flow mapper state metadata and populates it with the current state.

The metadata key is used by the mapper cleanup logic to ensure that mapper states are removed.
…point (#4889)

Adds session timeout to the metadata stored alongside the checkpoint.

Session timeout is implemented using the state storage lookup mechanism, which requires the metadata to be populated with the session timeout key. The earliest timestamp of session expiry for currently open sessions is the value assigned to this property.
…PC (#4885)

This PR adds a new implementation of MessagingClient, RPCClient, handling synchronous calls to the Corda workers via RPC/HTTP with configurable retries.

Includes also a small bug-fix for the task manager.

---------

Co-authored-by: Miljenko Brkic <[email protected]>
…w-topics' into mbrkic-r3/CORE-17768/topoligy-new-topics
…o mbrkic-r3/CORE-17768/topoligy-new-topics

# Conflicts:
#	components/flow/flow-service/src/main/kotlin/net/corda/flow/messaging/mediator/FlowEventMediatorFactoryImpl.kt
…o mbrkic-r3/CORE-17768/topoligy-new-topics

# Conflicts:
#	components/flow/flow-mapper-service/src/integrationTest/kotlin/net/corda/session/mapper/service/integration/TestStateManagerFactoryImpl.kt
…erviceIntegrationTest-fix-backup' into mbrkic-r3/CORE-17768/topoligy-new-topics

# Conflicts:
#	components/flow/flow-mapper-service/src/integrationTest/kotlin/net/corda/session/mapper/service/integration/FlowMapperServiceIntegrationTest.kt
#	components/flow/flow-mapper-service/src/integrationTest/kotlin/net/corda/session/mapper/service/integration/TestFlowEventMediatorFactoryImpl.kt
#	libs/messaging/messaging-impl/src/main/kotlin/net/corda/messaging/mediator/MultiSourceEventMediatorImpl.kt
…ORE-17768/topoligy-new-topics

# Conflicts:
#	components/flow/flow-mapper-service/src/integrationTest/kotlin/net/corda/session/mapper/service/integration/FlowMapperServiceIntegrationTest.kt
#	components/flow/flow-mapper-service/src/integrationTest/kotlin/net/corda/session/mapper/service/integration/TestFlowEventMediatorFactoryImpl.kt
#	components/flow/flow-service/src/main/kotlin/net/corda/flow/messaging/mediator/FlowEventMediatorFactoryImpl.kt
#	components/flow/flow-service/src/test/kotlin/net/corda/flow/messaging/FlowEventMediatorFactoryImplTest.kt
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title failed to match regex -> ^((CORDA|EG|ENT|INFRA|CORE|DOC|ES)-\d+)(.*)

@mbrkic-r3 mbrkic-r3 changed the base branch from mbrkic-r3/CORE-17768/topoligy-new-topics to feature/51-perf-integration October 23, 2023 09:26
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title failed to match regex -> ^((CORDA|EG|ENT|INFRA|CORE|DOC|ES)-\d+)(.*)

@corda-jenkins-ci02
Copy link
Contributor

corda-jenkins-ci02 bot commented Oct 23, 2023

Jenkins build for PR 4955 build 7

Build Successful:
Jar artifact version produced by this PR: 5.1.0.0-alpha-1698331565070
Helm chart version produced by this PR: 5.1.0-alpha.1698331565070
Helm chart pushed to: oci://corda-os-docker-dev.software.r3.com/helm-charts/pr-4955/corda

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title failed to match regex -> ^((CORDA|EG|ENT|INFRA|CORE|DOC|ES)-\d+)(.*)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title failed to match regex -> ^((CORDA|EG|ENT|INFRA|CORE|DOC|ES)-\d+)(.*)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title failed to match regex -> ^((CORDA|EG|ENT|INFRA|CORE|DOC|ES)-\d+)(.*)

…ORE-17768/topoligy-new-topics-1-consumer

# Conflicts:
#	components/flow/flow-mapper-service/src/integrationTest/kotlin/net/corda/session/mapper/service/integration/TestFlowEventMediatorFactoryImpl.kt
#	components/flow/flow-mapper-service/src/main/kotlin/net/corda/session/mapper/messaging/mediator/FlowMapperEventMediatorFactoryImpl.kt
#	components/flow/flow-service/src/main/kotlin/net/corda/flow/messaging/mediator/FlowEventMediatorFactoryImpl.kt
@mbrkic-r3 mbrkic-r3 changed the base branch from feature/51-perf-integration to release/os/5.1 October 26, 2023 13:53
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title failed to match regex -> ^((CORDA|EG|ENT|INFRA|CORE|DOC|ES)-\d+)(.*)

Copy link

github-actions bot commented Dec 1, 2023

This PR is stale because it has been open 7 days with no activity. Remove the Stale label or add a comment - otherwise this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Dec 1, 2023
Copy link

github-actions bot commented Dec 8, 2023

This PR was closed because it has been stale for 7 days with no activity.

@github-actions github-actions bot closed this Dec 8, 2023
@github-actions github-actions bot deleted the mbrkic-r3/CORE-17768/topoligy-new-topics-1-consumer branch October 2, 2024 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants