#object-storage #client #mathematica

bulletin-board-mathematica

Mathematica client for BulletinBoard

8 releases

new 0.3.2 Dec 9, 2024
0.3.1 Nov 16, 2024
0.2.0 Nov 3, 2024
0.1.3 Oct 21, 2024

#362 in Debugging

Download history 145/week @ 2024-10-09 451/week @ 2024-10-16 61/week @ 2024-10-23 129/week @ 2024-10-30 108/week @ 2024-11-06 115/week @ 2024-11-13 21/week @ 2024-11-20 6/week @ 2024-11-27 137/week @ 2024-12-04

286 downloads per month

Apache-2.0

1MB
17K SLoC

Wolfram 16K SLoC // 0.0% comments Rust 1K SLoC

Mathematica client for BulletinBoard

"Buy Me A Coffee"

"Github Sponsors" Crates.io Crates.io License

BulletinBoard is an object strage for ArrayObject for debugging and data taking purposes. For more details, see BulletinBoard.

Caution

  • Clients do not check whether the operation is successful or not to improve performance. Check the log of the server for the errors.
  • The data is not encrypted. Please do not send any confidential data over the network.
  • This crate is under development and is subject to change in specification. (Compatibility across BulletinBoard and dbgbb is ensured for the most minor version numbers.)

Install

The package can be installed via Paclet repository as

PacletInstall["Yshojihep/BulletinBoardClient"]

For the first run, you need to compile the library. Run

<< "Yshojihep`BulletinBoardClient`";

and follow the instruction.

Example

To post and read the bulletins,

<< "Yshojihep`BulletinBoardClient`";
BBSetAddr["192.168.0.3:7578"];

BBPost["test",{1,2,3}];
BBRead["test"]

Compilation

Instead of installing via Paclet, you can compile the source yourself.

First, you need to clone the repository:

cargo clone bulletin-board-mathematica
# OR
git clone https://github.com/YShoji-HEP/BulletinBoard.git

Then, go to bulletin-board-mathematica directory and run

cargo build -r

If it does not compile, see wolfram-library-link. Notice that Mathematica or Wolfram Engine has to be installed before the compilation. Then, copy target/release/libbulletin_board_mathematica.* to BulletinBoardClient/LibraryResources/.

Functions

Function Description
BBSetAddr[address] Set the address of the server. The address is either "ADDRESS:PORT" or "SOCKETPATH". If this function is not called, the default address is "127.0.0.1:7578".
BBSetTimeout[timeout] Set timeout for TCP connections in msec. If it is executed without the argument, timeout is disabled (default).
BBPost[title, tag(optional), data] Post the data to the server. title and tag are Text. data can be Integer, Real, Complex, Text, or List. For List, the types of the elements should be the same and has to have the same number of elements for nested Lists. If tag is not set, the default value "Mathematica" is used.
BBRead[title, tag(optional), revisions(optional)] Read the bulletin. revisions can be Integer or List of Integer.
BBRelabel[titleFrom, tagFrom, titleTo, tagTo] Relabel a bulletin. The last three arguments can be ommited by setting them as "".
BBClientVersion[] Show the client version
BBServerVersion[] Show the server version.
BBStatus[] Show the status of the server.
BBLog[] Show the log of the server.
BBViewBoard[] List the bulletins.
BBGetInfo[title, tag(optional)] See the details of the bulletin.
BBClearRevisions[title, tag(optional), revisions] Clear the specified revisions.
BBRemove[title, tag(optional)] Remove all revisions of the specified bulletin.
BBArchive[archiveName, title, tag(optinoal)] Save the bulletin to an archive and make the data persistent.
BBLoad[archiveName] Load the archived data. (The archive name is added to the tag)
BBListArchive[] List the archives.
BBRenameArchive[archiveFrom, archiveTo] Rename an archive. This is executed when BBReset is called.
BBDeleteArchive[archiveName] Delete an archive. This is executed when BBReset is called.
BBDump[archiveName] Save all the bulletins to an archive.
BBRestore[archiveName] Reset the server and restore the archived data. (The data is restored to memory/file without modification of the tag)
BBClearLog[] Clear the log of the server.
BBResetServer[] Reset the BulletinBoard server.
BBTerminateServer[] Terminate the BulletinBoard server.

Dependencies

~5–9MB
~203K SLoC