Analogy between reactive streams and electrical currents

20 views
Skip to first unread message

Cyrille Corpet

unread,
Apr 7, 2017, 5:42:47 AM4/7/17
to Akka User List
I have an akka-stream project, in which I'd like to detect bottle-neck stages, to try and optimize them.

I was thinking that it could be useful to use an analogy between streams and electrical currents, to see which parts are more resistive.

Electrical intensity can be easily understood as the rate at which elements are streamed at a given point, in elts/sec. However I have trouble understanding what would be the analog for tension between two points of the flow (or potential at some point) in this setting.

Any ideas? 
If you think this analogy has no meaning at all, could you explain why, and maybe give me clues on how to find possible bottle-necks ?

Thanks!

Johannes Rudolph

unread,
Apr 18, 2017, 10:16:31 AM4/18/17
to Akka User List
I think that's a valid analogy. A while ago we were investigating similar things and also arrived at that analogy. In practice, it turns out that fused streams, i.e. multiple stream components that run in one actor will skew measurements.

Not sure how much sense these analogies make when going further down this route. Just following the types (i.e. the units), we could define the unit of resistance as work units per element, which would give us for the potential work unit per time. So, the resistance would describe the "weight" of the stream element, the potential the speed of the CPU, and the intensity the resulting speed of processing.

Johannes
Reply all
Reply to author
Forward
0 new messages