Skip to content

High order component builder #26

Description

@hovsep

Creating separate components is ok for simple use cases, for complex scenarios some patterns may arise naturally. For example, load balancer pattern. We may provide a convenient way of creating such patterns without manipulating individual components.

The LB may look like this:
fm.AddComponent(
component.NewLoadBalancer(workerActivationFunction, numberOfWorkers)
)

The idea is to pass an activation function which will be used in all workers of the LB and the number of that workers. Additionally we may pass a balancing algorithm (random, round-robin etc). The constructor will create 1+ numberOfWorkers components and connect them in appropriate way, so input signals will be balanced to that workers.

Open questions:
should we pack LB as another fmesh, or just return a collection of ready to use components?
should we somehow pass the information about interconnecting ports, or constructor will take care of it (which means we need some sort of naming convention)?
which are the patterns except LB, users can take benefits of? (it looks like a good idea to check out existing patterns in network\microservice architecture, some of them will naturally be useful in FMesh)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions