veracitylab / provenance-injector

inject provenance into JEE applications
Apache License 2.0
0 stars 0 forks source link

Tracker Abstractions #8

Closed jensdietrich closed 9 months ago

jensdietrich commented 10 months ago

At the moment all information is stored in trackers (singletons), this will need some abstraction to facilitate different contexts, for instance, attaching trackers to HTTP/JEE sessions or making then thread local or spring context etc.

jensdietrich commented 10 months ago

Perhaps use observers / notifications + builder -- i.e. at top level (ProvenanceAgent) a builder or factory is referenced that can then create trackers. This builder/factory can be set by applications, or via service loaders etc. Trackers need APIs to support lifecycle, e.g. to avoid memory leaks. Trackers are information sinks, they make collected info available to clients, e.g. to serialise and attach to HTTP responses. Other implementations may include console logging, or trackers used for testing. We we would need to modify multiple trackers (as observers / listeners).

Matrixuniverses commented 9 months ago

Completed in 0d65afde6744c2cc0411048d70db011bb8dcbc7d