Difference between revisions of "Statistical Algorithms Importer: Java Project"
Line 3: | Line 3: | ||
|} | |} | ||
− | This page explains how to create a Java project using | + | This page explains how to create a Java project using two alternative approaches: [https://wiki.gcube-system.org/index.php?title=Statistical_Algorithms_Importer:_Java_Project&action=submit#Black_Box_Integration '''Black-box'''] and [https://wiki.gcube-system.org/index.php?title=Statistical_Algorithms_Importer:_Java_Project&action=submit#White_Box_Integration '''White-box'''] integration. The next sections explain how these work and which cases these two approaches seaddress. |
− | + | ||
− | + | ||
=Black Box Integration= | =Black Box Integration= | ||
Line 11: | Line 9: | ||
[[Image:StatisticalAlgorithmsImporter_JavaBlackBox0.png|thumb|center|250px|Java Project, SAI]] | [[Image:StatisticalAlgorithmsImporter_JavaBlackBox0.png|thumb|center|250px|Java Project, SAI]] | ||
− | This is the preferred way for developers who want their processes distributed based on the load of requests. Each process request will run on one dedicated machine. Black box processed usually do not use the e-Infrastructure resources but live on their own. | + | This is the preferred way for developers who want their processes executions distributed based on the load of the requests. Each process request will run on one dedicated machine and is allowed to use multi-core processing. Black box processed usually do not use the e-Infrastructure resources but "live on their own". '''The Statistical Algorithms Importer (SAI) portlet must be used for this integration'''. |
==Project Configuration== | ==Project Configuration== | ||
Line 65: | Line 63: | ||
=White Box Integration= | =White Box Integration= | ||
− | This is the preferred way for developers who want their processes to fully exploit the e-Infrastructure resources, for example to implement Cloud computing using the e-Infrastructure computational resources. This integration modality | + | This is the preferred way for developers who want their processes to fully exploit the e-Infrastructure resources, for example to implement Cloud computing using the e-Infrastructure computational resources. This integration modality also allows to fully reuse the Java data mining frameworks integrated by DataMiner, i.e. [https://www.knime.com/ Knime], [https://rapidminer.com/ RapidMiner], [https://www.cs.waikato.ac.nz/ml/weka/ Weka], [https://wiki.gcube-system.org/gcube/Statistical_Manager_Algorithms gCube EcologicalEngine]. '''The Eclipse IDE should be used for this integration'''. |
[https://gcube.wiki.gcube-system.org/gcube/How-to_Implement_Algorithms_for_DataMiner Step-by-step guide to integrate Java processes as white boxes] | [https://gcube.wiki.gcube-system.org/gcube/How-to_Implement_Algorithms_for_DataMiner Step-by-step guide to integrate Java processes as white boxes] |
Revision as of 15:48, 24 November 2017
This page explains how to create a Java project using two alternative approaches: Black-box and White-box integration. The next sections explain how these work and which cases these two approaches seaddress.
Black Box Integration
This is the preferred way for developers who want their processes executions distributed based on the load of the requests. Each process request will run on one dedicated machine and is allowed to use multi-core processing. Black box processed usually do not use the e-Infrastructure resources but "live on their own". The Statistical Algorithms Importer (SAI) portlet must be used for this integration.
Project Configuration
- Define project's metadata
- Add input and output parameters and click on "Set Code" to indicate the main file to execute (i.e. the .jar file)
- Add information about the running environment (e.g. Java version etc.)
- After the software creation phase a Main.R file and a Taget folder are created
Example Code
- Java code in sample:
/** * * @author Giancarlo Panichi * * */ import java.io.File; import java.io.FileWriter; public class SimpleProducer { public static void main(String[] args) { try { FileWriter fw = new FileWriter(new File("program.txt")); fw.write("Check: " + args[0]); fw.close(); } catch (Exception e) { e.printStackTrace(); } } }
Example Download
White Box Integration
This is the preferred way for developers who want their processes to fully exploit the e-Infrastructure resources, for example to implement Cloud computing using the e-Infrastructure computational resources. This integration modality also allows to fully reuse the Java data mining frameworks integrated by DataMiner, i.e. Knime, RapidMiner, Weka, gCube EcologicalEngine. The Eclipse IDE should be used for this integration.
Step-by-step guide to integrate Java processes as white boxes