rev2004 / android2cloud

Automatically exported from code.google.com/p/android2cloud
0 stars 0 forks source link

Improve queueing functionality to avoid 'missed links' #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What I'd like to see:

Change the queuing system so that the server side tracks whether a link was 
read by a client or not. 

Currently, any links sent to the server while the extension is down are lost, 
because the extension only opens links arriving after it has been configured. 
If the server tracked the read/unread state of the links, the client could open 
all the pending links since it was last used.

This could also possibly be abused to have multiple clients with the same 
resource name. Example: Send items to 'Computer' and have both home PC and work 
PC use that name. Whichever PC is started first opens all the queued links and 
keeps up with them until shut down. (ie. anything opened on the commute home 
would be opened by the home PC, if it was started that day, or by the work PC 
the next day if one did not start the PC at home ...)

Original issue reported on code.google.com by lev.ar...@gmail.com on 4 Jan 2011 at 1:43

GoogleCodeExporter commented 9 years ago
Thanks for the suggestion.

Right now, we have queuing set up so that when the client connects, it tells 
the server the id of the last link it received. The server then responds by 
sending every link that was sent *after* the id the client said. Seeing as 
links are being sent to clients, this system should ensure nothing gets lost or 
missed.

The problem is, the extension is basically resetting itself after it is closed 
and re-opened. As soon as the extension is patched, you should see queuing work 
as you expect.

The problem with multiple devices using the same name is that the Channel API 
requires each connection to have a unique name. So if those two connections 
were ever active at the same time, neither would work consistently. However, if 
you know that they will never be connected at the same time (e.g., they're two 
different operating systems on the same laptop) and you just want the link to 
open on the first available one (i.e., it doesn't matter which opens the link, 
you just want it ASAP) then you can feel free to give them the same device 
name, and it should work as expected.

Original comment by foran.pa...@gmail.com on 5 Jan 2011 at 4:35