Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

gdp / lang / java / package.html @ master

History | View | Annotate | Download (4.57 KB)

1 05afb3fb Nitesh Mor
<!-- $Id: package.html 70349 2014-10-12 22:45:57Z cxh $ -->
2
<html>
3
<head>
4
<title>org.terraswarm.gdp</title>
5
</head>
6
<body>
7
An Java interface to the Global Data Plane.
8
<p>"The Global Data Plane provides a data-centric glue for swarm applications.  The basic primitive is that of a multi-input, multi-output, time-aware secure log.  Data inputs are timestamped and rearranged by timestamp. Data can be securely commited to the log in a variety of ways, including via a external consistent transactional model.  Data within the log can be randomly read, thereby permitting a variety of data models, including (eventually) a SQL query model.  Further, data within a log can be preserved for the long term."
9
(source: <a href="https://swarmlab.eecs.berkeley.edu/projects/4814/global-data-plane">https://swarmlab.eecs.berkeley.edu/projects/4814/global-data-plane</a>)
10
11
<p>As of October, 2014, the GDP was not yet released.  See
12
<a href="http://www.terraswarm.org/swarmos/wiki/Main/GDPJavaInterface#in_browser" target="_top">GDP Java Interface</a> in the TerraSwarm wiki, which is only accessible by people associated with TerraSwarm.</p>
13
14
<p>This package consists of a Java interface to the GDP.</p>
15
16
<p>Most of the java files were created using JNAerator.</p>
17
18
<p>The file GdpUtilities.java contains utilities that were written by hand.  These utilities are useful for dealing with the return values of the GDP, which are unsigned longs and thus difficult to use with Java before JDK 1.8.</p>
19
20
<p>The <code>apps/</code> directory contains GDP applications ported from the c-based <code>gdp/apps/</code> directory.
21
22 8dfe32c1 Christopher Brooks
  <h2>Updating GDP Version Numbers</h2>
23
<p>When the GDP Version number in <code>../../gdp/gdp_version.h</code> changes, then make the following changes:</p>
24
<ol>
25
  <li>Edit <code>makefile</code> and change <code>GDPLIBMAJVER</code>, <code>GDPLIBMINVER</code> and <code>GDP_PATCH_VERSION</code></li>
26 9dd555a1 Christopher Brooks
  <li>Run <code>make clean; make</code>, which will may fail
27
  if <code>GDPLIBMAJVER</code> is updated.</li>
28 8dfe32c1 Christopher Brooks
  <li>If the <code>make</code> command fails, then edit <code>org/terraswarm/gdp/GDP*.java</code> files and update <code>Gdp<i>NMLibrary</i></code> to the new version.</li>
29
  <li>Run <code>make</code> and edit files until the make successfully completes.</li>
30
  <li>Run <code>make install</code>.</li>
31
  <li>Update <code>$PTII/lib</code>:
32
    <ol>
33
      <li>Update the jar file in $PTII/lib:
34
      <pre>
35
 bash-3.2$ svn delete --force $PTII/lib/gdp*.jar
36 9dd555a1 Christopher Brooks
D         /Users/cxh/ptII/lib/gdp-0.7-0.jar
37 8dfe32c1 Christopher Brooks
bash-3.2$ cp gdp*.jar $PTII/lib
38 9dd555a1 Christopher Brooks
bash-3.2$ svn add $PTII/lib/gdp-0.7-2.jar 
39
A  (bin)  /Users/cxh/ptII/lib/gdp-0.7-2.jar
40 8dfe32c1 Christopher Brooks
bash-3.2$ 
41
      </pre>
42
      </li>
43 9dd555a1 Christopher Brooks
      <li>If <code>GDPLIBMAJVER@</code> changed, then update the GDP
44
        shared library for the current platform:<pre>
45
bash-3.2$ svn delete --force $PTII/lib/libgdp.0.6.dylib
46
D         /Users/cxh/ptII/lib/libgdp.0.6.dylib
47
bash-3.2$ cp ../../libs/libgdp.0.7.dylib $PTII/lib
48
bash-3.2$ svn add $PTII/lib/libgdp.0.7.dylib 
49
A  (bin)  /Users/cxh/ptII/lib/libgdp.0.7.dylib
50 4cfe3818 Christopher Brooks
bash-3.2$ 
51
          </pre>
52 05afb3fb Nitesh Mor
53 476b1915 Christopher Brooks
      <li>Update the <code>gdp-N.M-P</code> string to the new version
54
      in <code>$PTII/configure.in</code>, <code>$PTII/.classpath.default</code>
55
      and <code>$PTII/build.default.xml</code>
56
      </li>
57
      
58 8dfe32c1 Christopher Brooks
      <li> Run <code>(cd $PTII;autoconf;./configure)</code> and verify that <code>$PTII/mk/ptII.mk</code> refers to the new jar file</li>
59
      <li>Commit the changes to the ptII svn repo: <pre>
60 9dd555a1 Christopher Brooks
          (cd $PTII; svn commit -m "Updated the gdp to 0.7-2." configure.in build.default.xml lib)
61 4cfe3818 Christopher Brooks
        </pre>
62
        The above commands are for Mac OS X, which uses .dylib.  We delete the .so, which is used by Linux here anyway.  The gdp shared library must be updated on the build machine so that the nightly build will successfully run the GDP tests under Linux.
63 8dfe32c1 Christopher Brooks
      <li>
64
      <li>Update <code>$PTII/configure</code>:<pre>
65
          (cd $PTII; autoconf; svn commit -m "configure.in changed." configure)
66 4cfe3818 Christopher Brooks
        </pre>
67
      </li>
68
      <li>Test out the GDP Java interface with:<pre>
69 2b91bc9a Christopher Brooks
          $PTII/bin/vergil $PTII/ptolemy/actor/lib/jjs/modules/gdp/test/auto/GDPLogCreateAppendReadJS.xml 
70 4cfe3818 Christopher Brooks
        </pre>
71
      </li>
72
      <li>Log on to machines for other platforms (currently only Linux at terra.eecs.berkeley.edu) and build and install the shared library.</li>
73 8dfe32c1 Christopher Brooks
    </ol>
74
    </li>
75
  <li>Add the changed gdp files: <pre>
76
      git add makefile org/terraswarm/gdp/GDP{,_DATUM,_GCL,_GCLMD,_NAME}.java
77
    </pre>
78
  </li>
79
  <li>Commit and push: <pre>
80
      git commit -m "Updated GDP Java interface to 0.6-1."
81
      git push
82
    </pre>
83
  </li>
84
</ol>
85 05afb3fb Nitesh Mor
<p>
86
@since Ptolemy II 10.0
87
</body>
88
</html>