We have some very exciting news about our 2.0 syncs! We’re proud to announce that we are moving to a brand new system and completely getting rid of the underlying syncing mechanism 2.0 used to rely on.
If you’re familiar with the 2.0 version of our API, you may already know that this version of the API uses a syncing mechanism to keep a user’s mailbox updated.
How it’s worked in the past
The syncing mechanism in 2.0 used to work as follows:
- A change would be detected in the mailbox (i.e. a new message arriving, or a message being moved, deleted or sent).
- This change detected would trigger a sync for the account
- The sync would enter the sync queue and be performed in the order it arrived
- While the sync waits its turn in the sync queue, subsequent syncs triggered for the account would be discarded
- The sync completes, new messages are synced with the mailbox, webhooks are sent for new messages (if webhooks exist for the user / application)
The problem with this system
This old syncing mechanism was not robust enough. There would often be too long of a lag between the time a message arrived in a mailbox and when it would be available to Context.IO due to the syncing wait time.
The Future (a.k.a. our new system) is here!
This new system is built on top of a stream of event data, that will keep changes in a mailbox as close to real time as possible and drastically reduce the latency in 2.0.
What does this mean for your application?
- First and foremost, you no longer need to worry about syncs! For this reason, the sync endpoint will be deprecated and no longer needed.
- Reduced latency of webhooks. You will get webhook callbacks much faster after a change is detected in a mailbox.
- As of now, the initial sync times are longer than the old system but we expect it to speed up in the coming days and weeks as we optimize the new system. We’re also adding a new webhooks option so you can receive alerts for historical messages during the initial sync. This will allow you to start using the data much faster and not have to wait until the messages to been added to the caching layer.
If you currently use the sync endpoint in your code, we recommend removing any calls to this endpoint, as it will become deprecated in this new system.
If you have any questions about this change to the 2.0 API, please reach out to us via email@example.com.