Consider this a presentation by Joe Cheng, he explained how he and his colleagues implemented the reactive structure in brilliant (inspired by Meteor ):

Actual question
Can someone explain to me how I am going to find out about reactive object dependencies (i.e. indicate their names and environments, actually access them, etc.) that shiny::reactive() automatically output?
In particular, I would like to use this information in my custom “one-stop-shop” setShinyReactive ( reactr package), which is based on brilliant functionality.
This should be as possible as possible using the methods of one of these components / classes:
- reactive conductor (I assume basically the class
shiny::Observable ) - reactive endpoints / observers (I assume mostly the class
shiny::Observer ) - reactive context (I assume mostly the
shiny::Context and shiny::ReactiveEnvironment classes)
But I'm still lost in the evidence about this.
Due dilligence
You can find my forked version of the shine that I used for my reverse engineering efforts here . This .Rnw file represents my current knowledge status and questions about actual implementation.
A brief example of shiny::reactive()
require(shiny)
Background: Bidirectional Snaps
The reason I would like to do this is because I would like to specify bi-directional reactive bindings using the original (or only slightly adapted) brilliant functionality (for examples see README here).
Joe, who was really helpful and faithful so far, but who is also too short in time, began me with this:
require(shiny)
However, to integrate this into my setShinyReactive implementation, I need to find out if the o$.value <<- v statement ( currently line 203 ) is valid or not:
## Call to 'makeActiveBinding' // makeActiveBinding( id, env = where, fun = local({ visible o function(v) { if (missing(v)) { } else { if (strict_set == 0) { o$.value <<- v ## --> this should only be allowed for bi-directional relationships } else if (strict_set == 1) { [...] } else if (strict_set == 2) { [...] } } [...] } }) )
This applies only to bidirectional reactive objects, since they are a kind of "hybrids": simultaneously reactive conductors and reactive sources.
This is why I need to find out if bi-directional situations exist or not, which in turn implies that I need to find out the dependencies of each object
For my other kind of “pedestrian”, take reactivity based on setReactive , I requested bi-directional dependencies using the .hasBidirectional method. This is the information I would like to get from the correct brilliant instance / class that stores this information somewhere.