Add Sync Gotchas note.

This commit is contained in:
Brent Simmons 2019-04-29 14:45:20 -07:00
parent dab7da9d8f
commit c1b1917e25
2 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,20 @@
# Possible Gotchas To Be Aware When Working on Syncing
## Accounts and the local account
NetNewsWire was written to support multiple accounts.
However, there may be places where the code assumes the local account, when really it needs to refer to a specific account. These references should be checked.
However however, there are times when assuming the local account is actually correct — such as when importing the default feeds on the first run.
## Feed ID vs. Feed URL
With the local account, a feeds ID and its URL are the same thing.
With syncing systems, a feeds ID will often be completely different from its URL. (It might be a UUID, it might be a hash of something, it might be a database row ID.)
There are times when the code should refer to the ID and times when it should refer to the URL. Did we get it wrong sometimes? Possibly. Hopefully not, but possibly.
Also: if the syncing system uses an integer for a feeds ID, it should be converted to a string in NetNewsWire. This is what the database is expecting — because a string is the most flexible representation and can handle whatever the various systems use.

View File

@ -4,4 +4,6 @@ This document will collect notes relevant to syncing.
[Account Structure](Accounts.markdown)
[Why Articles and Statuses Are Separate Tables](ArticlesAndStatuses.markdown)
[Why Articles and Statuses Are Separate Tables](ArticlesAndStatuses.markdown)
[Possible Gotchas To Be Aware When Working on Syncing](SyncGotchas.markdown)