Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The approach taken in this prototype was adding a
map
that maps from command strings to first class functions and removed the majority of commands from the mainselect cmd
statement so that they would not be required with every Arkouda build. AServerModules.cfg
configuration file was added that takes the name of modules to include in the build, one per line, and generatesimport
statements for those modules and adds their messaging functions to the command map only when in the configuration file to avoid compiling files that are not desired in a given Arkouda build.Using the configuration file
Running
make
on this branch compiles Arkouda just like today with all modules included, and that is because theServerModules.cfg
file has all of the module names included by default. To build Arkouda without a module, all that is needed to do is comment out the module that you would like to exclude from that file and rerunmake
.Additionally, in the case where a user has multiple configuration files, for example, the user can specify which configuration file will be used to generate the
import
statements by setting the environment variableARKOUDA_CONFIG_FILE
Adding a module/converting an existing module
Assuming a module is already created that has its messaging functions, all that the user would need to do to add that module into a build is
(1) add a
registerMe()
(name up for discussion...) function in their file adding each function to the command map that looks like this:(2) add the module name to the
ServerModules.cfg
file(3) add a client-side function to handle the call
Remaining work
In the future, we would like to add the ability to add modules from any directory into this build to allow a user to easily plug in their own modules. Currently, this PR is limited to modules in the
src/
directory.