Ok, So finally I could transform my JS libraries into modules and now everything is super-modular.
I also replaced mousemove by mouseover because it is less demanding. When Tapestry 5.4.2 is released and "Invoking server-side event handler methods from JavaScript" is available, I will replace the ZoneUpdater by this kind of call. Everything is running well, so now I am working in the cache, but that is out of the scope of this question. Thank you all for your help Phy El 10/04/17 a las 23:39, Thiago H. de Paula Figueiredo escribió: > On Sat, Apr 8, 2017 at 11:13 AM, Phyambre <phy....@gmail.com> wrote: > >> Hi Thiago, >> > Hi! > > So if I move the code of the task from onActivate() to setupRender() as >> Geoff suggested, I will not have the task on onSubmit() anymore, so I >> cannot check whether the user finished before the deadline. A solution >> is getting the task from database both on setupRender() and onSubmit(), >> but I don't know if this is more efficient than leave the code in >> onActivate(). >> > Yes, it is more efficient, because that code will only be called when you > actually need it. > > >> The point is, I wanted the task and the stage and the text/quiz to be >> obtained only once from the database, and kept in memory until the user >> finishes the stage. The objects are big and storing them in the session >> may be a bit overkill. Maybe make a cache in the server (concurrent >> HashMap<userId, currentTask>) is the solution? In principle, the number >> of users that can use my app is limited let us say less than 300 so >> maybe such a cache is viable. >> > In both cases, you're storing this big object in the process' memory. I'd > go for a cache. > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org