i am using event-source rpc plugging for data pushing from server side after a certain period eg. 200ms, so no client request exists, therefore i need a buffer (FIFO) in the client side because server send a lot of data(200ms is very fast) and to display the data in the client side graph (i am using GChart), i need to show it smoothly in the client side and that´s why i need the buffer in client side to hold the data and show the values (x,y)(x1,y1)(x2,y3)….(Xn,Yn)… in the graph in FIFO manner and perform smoothly and also i can dynamically adjust the 200ms delay according to the client performance and sending back an information to server about
Communication between client and server can be written as human conversation as below
Client: slow down mr server i can not handle so much data also my FIFO buffer is full..
Server: ok i am changing my delay time from 200ms to 500ms, but when you have less data to perform please let me know i will chage it again to faster mood that is 200ms.
Client: ok, now send my fast data my buffer is empty.
Thanks in advance Gwt, gchart, event-source
A simple ArrayList won’t do? (Used as a buffer, by just appending values and remove first element?)
If this is too slow (too much Java emulation overhead) you could probably create a more java native array, or find some ready made implementation, to work with.
I would start using a simple straight forward ArrayList and see if it works fast enough, and if it turns out to be too slow, I’d look for some faster alternative…