Adding Objects based on streaming data, and not duplicating them

I have network data that I need to turn into spheres and render them. I will be streaming traffic into vvvv, but I do not want to duplicate the spheres over and over again for the same IP address. Is there a way persist data for look up type operations in vvvv?

Hi I dare say that you need to reformulate your question to get an answer, usually adding an example patch helps a lot.
S.

Yo Rob I think I did something similar that basically pulls out tweets from twitter that contained a PHOTO attached to it, I then “saved” the tweet data with photo url and then, as required per old twitter API, i had to search another “page” of results to get further tweets with photo URLs… AND I had to check within my “saved” tweets that the ones on the new page haven’t got the same data/URL, BECAUSE by the time you search page one, get results, display them, then search page 2, there might have been new tweet appearing in page 1 therefore pushing some of the page 1 tweets into page 2! I think it is a similar problem to what you have, different api/data sure, but same problem: you do a query online, get results, save them then get more results, check if those are new and do something to them IF they are new and only if they are new…

Here is the “technique” I used: First use a QUEUE node to “save” the tweets/data. Before putting the data in the queue we check if the queue already contains the data by using a simple “=” node over the whole queue spread if we get any 1 then the data is already in the queue therefore we abort otherwise we add the data to the queue. You might have to throw a framedelay in there as well sorry I can’t remember. I am not sure if that is exactly what you are after if not let me know, I can also try and explain it better if it doesn’t make any sense… peace

@evvvil I did the same for Twitter and you may have missed that twitter will (was) sending to you the latest item so you don t need to check for new items in vvvv as the API is telling you when to fetch new stuff.

@OP you may want to have a look at the Store node, it s pretty useful to store incoming data, so basically if you place a Store between your netword data and the visual output it will act as a buffer

@io You’re right twitter does send the latest item, however what I meant relates to how the old twitter api would give you search results in “pages” of 100 tweets… Twitter old API, which I was using, when searched for a hashtag will return the 100 most recent tweets, no more…PER PAGE, so if you intend(ed) to get more than the 100 most recent tweets for one hashtag search you had to look up “another page” of tweet, so the way it worked is you get the most recent 100 tweet and that is effectively “page 1” if you want more than the first 100 tweets for this hashtag you need to look into page 2 and so on, literally you would add “&page=2” to your twitter hashtag search query string. SO you needed to do another online search for every other page of 100 tweets that you want to get, therefore there was a need to queue/store tweets. The reason why I needed so many tweets is simple: My v4 application lets you enter a hastag through keyboard and then shows every picture that has been tweeted with this hashtag and displays it on a 3d sphere made of quads with the tweeted picture as a fileTexture. The problem is that not everybody who tweets about a hashtag will also post a picture, and my app is all about the tweeted pictures, so out of 100 tweet on average I would get about 10 pictures, which isn’t enough… So I had to search twitter API again for the next 100 tweets (page 2 search) and so on, until page 15 which is the last one you can search (so effectively the maximum amount of tweets you could get in theory for any given hashtag search is 1500 tweets, that is with the OLD API!). So for my application I HAd to store the 10 pictures URLs that i got from the first page 1 twitter search then search on page 2 AND compare the results from page 2 search to check if any of the page 1 tweeted images where now pushed to page 2 (because between the time of page 1 results coming and being stored then page 2 results coming and being stored there could have been someone tweeting a picture and pushing tweet number 100 to number 101 which means that tweet ends up on page 2 now) Finally I was actually also conscious of avoiding duplication of same image, As one picture can get twitted by more than one user yet using the same hashtag, so this check to see if the url was already in queue avoids avoids duplication of same picture appearing on the tweet sphere.

Very interested to hear you also played around with twitter and vvvv! By the way I have seen your posts all over this website and you have helped me before in the past by answering some forum questions which I also happened to be scratching my head about, so I would like to thank you for your contribution to the vvvv community io, it’s very appreciated! WICKED!

er… thanks /blushoff

What I meant is that you can ask Twitter API to send you only the tweetes which ID comes after a given ID, so you don t need to scream among the whole result but just get what you haven t got already.

since_id optional

Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available.

about images I just looked for tweets which had images then got the URL and wrote them down to a folder, this folder was the equivalent of the Store node that I used for plain text tweets.
The only problem with this method is that only images originating from the Twitter own image system are supported, any other service (3rd party) won t work, as there is no direct URL available for the image.

@j105rob : sorry for sapmming this thread hopefully you can make good use of this info for your purpose