Skip to main content
Archived

Two input port ordered by group asynchronously

Related products:FME Form

jdh
Contributor
  • Contributor
Currently on a two input port transformer like NeighbourFinder:
"in order" means that an entire group must reach both ports before the next group reaches either port, for the transformer to work as expected.

I would like the order by group to work independantly, such that PortA can receive the first feature of Group2 before PortB receives all the features of Group1
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • October 31, 2015
This is an interesting one. Let's imagine we had you indicate that PortB's input was ordered by groups, but not PortAs. Could we assume then that as soon as PortB changed, enough input had arrived in PortA that we could safely process all of the current data in PortB? It seems like we'd have to then guard against more input for that now-processed group later arriving in PortA.

 

 

Could you provide a scenario where this would give a processing benefit?

Forum|alt.badge.img
  • November 2, 2015

I've hit this limitation myself. Consider:

 

 

Currently It functions thus:

 

 

Port A........Port B

 

Group 1..............

 

................Group 1

 

Group 2..............

 

................Group 2

 

 

But what I have wanted to do in the past is either this:

 

 

Port A........Port B

 

Group 1..............

 

Group 2..............

 

<etc>..............

 

................Group 1

 

................Group 2

 

................<etc>

In this case I want to allow all of Port A in (Ordered) before Port B arrives (also Ordered). Obviously this will require sticking the contents of Port A into RAM until B starts arriving.


Forum|alt.badge.img
  • November 2, 2015

Another example (the character limit on replies is annoying)

 

 

Port A........Port B

 

Group 1..............

 

Group 2..............

 

................Group 1

 

Group 2 ..............

 

................Group 1

 

Group 2 ..............

 

................Group 2

 

................Group 2

 

 

In this case, both inputs are ordered, but again, they arrive in a different order. Port B always arrives after Port A, but it could arrive while Port A is still getting some inputs (albeit later groups).

jdh
Contributor
Forum|alt.badge.img+28
  • Author
  • Contributor
  • November 2, 2015
Both Port A and Port B would be ordered (in the same order).

 

 

Consider an example with the NeighborFinder. If we had 100 groups where there are 1000 base features and 10 candidate features in each group. All 101000 features would have to arrive and be retained in memory before any processing could begin.

 

 

If on the other hand processing begins when both base and candidate features have changed, in the best case scenario only 1012 features would be in memory. In a more likely scenario all of the candidate features would probably arrive before the bases finished arriving. In that case we would still only have 2001 features in memory before processing could begin.

 


jdh
Contributor
Forum|alt.badge.img+28
  • Author
  • Contributor
  • November 3, 2015

This is the exact scenario that I encounter frequently.


mark2atsafe
Safer
Forum|alt.badge.img+44
  • Safer
  • November 22, 2016
I just found this behaviour and so asked our documentation team to document it better, because it really isn't clear. In a two-port transformer you need to do Port 1/Group A, Port 2/Group A, Port 1/Group B, Port 2/Group B, Port 1/Group C, etc - at least that will be made clear now, although it is nearly impossible to organize a workspace to do that. Throw in a Candidates First type parameter and the issues are even greater. Think we need to perhaps improve the ability to order features in a workspace. Anyway, just mentioning it.

 

 


jdh
Contributor
Forum|alt.badge.img+28
  • Author
  • Contributor
  • November 22, 2016
Agreed, this is impossible with two independent streams of data. The only way I can see it working is if you send both streams to a sorter and then use a tester to split them back into the two streams. But then the sorter holds all the features in memory and eats all the gains of having the input ordered by group in the later transformer.

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings