question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multi emit v. single emit

See original GitHub issue

Problem: Currently, we are using two different approaches when it comes to transmitting a list of elements between components.

I. A component emits a message to the queue multiple times to deliver each element of a list as a single element to the next component. multi emit component, mec

II. A component emits one message to the queue holding the full list. Everything will be delivered at once to the next component. single emit component, sec

We want to allow both approaches to keep the framework more flexible. Therefore we need to adjust all components which are doing multiple emits.

To progress on this issue we have to:

  1. Detect all mecs within our scope
  2. Find a proper way to send currentEmit/allEmits (e.g 3/4)
  3. Find a proper way to handle multi emits in orchestrator (evaluate integers)
  4. Estimate changes to be done

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
winklerjcommented, Oct 21, 2021

I’m not sure where your final decision on this is, but I will weigh in that we make use of both MEC and SEC. Additionally our use case is typically to split and/or batch objects before sending to the rest of the flow steps. So it could be multiple SEC for one object. This is to avoid very large messages going through the flow. The batching gives us the benefit of making efficient API calls on subsequent steps. I don’t want to be asking for one result at a time when the API allows 250.

0reactions
SvenHoefflercommented, Oct 26, 2021

From our perspective, we’d certainly prefer it if SEC remained viable and supported in some fashion, preferably without having to adjust all existing components.

Batching at the receiving end does seem like the most feasible option currently, in part because it would also allow you to have a flow where a single source can distribute data both to single-processing and batch-processing receiving components, possibly through the use of logic gateways also.

The accumulation of batches could principally happen in either the ferryman, or a separate utility component. We’d have to touch the ferryman either way, it’s mostly just a question of how we’d want to distribute the resource load and trust.

Read more comments on GitHub >

github_iconTop Results From Across the Web

In Vue.js, how can I emit multiple value from child to parent ...
some library just emit multiple value - collect these values into an array or object, and pass it as the event.
Read more >
VueJS Custom Event - Emit Multiple Values
To emit more than one parameter, it's best to pass the data as an object: · The name of the event. In this...
Read more >
Emit Multiple Values from Child to Parent in a Vue.js Custom ...
To emit more than one parameter, it's best to pass the data as an object: · The name of the event. In this...
Read more >
$emit with multiple arguments loses data with inline listener ...
I ran into this by creating a list of components with v-for , listening to an event and I had to pass index...
Read more >
Component Events | Vue.js
A component can emit custom events directly in template expressions (e.g. in ... we can now create multiple v-model bindings on a single...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found