-
Notifications
You must be signed in to change notification settings - Fork 27
Home
John Cowan built the first Java implementation of the FBP concepts, which was also the first implementation to use native threads, allowing it to take advantage of all the processors on the computer. This software, which has been undergoing continuous refinement and improvement during the years since, now called JavaFBP, is available as Open Source on GitHub. An older version is still on SourceForge, but is not being maintained.
Material on the syntax of JavaFBP component and network definitions and the component API can be found at http://www.jpaulmorrison.com/fbp/jsyntax.htm ("JavaFBP Syntax and Component API").
In earlier JavaFBP versions, the scheduler presented an IIP to a component once per invocation. This has been changed as of JavaFBP-2.6 to once per activation. In practice this will only affect "non-loopers" (components that get reactivated multiple times).
Checking has been added (Aug., 2014) to make sure that all input connections have been provided. Since this was not being checked before, some users may have components that treat some input ports as optional. To make this explicit, a new optional
parameter has been added to the InPort
metadata. If this causes any problems for current users, please let us know.
Gradle (http://www.gradle.org/ ) is now being used for packaging. To build the project, make sure Gradle is installed, and then follow the instructions in the README
file for this project.
##JavaFBP Web Server
A simple server written using JavaFBP can also be found on GitHub. The source code includes generalized components for Websockets Receive and Respond: WebSocketReceive.java and WebSocketRespond.java respectively. The former generates a substream for each incoming request from the client, comprising:
- an open bracket,
- socket reference IP,
- data IP and
- close bracket,
while the latter accepts a substream of any length, and returns to the client indicated by the first IP all the other contained IPs.
These two components are basically TooTallNate's AutobahnServerTest code (https://github.com/TooTallNate/Java-WebSocket/tree/master/src/main/java/org/java_websocket ), split into two processes, and require the Java-WebSocket-1.3.0.jar file, which is available on Maven central.