0

Im trying to get an understanding of different coding methods to manage feedback loops. There are a variety of languages I can use (js being the most desired)

Essentially, I have multiple threads of data coming in and going out like so:

direction id   float
in        31   0.2313
out       32   0.4564
in        33   0.2656
out       31   0.5464

Notice the two id's for 31? I need to filter the "out" direction.

I'm a bit lost with this and trying to figure the right method to use. I'm guessing I need some kind of timing switch, to wait for a certain period (like a gate).

Any thoughts would be much appreciated.

Heres a diagram to explain better

enter image description here

Cheers

Ke

dedek
  • 7,981
  • 3
  • 38
  • 68
Ke.
  • 2,484
  • 8
  • 40
  • 78
  • Being a long time javascript developer I have to say: I have no idea what you're talking about. Can you provide a clearer example? (doesn't have to be code if you have no idea where to start, can be a flow chart or diagram or even a long description of the process in plain English) – slebetman Sep 05 '14 at 03:48
  • Sure I didnt explain it very well, have added a diagram, many thanks for taking a look – Ke. Sep 06 '14 at 13:09
  • Still doesn't help. What is in, what is out, what is data? Ajax responses? Strings? Arrays? Objects? How are you receiving them? Is it in a single function call? Spread across multiple async requests? I have no idea how to help you because I have no idea what you're doing. – slebetman Sep 07 '14 at 00:01
  • Also, how long do you want to "ban" the id? One function call? `X` number of seconds? One request? – slebetman Sep 07 '14 at 00:03
  • yes, I think number of miliseconds. Its a bit tricky to put in a conventional context, because this isnt being used on the web, its integrated into a program called max (cycling74). Both in/out data is coming in as strings and sometimes in and out data has the same id. When it does have the same id im hoping to filter the "out" so that only "in" is let through. I probably shouldnt have used the terms in/out, it probably could have been explained just as well with a/b – Ke. Sep 07 '14 at 13:31

0 Answers0