2. Developer Smith has a Java application that returns some interesting data that he wants to expose to the blockchain via a Rholang contract. He installs the Jar file on his RChain node and then runs a command to 'Add Oracle' , which returns back a channel name. He applies the channel name in his Rholang contract and observes that his contract can now expose and use the data from his Java application.
The work for the FFI is captured in:
Describe the issues which need to be addressed or resolved before attempting to devise a complete design.
Describe how the software will interface with other software components.
The FFI will take a function out of the jar and then wrap it in a process that is waiting for input, passes it along, computes it and then sends it along to a channel. The jar file will be exposed via the Java class loader.
Describe how the software will interface with physical systems, ex: ports for communication, which devices are to be supported and any hardware protocols used.
Will software be used in creating the system? If so, indicate what software (name and version), how it is to be used, and any details about how it interfaces with the software being specified.
What is the user interface for the software? How will users interact with the software? List out all the aspects involved in making the UI better for all users that will interact or support the software.
How will the software use any communications interfaces?
Provide a description of the software system, including its functionality and matters relating to the overall system and design. Feel free to split this up into subsections, or use data flow diagrams or process flow diagrams.
List any limitations or system constraints that have an impact on the design of the software. These can be any of the following:
Depends on:
Describe any design decisions and/or strategies that affect the overall organization of the system and its higher-level structures. These strategies should provide insight into the key abstractions and mechanisms used in the system architecture. Describe the reasoning employed for each decision and/or strategy (possibly referring to previously stated design goals and principles) and how any design goals or priorities were balanced or traded-off. Such decisions might concern (but are not limited to) things like the following:
new fsRet in { system!("getFs", fsRet) | for (fs <- fsRet) { fs!("load", "MyJar.jar", myJarRet) | for (myJar <- myJarRet) new ffiRet in { system!("getFFI", ffiRet) | for (ffi <- ffiRet) new myClassCtorRet in { ffi!("link", myJar, "MyClass", myClassCtorRet) | for (myClassCtor <- myClassCtorRet) new myClassInstanceRet in { myClassCtor!(arg1, ..., argn, myClassInstanceRet) | for (myClassInstance <- myClassInstanceRet) new ret in { myClassInstance!("method", arg1, ..., argn, ret) | for (val <- ret) { // do something with val, etc. } } } } } } } |