Project

General

Profile

Actions

Task #1121

closed

Execute synchronization asynchronously

Added by Vít Švanda over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Vít Švanda
Category:
Synchronization
Target version:
Start date:
06/05/2018
Due date:
% Done:

100%

Estimated time:
Owner:

Description

Execute synchronization asynchronously. More syncs for same system.

For now is:

- DefaultSynchronizationService is LRT and prototype.
- Sync executor is singleton (for same entity type).
- Scheduled LRT starts LRT (DefaultSynchronizationService).
- WF for item call SynchronizationService (singleton).

We need:

- DefaultSynchronizationService is not LRT and singleton (rename to Manager may be).
- Sync executor is prototype in the 'map' (thread save), where key is ID of sync configuration. Executor has relation to instance of LRT.
- Scheduled LRT call SynchronizationService.
- WF for item call SynchronizationService (singleton) - passes ID of Sync configuration.


Related issues

Related to IdStory Identity Manager - Defect #1316: Synchronizations of different systems cancel each otherClosedVít Švanda10/11/2018

Actions
Actions #1

Updated by Vít Švanda over 6 years ago

  • Description updated (diff)
Actions #2

Updated by Vít Švanda over 6 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Vít Švanda over 6 years ago

  • % Done changed from 0 to 40

I started with refactoring LRT, Sync service, start sync processor. I have problem with sync/async tests (in ACC) now.

Actions #5

Updated by Vít Švanda over 6 years ago

Actions #6

Updated by Vít Švanda over 6 years ago

  • % Done changed from 40 to 80

Fix WF and api for linked and missing account situations, created tests:

https://github.com/bcvsolutions/CzechIdMng/commit/364ea640cb0e9c300bd11b374dcb7ee4ddb1bf45

Actions #7

Updated by Vít Švanda over 6 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Vít Švanda to Radek Tomiška
  • % Done changed from 80 to 90

On the end I removed a events for start and cancel sync. Documentation and changelog is completed too.

Commit:

https://github.com/bcvsolutions/CzechIdMng/commit/1747aefc371345fc9e78425840764961aa0e7de4

Radek, could you do review please (sorry for to many commits)?

Actions #8

Updated by Radek Tomiška over 6 years ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Radek Tomiška to Vít Švanda

It works and code looks nice - i like synchronization service as singleton and events removal.

I found two features, which could be implemented (not really related to this ticket but related to synchronizations :)):
- add validation, when other sync for the same config running already - prevent to try start another long running task, which fails anyway, but previously run sync will be broken too
- when sync is running, config could be disabled - config cannot be changed anyway, because running sync overrides filled values, when token is updated.

Actions #9

Updated by Vít Švanda over 6 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Vít Švanda to Radek Tomiška

I added validation on start sync task, start of sync, save sync config, delete config.

https://github.com/bcvsolutions/CzechIdMng/commit/13bd730a9259ca2c68b8f839ccd4e14f863d679e

Actions #10

Updated by Radek Tomiška over 6 years ago

  • Assignee changed from Radek Tomiška to Vít Švanda

i did test and review, it works! Thx!

Actions #11

Updated by Vít Švanda over 6 years ago

  • Status changed from Needs feedback to Resolved
Actions #12

Updated by Vít Švanda over 6 years ago

  • Status changed from Resolved to Closed
Actions #13

Updated by Vít Švanda over 6 years ago

  • % Done changed from 90 to 100
Actions #14

Updated by Radek Tomiška about 6 years ago

  • Related to Defect #1316: Synchronizations of different systems cancel each other added
Actions

Also available in: Atom PDF