Giter VIP home page Giter VIP logo

Comments (11)

bkaankose avatar bkaankose commented on September 26, 2024 2

Mail and Calendar allows syncing "as items arrive", I'm wondering if it's possible for Wino to implement that? Screenshot 2023-12-16 195555

Everything is possible with runFullTrust capability. Right now I'm maintaining 3 different synchronizers. Outlook API, Gmail API and IMAP/SMTP. All of these have their own implementation to speed up things and support different features like Focused inbox for Outlook or Label colors for Gmail.

If I were to refactor wino core (library that handles synchronization) I would just abstract authentication into 3 and only go for IMAP. I'm actually thinking about that for a while. With good planning this can be achieved. Imap synchronizer will be the most stable and only one that does all. It can keep the connection alive and receive mails as they arrive. If the app is closed, an app companion living on system tray can handle the connection.

The app became from Outlook > Gmail > IMAP. That's why it's a challenge to shift things right now. Also runFullTrust will indicate users that Wino can use all of their system resources during install. That's also something I want to avoid.

Options

  1. Only runFullTrust

Move background synchronization smaller app companion. Make it synchronize accounts every 1,2,3 or x minutes. We can go below 15 minutes.

  1. runFullTrust + IMAP

Get rid of MS Graph and Gmail SDK. Users won't have Focused inbox for Outlook. Category folders and label colors for Gmail. Potentially slower synchronization for Gmail because Gmail API is very smart about sending the changes only. I don't think it'll be faster for imap sync. Listen to Inbox changes with imap connection -> get the mails as they arrive from app companion that runs with fullTrust.

  1. Ditch UWP and go for WinAppSDK

Migrate app to WinUI3 + WinAppSDK. I did this in the past. Everything runs fine, but startup performance is not instant. Right now Wino's launch performance is not something I want to give away to be honest. This migration will also make Wino not compatible with other UWP platforms like Xbox. Now who needs a mail app on Xbox? I don't know. It's not a big thing but still a thing. Technically Wino can even launch on Hololens, but yeah... Who cares :)

  1. Push notifications with API subscriptions

Outlook and Gmail API support webhooks for changes on specific folders, but they can't send this info to local devices. My web server must have it and deliver it to you. For Wino to have this, I need to have your access token in my server. This is not ideal and a big security flaw + something that I can't manage. So technically possible, but it's not an option on the table :)

from wino-mail.

AkazaRenn avatar AkazaRenn commented on September 26, 2024 1

Mail and Calendar allows syncing "as items arrive", I'm wondering if it's possible for Wino to implement that?
Screenshot 2023-12-16 195555

from wino-mail.

bkaankose avatar bkaankose commented on September 26, 2024 1

@bkaankose Is there any way to tell the sync task to fetch not only inbox but also all folders? Especially when opening the app.

There is no such thing right now but I will implement it for the next version.

from wino-mail.

17blue17 avatar 17blue17 commented on September 26, 2024

same question how often does it sync?

from wino-mail.

bkaankose avatar bkaankose commented on September 26, 2024

There are 2 background tasks that control the synchronization.

  • Every 15 minutes will do Inbox sync for all accounts.
  • All folder sync when you logon to Windows.

Now the problem here is that background tasks in UWP must be energy efficient. Windows may decide to cancel or not run one or more of these tasks for any given time. I am still experimenting couple things to make it more reliable, but if you want to explicitly allow Wino to support background tasks more reliable way:

1- Right click Wino and go to settings

image

2- Make sure app can "Always" run in the background instead of Power optimized

image

3- Optionally you can setup Wino to launch on Startup. It will launch Wino minimized on Windows logon, which I believe will help background sync to run better.

from wino-mail.

17blue17 avatar 17blue17 commented on September 26, 2024

thank you for the information and support.

from wino-mail.

AkazaRenn avatar AkazaRenn commented on September 26, 2024

@bkaankose Thank you for the thorough explanation! Seems like Push notifications with API subscriptions is the most efficient yet powerful way to do that, but would cause some security concerns. As a workaround, would it be possible that users may deploy webservers with access tokens of their own, and make them sending notifications to Wino? Just my two cents!

I definitely want to keep Gmail categories, since that's the only reason I'm still using it. If switching to IMAP would lose this function, it might not be worth the loss.

from wino-mail.

AkazaRenn avatar AkazaRenn commented on September 26, 2024

Of course, the best solution would be to let Gmail support pushing updates to local devices. I was reading the push API provided by Gmail, it seems like a REST call from the client to Google, that might be usable without a server in the middle. Everyone gets 10 GB data per month for Google Cloud Pub/Sub, that should be quite enough for regular usages. It would be fantastic to have in the future if possible. Users will create Pub/Sub topics of their own, and provide that to Wino for subscription.

from wino-mail.

yakamoz423 avatar yakamoz423 commented on September 26, 2024

@bkaankose Is there any way to tell the sync task to fetch not only inbox but also all folders? Especially when opening the app.

from wino-mail.

AkazaRenn avatar AkazaRenn commented on September 26, 2024

@bkaankose if we are going to have a companion for receiving pushes, maybe we don't have to give up on Outlook/Gmail SDK? We can let the companion be the listener of the push, just like IMAP idle. But if you find it too much work, starting with IMAP only is still very very good to have! And I personally don't mind having the whole app running but minimized if it can receive the emails in real time, since Windows will put it in efficiency mode anyways.

from wino-mail.

bkaankose avatar bkaankose commented on September 26, 2024

This effort is being tracked on #270 going forward.

Closing as duplicate.

from wino-mail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.