How can I implement my cross-platform library (e.g. on JRE) to operate in a thread-safe manner on object references, so that native front-ends on other platforms can observe the object and take advantage of Observable patterns?
A little background--there is a concept of data binding used in most front-end frameworks. In C# and Java this is related to the Observable trait that gives a class the ability to fire events when changes happen, to which multiple controls or "observers" may subscribe. This way the observers don't have to keep polling/reading the resource, comparing for updates.
I want to work on an analysis engine that makes changes to lists of data over time. It would be nice to be able to have the front-end be able to observe these lists while the analysis is running. It seems to me this would require the front-end to be able to pass an object to the analysis engine, written in a library that hopefully is cross-platform, and be able to make thread-safe reads to that object. Or else, have the library satisfy observability contracts.
The way this is handled in older Unix-style CLI engines is to use stdin/stdout/stderr, and have the engine post updates on regular intervals. This requires standard overhead and text parsing that I would rather avoid, if possible.