Plura Processing

Integrate Plura into your Java Application or Signed Applet

  1. Contact us to get your affiliate code.
  2. Place the Plura JAR on your application's classpath.
  3. Instantiate an instance of the JavaPluraConnector class and use the JavaPluraConnector methods to start Plura, stop Plura, and change the percentage of client CPU that Plura is using. Make sure that you pass your affiliate code into the JavaPluraConnector constructor!
  4. If you wish, monitor your clients' usage of Plura and reward them accordingly!
  5. Each class that implements IPluraConnector manages threads that run Plura. To ensure that Plura threads are not abandoned, ALWAYS invoke stop() after you invoke start(), even if your application exits on error. See the "finally" block in the sample code here.
  6. Implement a security policy to protect your users' computers. You can use the following two files to create a security policy for your application. An example of how to start an application (contained in the JAR file "your_application.jar") using the Plura security policy is:
    java -Djava.security.manager="secmgr.manager.PluraSecurityManager" -Djava.security.policy="java.policy" -jar your_application.jar
  7. There are 2 types of applications that Plura can run on a client computer: (1) computationally intensive applications and (2) bandwidth intensive applications. For computational applications, the percentageCPU passed into an IPluraConnector implementation is used to monitor the CPU usage on the client computer; bandwidth will not be used for the computations in these applications. For bandwidth applications, the bandwidthPercent passed into an IPluraConnector implementation is used to monitor the bandwidth usage on the client computer; CPU usage will be negligable for the computations in these applications. At any given moment, Plura may choose to run either computational applications or bandwidth applications. It may therefore be the case that Plura appears to be using very little of the client computer's CPU. This does not mean that Plura isn't running--please contact Plura if you are concerned that your clients aren't completing Plura work units. We can work with you to determine if this is the case.
  8. We recommend that you allocate 256 MB of RAM to run Plura in your Java application. If there is not enough RAM on the client machine to do this, a good rule of thumb is: 64 MB plus 16 MB per Plura thread. For example, on a machine with 4 cores (running 4 Plura threads): 64 MB + 4 * (16 MB) = 128 MB. You can add this amount to your existing -Xmx Java option.
  9. This code will run in Java 1.6 and above.
Downloads
Plura Java Application/Signed Applet JAR (15.3kb)
Reference Materials
Plura Application Javadocs
Sample JavaPluraConnector Code
Sample Client Tracking Code
Plura java.policy File
Plura Security Manager Code
Sun's Java Applet Security
Plura FAQ
Problems? Questions?
Click here to contact us