Home Help Center

IceJS 3.6 Bower Package - Web Worker Usage

chrisgchrisg Member Chris GordonOrganization: LevauxProject: Autonomous building management agents
Hi,
Great work releasing all the new features in Ice 3.6!

I have spent today upgrading and testing our projects with the latest version however I have hit a little snag with changes to IceJS.

Specifically I notice now that the Ice.Timer use's a web worker background process:
https://github.com/zeroc-ice/bower-ice/blob/master/lib/Ice.js#L2389

I was alerted to this as I previously managed the entire Ice connection in a web worker to avoid an issue where browsers (chrome in particular) would stop sending keep alive heartbeats if the tab was in the background for longer than usual. This worked really well with Ice 3.5.1 and Ice 3.6b. Now in Ice 3.6 due to the restrictions of web workers Ice cannot create the Timer web worker thread from within my existing web worker.

So my question is, was this changed to combat the browser problem I have mentioned above / is that a known issue at all? If so what I need to do is pretty clear. Stop using my work around with web worker for maintaining Ice connection. :)

I have been testing with the latest Chat Demo for an hour or two and it doesn't seem to have connection drop outs when chat tab is in the background that Ice 3.5.1 had. I suspect this may be a results of change to Web Worker for timer or ACM changes in Ice 3.6?

Thanks for advice in advance.

Cheers
Chris

Comments

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Chris,

    We move the timer to a worker to avoid the problem you mentioned and other similar issues with timers.
  • chrisgchrisg Member Chris GordonOrganization: LevauxProject: Autonomous building management agents
    Awesome! Thanks for swift reply!

    Cheers
    Chris
Sign In or Register to comment.