-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
504 additions
and
4 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/classes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
$template{name="sample-readme-html-header" title="Embedded Grid demo"}$ | ||
<h3>What does the sample do?</h3> | ||
This sample demonstrates how to start and use an embedded JPPF <a href="https://www.jppf.org/doc/6.1/index.php?title=Embedded_driver_and_node#Embedded_driver">driver</a> and | ||
<a href="https://www.jppf.org/doc/6.1/index.php?title=Embedded_driver_and_node#Embedded_node">node</a> programmatically, in the same JVM as the client. | ||
|
||
<h3>How do I run it?</h3> | ||
From a command prompt, type the following: | ||
<ul class="samplesList"> | ||
<li>On a Linux/Unix/MacOS system: <b>./run.sh</b></li> | ||
<li>On a Windows system: <b>run.bat</b></li> | ||
</ul> | ||
|
||
<p>The demo produces an output put that looks like this, where messages from the demo itself are prefixed with `>>>`: | ||
<pre class="samples" style="white-space: pre-wrap"> | ||
>>> starting the JPPF driver | ||
driver process id: 4444, uuid: 2C901290-ADAA-4D96-8B73-224B8594DB2B | ||
ClientClassServer initialized | ||
NodeClassServer initialized | ||
ClientJobServer initialized | ||
NodeJobServer initialized | ||
management initialized and listening on port 11111 | ||
Acceptor initialized | ||
- accepting plain connections on port 11111 | ||
JPPF Driver initialization complete | ||
>>> starting the JPPF node | ||
>>> starting the JPPF client | ||
client process id: 4444, uuid: B6CDC36A-F4CA-4D1B-A693-396E926A3F93 | ||
node process id: 4444, uuid: 1624196C-E0CB-4FD0-8A90-78C9FE1BA6DC | ||
[client: driver1-1 - ClassServer] Attempting connection to the class server at localhost:11111 | ||
[client: driver1-1 - ClassServer] Reconnected to the class server | ||
[client: driver1-1 - TasksServer] Attempting connection to the task server at localhost:11111 | ||
[client: driver1-1 - TasksServer] Reconnected to the JPPF task server | ||
>>> client connected, now submitting a job | ||
Attempting connection to the class server at 192.168.1.24:11111 | ||
RemoteClassLoaderConnection: Reconnected to the class server | ||
JPPF Node management initialized on port 11111 | ||
Attempting connection to the node server at 192.168.1.24:11111 | ||
Reconnected to the node server | ||
Node successfully initialized | ||
Hello! from the node | ||
>>> execution result for job 'embedded grid': Hello! | ||
>>> connecting to local driver JMX server | ||
>>> nb nodes in server: 1 | ||
>>> connecting to local node JMX server | ||
>>> node state: JPPFNodeState[threadPoolSize=8, threadPriority=5, nbTasksExecuted=1, executionStatus=IDLE, connectionStatus=CONNECTED, cpuTime=0, pendingAction=NONE] | ||
>>> shutting down node | ||
>>> nb nodes in server: 0 | ||
>>> shutting down driver | ||
>>> done, exiting program | ||
</pre> | ||
|
||
<h3>Demo source code</h3> | ||
<ul class="samplesList"> | ||
<li><a href="src/org/jppf/example/embedded/EmbeddedGrid.java.html">EmbeddedGrid.java</a>: fully commented source code for this demo</li> | ||
</ul> | ||
|
||
<h3>Documentation references</h3> | ||
<ul class="samplesList"> | ||
<li><a href="https://www.jppf.org/doc/6.1/index.php?title=Embedded_driver_and_node">Embedded driver and node</a></li> | ||
<li><a href="https://www.jppf.org/doc/6.1/index.php?title=The_JPPF_configuration_API">The JPPF configuration API</a></li> | ||
</ul> | ||
|
||
<h3>How can I build the sample?</h3> | ||
To compile the source code, from a command prompt, type: <b>"ant compile"</b><br> | ||
To generate the Javadoc, from a command prompt, type: <b>"ant javadoc"</b> | ||
|
||
<h3>I have additional questions and comments, where can I go?</h3> | ||
<p>There are 2 privileged places you can go to: | ||
<ul> | ||
<li><a href="https://www.jppf.org/forums">The JPPF Forums</a></li> | ||
<li><a href="https://www.jppf.org/doc/6.1">The JPPF documentation</a></li> | ||
</ul> | ||
$template{name="sample-readme-html-footer"}$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Embedded Grid demo | ||
|
||
<h3>What does the sample do?</h3> | ||
This sample demonstrates how to start and use an embedded JPPF <a href="https://www.jppf.org/doc/6.1/index.php?title=Embedded_driver_and_node#Embedded_driver">driver</a> and | ||
<a href="https://www.jppf.org/doc/6.1/index.php?title=Embedded_driver_and_node#Embedded_node">node</a> programmatically, in the same JVM as the client. | ||
|
||
<h3>How do I run it?</h3> | ||
From a command prompt, type the following: | ||
<ul class="samplesList"> | ||
<li>On a Linux/Unix/MacOS system: <b>./run.sh</b></li> | ||
<li>On a Windows system: <b>run.bat</b></li> | ||
</ul> | ||
|
||
<p>The demo produces an output put that looks like this, where messages from the demo itself are prefixed with `>>>`: | ||
<pre class="samples" style="white-space: pre-wrap"> | ||
>>> starting the JPPF driver | ||
driver process id: 4444, uuid: 2C901290-ADAA-4D96-8B73-224B8594DB2B | ||
ClientClassServer initialized | ||
NodeClassServer initialized | ||
ClientJobServer initialized | ||
NodeJobServer initialized | ||
management initialized and listening on port 11111 | ||
Acceptor initialized | ||
- accepting plain connections on port 11111 | ||
JPPF Driver initialization complete | ||
>>> starting the JPPF node | ||
>>> starting the JPPF client | ||
client process id: 4444, uuid: B6CDC36A-F4CA-4D1B-A693-396E926A3F93 | ||
node process id: 4444, uuid: 1624196C-E0CB-4FD0-8A90-78C9FE1BA6DC | ||
[client: driver1-1 - ClassServer] Attempting connection to the class server at localhost:11111 | ||
[client: driver1-1 - ClassServer] Reconnected to the class server | ||
[client: driver1-1 - TasksServer] Attempting connection to the task server at localhost:11111 | ||
[client: driver1-1 - TasksServer] Reconnected to the JPPF task server | ||
>>> client connected, now submitting a job | ||
Attempting connection to the class server at 192.168.1.24:11111 | ||
RemoteClassLoaderConnection: Reconnected to the class server | ||
JPPF Node management initialized on port 11111 | ||
Attempting connection to the node server at 192.168.1.24:11111 | ||
Reconnected to the node server | ||
Node successfully initialized | ||
Hello! from the node | ||
>>> execution result for job 'embedded grid': Hello! | ||
>>> connecting to local driver JMX server | ||
>>> nb nodes in server: 1 | ||
>>> connecting to local node JMX server | ||
>>> node state: JPPFNodeState[threadPoolSize=8, threadPriority=5, nbTasksExecuted=1, executionStatus=IDLE, connectionStatus=CONNECTED, cpuTime=0, pendingAction=NONE] | ||
>>> shutting down node | ||
>>> nb nodes in server: 0 | ||
>>> shutting down driver | ||
>>> done, exiting program | ||
</pre> | ||
|
||
<h3>Demo source code</h3> | ||
<ul class="samplesList"> | ||
<li><a href="src/org/jppf/example/embedded/EmbeddedGrid.java">EmbeddedGrid.java</a>: fully commented source code for this demo</li> | ||
</ul> | ||
|
||
<h3>Documentation references</h3> | ||
<ul class="samplesList"> | ||
<li><a href="https://www.jppf.org/doc/6.1/index.php?title=Embedded_driver_and_node">Embedded driver and node</a></li> | ||
<li><a href="https://www.jppf.org/doc/6.1/index.php?title=The_JPPF_configuration_API">The JPPF configuration API</a></li> | ||
</ul> | ||
|
||
<h3>How can I build the sample?</h3> | ||
To compile the source code, from a command prompt, type: <b>"ant compile"</b><br> | ||
To generate the Javadoc, from a command prompt, type: <b>"ant javadoc"</b> | ||
|
||
<h3>I have additional questions and comments, where can I go?</h3> | ||
<p>There are 2 privileged places you can go to: | ||
<ul> | ||
<li><a href="https://www.jppf.org/forums">The JPPF Forums</a></li> | ||
<li><a href="https://www.jppf.org/doc/6.1">The JPPF documentation</a></li> | ||
</ul> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
<!-- | ||
JPPF | ||
Copyright (C) 2005-2018 JPPF Team. | ||
https://www.jppf.org | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
https://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<project name='EmbeddedGrid' basedir="." default="run"> | ||
|
||
<!-- ========================================================================= --> | ||
<!-- Property definitions --> | ||
<!-- ========================================================================= --> | ||
|
||
<property name="shared" value="${basedir}/../shared"/> | ||
<property name="shared.lib" value="${shared}/lib"/> | ||
<property name="shared.img" value="${shared}/images"/> | ||
<property name="config.dir" value="${basedir}/config"/> | ||
<property name="classes.dir" value="${basedir}/classes"/> | ||
<property name="src.dir" value="${basedir}/src"/> | ||
<property name="javadoc" value="${basedir}/javadoc"/> | ||
|
||
<!-- ========================================================================= --> | ||
<!-- Classpath definitions --> | ||
<!-- ========================================================================= --> | ||
|
||
<path id="project.classpath"> | ||
<pathelement location="${classes.dir}"/> | ||
<pathelement location="${config.dir}"/> | ||
<fileset dir="${shared.lib}"> | ||
<include name="**/*.jar"/> | ||
</fileset> | ||
</path> | ||
|
||
<path id="javadoc.classpath"> | ||
<pathelement location="${shared.img}"/> | ||
<path refid="project.classpath"/> | ||
</path> | ||
|
||
<!-- ========================================================================= --> | ||
<!-- Clean --> | ||
<!-- ========================================================================= --> | ||
|
||
<target name="clean"> | ||
<delete dir="${classes.dir}" quiet="true"/> | ||
</target> | ||
|
||
<!-- ========================================================================= --> | ||
<!-- Init --> | ||
<!-- ========================================================================= --> | ||
|
||
<target name="init"> | ||
<mkdir dir="${classes.dir}"/> | ||
</target> | ||
|
||
<!-- ========================================================================= --> | ||
<!-- Compile --> | ||
<!-- ========================================================================= --> | ||
|
||
<target name="compile" depends="clean, init"> | ||
<javac srcdir="" destdir="${classes.dir}" | ||
debug="on" deprecation="off" optimize="on" includes="**/*.java"> | ||
<classpath refid="project.classpath"/> | ||
<compilerarg line="-Xlint:unchecked"/> | ||
<src path="${src.dir}"/> | ||
</javac> | ||
<copy todir="${classes.dir}"> | ||
<fileset dir="${src.dir}"> | ||
<exclude name="**/package.html"/> | ||
</fileset> | ||
</copy> | ||
</target> | ||
|
||
<!-- ========================================================================= --> | ||
<!-- Run the sample application --> | ||
<!-- ========================================================================= --> | ||
|
||
<target name="run" description="run the demo"> | ||
<echo message="starting the Embedded Grid application"/> | ||
<java fork="yes" classname="org.jppf.example.embedded.EmbeddedGrid" classpathref="project.classpath"> | ||
<jvmarg value="-Xmx512m"/> | ||
<jvmarg value="-Dlog4j.configuration=log4j.properties"/> | ||
</java> | ||
</target> | ||
|
||
<!-- ========================================================================= --> | ||
<!-- Generate the Javadoc --> | ||
<!-- ========================================================================= --> | ||
|
||
<target name="javadoc" description="generate the javadoc"> | ||
<delete dir="${javadoc}" quiet="true"/> | ||
<mkdir dir="${javadoc}"/> | ||
<javadoc destdir="${javadoc}" access="private" Windowtitle="JPPF" | ||
packagenames="**/*.*" classpathref="javadoc.classpath" verbose="false" use="true" | ||
stylesheetfile="${shared.img}/javadoc.css" additionalparam="-quiet"> | ||
<packageset dir="${src.dir}"/> | ||
<link href="https://docs.oracle.com/javase/8/docs/api"/> | ||
<link href="https://www.jppf.org/api"/> | ||
<doctitle><![CDATA[JPPF - Matrix Multiplication Sample]]></doctitle> | ||
<header> | ||
<![CDATA[ | ||
<table><tr><td valign="center"> | ||
<a href="https://www.jppf.org" target="_top"> | ||
<img src="https://www.jppf.org/images/jppf_group_large.gif" border="0"/> | ||
</a> | ||
</td></tr></table> | ||
]]> | ||
</header> | ||
<bottom> | ||
<![CDATA[ | ||
<font face="Arial" size=2 color="#6D78B6"><i>Copyright © 2005-2018 JPPF Team.</i></font> | ||
]]> | ||
</bottom> | ||
</javadoc> | ||
<copy todir="${javadoc}/resources" overwrite="true"> | ||
<fileset dir="${shared.img}" includes="inherit.gif"/> | ||
</copy> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#------------------------------------------------------------------------------# | ||
# JPPF # | ||
# Copyright (C) 2005-2018 JPPF Team. # | ||
# http://www.jppf.org # | ||
# # | ||
# Licensed under the Apache License, Version 2.0 (the "License"); # | ||
# you may not use this file except in compliance with the License. # | ||
# You may obtain a copy of the License at # | ||
# # | ||
# http://www.apache.org/licenses/LICENSE-2.0 # | ||
# # | ||
# Unless required by applicable law or agreed to in writing, software # | ||
# distributed under the License is distributed on an "AS IS" BASIS, # | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # | ||
# See the License for the specific language governing permissions and # | ||
# limitations under the License. # | ||
#------------------------------------------------------------------------------# | ||
|
||
### direct log messages to stdout ### | ||
#log4j.appender.stdout=org.apache.log4j.ConsoleAppender | ||
#log4j.appender.stdout.Target=System.out | ||
#log4j.appender.stdout.layout=org.apache.log4j.PatternLayout | ||
#log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n | ||
|
||
### direct messages to file jppf-client.log ### | ||
log4j.appender.JPPF=org.apache.log4j.FileAppender | ||
log4j.appender.JPPF.File=jppf.log | ||
log4j.appender.JPPF.Append=false | ||
log4j.appender.JPPF.layout=org.apache.log4j.PatternLayout | ||
#log4j.appender.JPPF.layout.ConversionPattern=%d{ABSOLUTE} [%-5p][%c.%M(%L)]: %m\n | ||
log4j.appender.JPPF.layout.ConversionPattern=%d [%-5p][%c.%M(%L)]: %m\n | ||
|
||
### set log levels - for more verbose logging change 'info' to 'debug' ### | ||
|
||
log4j.rootLogger=INFO, JPPF | ||
#log4j.rootLogger=DEBUG, JPPF | ||
|
||
#log4j.logger.org.jppf.client=DEBUG | ||
#log4j.logger.org.jppf.common.socket=DEBUG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@echo off | ||
call java -cp config;classes;../shared/lib/* -Xmx512m -Dlog4j.configuration=log4j.properties org.jppf.example.embedded.EmbeddedGrid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /bin/sh | ||
|
||
java -cp config:classes:../shared/lib/* -Xmx512m -Dlog4j.configuration=log4j.properties org.jppf.example.embedded.EmbeddedGrid |
Oops, something went wrong.