Wednesday, May 27, 2015

In the Elixir implementation of FBP, the components and the graph that represents the data flow are each running as a separate process - Erlang process; that's the Elixir/Erlang way of doing things. All communication among these processes is via the sending of messages - Information Packets (IPs) in the flow-based terminology. If you are curious, you can see these processes using the Erlang observer tool. Try the following with the current version - as of today - of ElixirFBP:

  1. Using a command window, cd to the ElixirFBP directory
  2. Type iex -S mix 
  3. At the iex prompt, enter :observer.start This will open a window onto the Erlang virtual machine. 
  4. Click on the Processes tab. You'll see a list of all the processes currently executing.
  5. Back at the iex prompt, enter Examples.Citibike.start to start the ElixirFBP version of the Streamtools Citibike example. 
  6. Go back to the observer window and click on the "Name or Initial Func." column. This will sort the processes by their name. You should see something like the following:

  7. All the processes associated with the example start with "citibike".
  8. If you go back to the iex prompt again and enter ElixirFBP.Network.stop  and then enter ElixirFBP.Network.stop_network you will see the "citibike" processes disappear as they forced to stop.

No comments:

Post a Comment