Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: daemon support #14

Open
SRomansky opened this issue Aug 16, 2017 · 1 comment
Open

Feature request: daemon support #14

SRomansky opened this issue Aug 16, 2017 · 1 comment

Comments

@SRomansky
Copy link

Hi, does SourcererCC have any support for running as a daemon?
For example, SCC is launched as a background process after loading the dataset. The daemon can then be given queries and detect clones in the query without reloading the dataset. The resulting clones are then sent back to whomever initialized the query.

@SRomansky
Copy link
Author

SRomansky commented Aug 21, 2017

ae2a835
The branch and commit above have support for daemonizing SourcererCC.
./runnodes daemon 1

It loads the dataset from the properties file when you start it normally.
When you send a post to localhost:4567/query the daemon will load the
data from the QUERY_DIR_PATH in the properties file. The daemon will
then query that dataset against the previously loaded dataset.
The data in QUERY_DIR_PATH can be replaced and a new POST can be
send to the URL to run a new query.

The branch also includes a Dockerfile which can build a copy of SourcererCC. There is also a script to mount host directories in the docker container, so it is possible to mount the query/dataset/outputset folders into the container and run the jar on them.

The branch also includes a gradle.build file to make the indexbased.SearchManager.jar. The gradle file doesn't contain all of the commands the ant xml file has. But, there is support in gradle to load all of the commands from the ant file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant