groupoffice
groupoffice copied to clipboard
Client update delay
@Intermesh/intermesh Do you know about any client update delay after somebody change the entity data? Since 6.6 it looks like there is huge delay (well not huge but still visible by end-user).
Did you plan replace sse with anything like laravel-echo-server? It could be also alternative to sse because the address of echo server should be configurable. Some companies could use Pusher if they already use it.
@mschering could you provide any advice please? You already wrote to Martin there could be delay up to few minutes which is basically issue - at least for user who invoked the entity changes. If you calculate lets say status in tree structure path for each node on the server if you are lucky you get updated data immediately but it could take few minutes as you mentioned. laravel echo server, pusher, ably or any other similar technology will fix this issue. For ExtJS you can create official librarires or autobahn.js. After that you can use something like
to handle incoming messages. I use this feature to display info about phone caller.
sse.php checks for changes each 30s I believe. But if you open a list (do a Foo/query) it also checks the state and updates immediately. What problem are you trying to solve?
The only problem is you have to initiate check for changes from frontend. One case I had to solve I have solved with go.Db.store('<entityName>').getUpdates(); in jmap request callback. Sometimes you had to simply calculate state for other entity. Also there could be situation when you have to initiate request from server. For this purpose I use simple server similar to laravel echo simply because 30 seconds is basically too long.
Can you give more details about your use case? Normally it's not necessary to call getUpdates() yourself. When you do any interaction with the API it detects changes.
It is pretty complex scenario. You have to update job and job component entity status when you update job report entity. Also each component entity could have another component below it so you have to update all nodes up the component related to updated job. Yes normally you dont need update any other entities stores :)
One more scenario I just found - two side relation. Entity Invoice - has defined mapping to ItemProperty. However you have to be able modify the item record in property table. Until now I was using entity Item. It works well until you have to display updated Invoice->items in grid. Also after Invoice is updated you have to update Item entity somehow. So in dialog I call:
onSubmit: function (success, serverId) {
go.Db.store('MyEntity').getUpdates();
},
In this case I have to initiate change server side too. Of course it could be much better use Invoice with relation to entity Item however for this case I am missing UI component :) Also in this case it is not simple relation like Invoice and item but you have to store some additional attributes which won't be used when you edit the Item entity from item dialog.