DemoBench is a standalone desktop application that makes it easy to configure and launch local Corda nodes. It is useful for training sessions, demos or just experimentation.
The first node will host the network map service, and we are forcing that node also to be a notary. Hence only notary services will be available to be selected in the ``Services`` list. For subsequent nodes you may also select any of Corda's other built-in services.
..note:: Press ``Ctrl``/``Cmd`` and then click with the mouse to select multiple services, and also to deselect a service again.
..
Press the ``Create Node`` button to launch the Corda node with your configuration.
Running Nodes
DemoBench launches each new node in a terminal emulator. The ``View Database``, ``Launch Explorer`` and ``Launch WebServer`` buttons will all be disabled until the node has finished booting. DemoBench will then display simple statistics about the node such as its cash balance.
It is currently impossible from DemoBench to restart a node that has terminated, e.g. because the user typed "bye" at the node's shell prompt. However, that node's data and logs still remain in its directory.
You can save the configurations and CorDapps for all of DemoBench's currently running nodes into a profile, which is a ``ZIP`` file with the following layout, e.g.:
When DemoBench reloads this profile it will close any nodes that it is currently running and then launch these new nodes instead. All nodes will be created with a brand new database. Note that the ``node.conf`` files within each profile are JSON/HOCON format, and so can be extracted and edited as required.
DemoBench writes a log file to the following location:
#. MacOS: The packaging tools should be available automatically. The DMG contents will also be signed if the packager finds a valid ``Developer ID Application`` certificate on the keyring. You can create such a certificate by generating a Certificate Signing Request and then asking your local "Apple team agent" to upload it to the Apple Developer portal. (See `here <https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html>`_.)
#. Fedora/Linux: ``rpm-build`` packages.
You will also need to define the environment variable ``JAVA_HOME`` to point to the same JDK that you use to run Gradle. The installer will be written to the ``tools/demobench/build/javapackage/bundles`` directory, and can be installed like any other application for your platform.
Developer Notes
---------------
Developers wishing to run DemoBench *without* building a new installer each time can install it locally using Gradle:
..parsed-literal::
$ gradlew tools:demobench:installDist
$ cd tools/demobench/build/install/demobench
$ bin/demobench
..
Unfortunately, DemoBench's ``$CLASSPATH`` may be too long for the Windows shell . In which case you can still run DemoBench as follows:
While DemoBench *can* be executed within an IDE, it would be up to the Developer to install all of its runtime dependencies beforehand into their correct locations relative to the value of the ``user.dir`` system property (i.e. the current working directory of the JVM):