-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windowed FiFo Queue #3
Comments
Are you supposing a new Queue like I have just read the link you provided but it seems that's a scenario of a Server/Client network protocol. Could you please provide your scenario that needs this kind of Queue, to make it clear for me? I would like to add it if you could prove it's a useful common feature. Thanks again for your feature request! |
Thanks @zixia A scenario would be for example the reading of a sensor that constantly sends update of graph of lines that is maintained comparing periods of time, thus I can move the graph so as to only display the desired window of time, this hisencia of data would be in an array , the WindownedQueue or WindownedView would display only the desired window of the array. Today I do this with two arrays one keeps all the history and another is getting and I'm replacing the old data with the new ones using the Array.splice function, but it's very slow, because if I'm not mistaken it recreates an array every time which is called. And each array in my case has between 1000 and 2000 items. https://gist.github.com/carlosdelfino/25f41a053eed2859fd1a8fba7ce84f63 See in the gist the callback function, there is a small part of the code that updates a NativeScript ObservableArray. Another example could be a line chart that displays real-time stock market counts every hour and can be compared to other time windows for decision making, and both would be updated in a synchronized fashion. Yet another use would be for example a Google Analytics chart. |
I did not fully understand your scenario but it seems not like a RxQueue problem? |
I started to write a FIFO queue that works with a window concept, ie it has all the features of the common FIFO, however I can delimit a content perception window.
Entering data they will enter the QUEUE and exit according to the limit of the size allowed for it, but whenever you query an item in index 0 for example will return the first item that the window allows. if item 5 is requested, the fifth intem of the window will be returned.
The other option I am analyzing is that I can have a DataView, or WindowView, object that would view this FIFO as if it were an independent FIFO but actions on it only occur in the perception window.
Below is an image that speaks more than all this explanation.
Credit: https://www.cse.iitk.ac.in/users/dheeraj/cs425/lec09.html
thanks.
The text was updated successfully, but these errors were encountered: