public inbox for [email protected]
help / color / mirror / Atom feedFrom: Khushboo Vashi <[email protected]>
To: Aditya Toshniwal <[email protected]>
Cc: Victoria Henry <[email protected]>
Cc: Harshal Dhumal <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: RM#3294 - User need to reset the layout to see the changed preferences parameters
Date: Fri, 15 Jun 2018 10:46:16 +0530
Message-ID: <CAFOhELeSmy8e6aGr1ZmwEq4d91JvQ1cYejBMNkc1dOv3o=+2Jw@mail.gmail.com> (raw)
In-Reply-To: <CAM9w-_kJjczpv1=tNWDkNyVX=2hr0AaXzgQT0-RCjD1Q_e0Qaw@mail.gmail.com>
References: <CAM9w-_=G54p43OBgLB3kMQhQDosW2+7mu7sXtuPSCXxuiRhBhg@mail.gmail.com>
<CAFiP3vw5U_zU_KysL1rPs1hQs0iMbW1ZgZ7WVC58x+0V-9Rc_g@mail.gmail.com>
<CAM9w-_mm2kxja3_WqoSxa8xyKkaDLBCZavvUhajtgaC7qn57OA@mail.gmail.com>
<CANxYE3J4wD1ZqyqTJV2Jv69_UWg7ky7bFzw=S8r4MOz_NtfOSg@mail.gmail.com>
<CAM9w-_kJjczpv1=tNWDkNyVX=2hr0AaXzgQT0-RCjD1Q_e0Qaw@mail.gmail.com>
On Thu, Jun 14, 2018 at 6:54 PM, Aditya Toshniwal <
[email protected]> wrote:
> Hi Victoria/Hackers,
>
> On Tue, Jun 12, 2018 at 9:52 PM, Victoria Henry <[email protected]> wrote:
>
>> Hi Aditya,
>>
>>
>> It is not possible to fire event in another tab/new browser window. For
>>>>> example, query tool can be open in another tab. And thus, changes are not
>>>>> reflected there. There are solutions available like updating the
>>>>> localStorage of the browser but those are not reliable and does not work
>>>>> properly on different browsers.
>>>>>
>>>> To communicate between browser tabs we can use cookie polling on client
>>>> side it self (at least it will avoid polling over http).
>>>> The main tab will update only preference specific cookie when
>>>> preference is updated and other tabs will poll required cookies (not all)
>>>> with specific interval (1 second can be configurable).
>>>>
>>> Polling is a solution but I think it should be the last option. http
>>> polls will not be required anyway as we have preference cache in the
>>> browser object.
>>>
>>
>> Maybe it's better to poll only when an editor is open in a separate
>> window? What would we be polling for and how would be tell the backend
>> that something changed during the poll?
>>
>
> Currently I am using the cache_preferences function to fire the events.
> cache_preferences is called whenever preferences are changed. I suggest we
> add kind of version for the preference cache, lets say prefcache_version
> and we can set it to current epoch time whenever the cache_preference is
> called.
>
> Now, when a new tab/window is opened, it will store the version of
> prefcache it is having. When the main window changes the preferences and
> cache_preference is called, the prefcache_version will increase to current
> epoch time. New tab polling can check if the version has increased and can
> update its preferences along with prefcache_version.
>
> Sounds good to me.
> Please let me know if any suggestions.
>
>
>> Thanks
>> Victoria & Joao
>>
>
>
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"
>
view thread (6+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: RM#3294 - User need to reset the layout to see the changed preferences parameters
In-Reply-To: <CAFOhELeSmy8e6aGr1ZmwEq4d91JvQ1cYejBMNkc1dOv3o=+2Jw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox