Skip to content
This repository was archived by the owner on Oct 18, 2018. It is now read-only.

Bug 815773 - process local commands#276

Open
ncalexan wants to merge 3 commits into
developfrom
nalexander/bug-815773-process-local-commands
Open

Bug 815773 - process local commands#276
ncalexan wants to merge 3 commits into
developfrom
nalexander/bug-815773-process-local-commands

Conversation

@ncalexan

@ncalexan ncalexan commented Dec 4, 2012

Copy link
Copy Markdown
Contributor

This is just the base stuff to process local commands. (local commands == commands generated by local actions, such as from Sync > Options).

There's UI work to be done on top of this, but we may as well look over this first.

The key point is that local commands are processed when the clients engine downloads its local GUID; that means there's a race if you haven't yet synced.

Braindump 1: there could be interactions if you reset your local GUID that I haven't considered.
Braindump 2: I should verify that local commands are deleted from the DB after processing. I think I did this, but I should verify. This probably needs to wait until UI is in place.

…cessor singleton initialization.

As CommandProcessor states, there are two times when we need the
processor: to execute commands during a sync, and to store commands in
response to local user action.  CommandProcessor refuses to send
commands that have not been previously registered (probably the right
choice) and therefore we need to register all commands that we might
receive *and that we might send*.  Therefore, we move command
registration into the CommandProcessor initialization.

This tightly couples CommandProcessor and GlobalSession, which is
unfortunate, but could be revisited later.
…mmands.

It is possible that there are commands in the database for the local
GUID that did not come from the server, namely locally triggered
"wipeAll", "resetAll", commands.  We should process them!
… configurable, and add test for processLocalRecords.
@ghost ghost assigned rnewman Dec 5, 2012

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making this non-final means that it's possible for registered commands to get lost. You need to define under what circumstances this processor is released, and when commands should register with a new one.

@rnewman

rnewman commented Jan 3, 2013

Copy link
Copy Markdown
Contributor

Do you have a new version of this, Nick?

@ncalexan

ncalexan commented Jan 3, 2013

Copy link
Copy Markdown
Contributor Author

No updated version yet. Your suggestions are good but make this significantly more work ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants