11

Intrigued by Flow Based Programming a la J Paul Morrison. I wonder if one can implement FBP in Excel/VBA. I searched quite a bit for a Basic-Lang FBP implementation to no avail. I've looked at some FBP implementation details in Python but I'm not grokking it. VBA is what I'm most familiar with, but I'm suspicious that VBA can do FBP at all, without having coroutines or (?). Code 2 simple components, an Info-Packet Buffer Class, and a linkage between them and I would get it. I can't see where to begin.

Specifically I wonder:

  1. What would be the In-Ports, Out-Ports, 'bounded-buffer' graph-edges, and code to link them up look like?
  2. How to do message passing? Using raised application events?
  3. No way the resulting beast is inherently parallel or asynchronous, right?
  4. If it just can't be done in VBA, why not?
14
  • There is a somewhat related post on multi-threading in Excel 2007: stackoverflow.com/questions/14677866/… Multi-threading is not fully supported in VBA. Commented Sep 15, 2013 at 11:33
  • @AxelKemper: dataflow programming AFAIK does not need any multihreading.
    – Doc Brown
    Commented Sep 15, 2013 at 13:33
  • ... though it will multithreading make easier.
    – Doc Brown
    Commented Sep 15, 2013 at 13:41
  • The C# FBP implementation (jpaulmorrison.com/fbp/CsharpFBP-2.3.zip) of "Component" makes heavy use of Threads. So does the Java implementation. Co-routines should be sufficient but difficult to implement in VBA. One could use Excel's inherent serialization feature which is working behind recalculation of a spreadsheet. But this would probably lead to a very limited mini-FBP. Commented Sep 15, 2013 at 15:46
  • 1
    You can simulate flow based programming in VBA: you can create long-running encapsulated black-box objects in VBA, and link them together using a VBA script. You can do simple FBP in Excel: You can create and execute multi-threaded objects in Excel, and control them using a VBA script. You can do more complex FBP in Excel with the "HPC Services for Excel" and an HPC cluster. None of this meets the narrow definition of FBP, because there is no way of implementing "fixed-capacity" connections.
    – david
    Commented Nov 30, 2016 at 7:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.