Ticket #259 (closed enhancement: fixed)

Opened 6 years ago

Last modified 6 years ago

synchronization of data between modules and gscf

Reported by: robert@… Owned by: robert@…
Priority: major Milestone:
Component: General Version:
Keywords: Cc:
Hardware: Operating system:
Product: URL:


GSCF contains data about studies, assays and samples, and connections between them. However, the modules also need to know some information about it, at least which samples belong to which assay.

Synchronization is now done by fetching all data from gscf, and saving necessary information locally (by the module). But the module has to do it every request, in order to provide the user with up-to-date information. Also, all studies have to be fetched, since the module doesn't know which study or assay has changed.

This takes a lot of REST calls, and could be improved. If GSCF would notice the modules of changes in studies or assays, the module wouldn't have to do so much rest calls.

It could be done like this:

GSCF calls module/rest/invalidate?studyToken=ABC when study ABC is changed (asynchronously, so GSCF can continue working; in study.save() and study.delete() methods). GSCF could call this method on every module, or gscf could keep track of modules that implement this method. The module now knows that the study should be synchronized.

The module can decide to synchronize immediately or wait until the given study is asked asked for (e.g. by marking the study as dirty). This also works for new and deleted studies: when the module synchronizes, it will notice whether a study is new, changed or deleted.

Change History

comment:1 Changed 6 years ago by robert@…

  • Owner changed from work@… to robert@…
  • Status changed from new to assigned

Results of discussion:

  • extra rest method 'getStudyVersionNumber' to ask for version number
  • module remains responsible for keeping data synchronized, gscf only sends updates
  • when a study is changed, GSCF calls rest url on modules for which the study has assays

comment:2 Changed 6 years ago by robert@…

  • Owner changed from robert@… to m.s.vanvliet@…

This has been implemented in r1357. I've added a getStudyVersion() method in the GSCF restcontroller to provide the modules access to the study version. I've also added a synchronizationService with one notify method. That method calls a REST url on modules who want to be notified (AssayModule?.notify = true). The url called is [url]/rest/notifyStudyChange?studyToken=abc.
This notification is done whenever a study is added, changed or deleted.

Would you test whether this works as you would expect?

comment:3 Changed 6 years ago by m.s.vanvliet@…

  • Owner changed from m.s.vanvliet@… to robert@…

I tested it and it works fine. Only I removed it again from the Metabolomics module as we use the REST session to see if somebody has access to a study/assay etc. So we have to make the call anyway... But the setup works as expected.

comment:4 Changed 6 years ago by robert@…

  • Status changed from assigned to closed
  • Resolution set to fixed

This change introduced a bug (see #273) which is also fixed. Closing now

Note: See TracTickets for help on using tickets.