If you are beginning your journey with Senzing, please start with Senzing Quick Start guides.
You are in the Senzing Garage where projects are "tinkered" on. Although this GitHub repository may help you understand an approach to using Senzing, it's not considered to be "production ready" and is not considered to be part of the Senzing product. Heck, it may not even be appropriate for your application of Senzing!
At the moment, this is "work-in-progress" with Semantic Versions of 0.n.x
.
Although it can be reviewed and commented on,
the recommendation is not to use it yet.
serve-grpc
is a command in the senzing-tools suite of tools.
This command is a gRPC server application that supports requests to the Senzing SDK via network access.
serve-grpc
supports the Senzing Protocol Buffer definitions.
Under the covers, the gRPC request is translated by the gRPC server into a Senzing Go SDK API call using senzing/sz-sdk-go-core.
The response from the Senzing Go SDK API is returned to the gRPC client.
Senzing SDKs for accessing the gRPC server:
- Go: sz-sdk-go-grpc
- Python: sz-sdk-python-grpc
A simple demonstration using senzing-tools
and a SQLite database.
export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
export SENZING_TOOLS_DATABASE_URL=sqlite3://na:na@nowhere/tmp/sqlite/G2C.db
senzing-tools init-database
senzing-tools serve-grpc --enable-all
- The
serve-grpc
command is installed with the senzing-tools suite of tools. See senzing-tools install.
export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
senzing-tools serve-grpc [flags]
-
For options and flags:
-
Runtime documentation:
export LD_LIBRARY_PATH=/opt/senzing/g2/lib/ senzing-tools serve-grpc --help
-
In addition to the following simple usage examples, there are additional Examples.
-
✏️ Specify database using command line option. Example:
export LD_LIBRARY_PATH=/opt/senzing/g2/lib/ senzing-tools serve-grpc \ --database-url postgresql://username:password@postgres.example.com:5432/G2 \ --enable-all
-
Run
senzing-tools serve-grpc --help
or see Parameters for additional parameters.
-
✏️ Specify database using environment variable. Example:
export LD_LIBRARY_PATH=/opt/senzing/g2/lib/ export SENZING_TOOLS_DATABASE_URL=postgresql://username:password@postgres.example.com:5432/G2 export SENZING_TOOLS_ENABLE_ALL=true senzing-tools serve-grpc
-
Run
senzing-tools serve-grpc --help
or see Parameters for additional parameters.
This usage shows how to initialze a database with a Docker container.
-
This usage specifies a URL of an external database. Example:
docker run \ --env SENZING_TOOLS_DATABASE_URL=postgresql://username:password@postgres.example.com:5432/G2 \ --env SENZING_TOOLS_ENABLE_ALL=true \ --interactive \ --publish 8258:8258 \ --rm \ --tty \ senzing/senzing-tools serve-grpc
-
See Parameters for additional parameters.
- SENZING_TOOLS_DATABASE_URL
- SENZING_TOOLS_ENABLE_ALL
- SENZING_TOOLS_ENABLE_G2CONFIG
- SENZING_TOOLS_ENABLE_G2CONFIGMGR
- SENZING_TOOLS_ENABLE_G2DIAGNOSTIC
- SENZING_TOOLS_ENABLE_G2ENGINE
- SENZING_TOOLS_ENABLE_G2PRODUCT
- SENZING_TOOLS_ENGINE_CONFIGURATION_JSON
- SENZING_TOOLS_ENGINE_LOG_LEVEL
- SENZING_TOOLS_ENGINE_MODULE_NAME
- SENZING_TOOLS_GRPC_PORT
- SENZING_TOOLS_LOG_LEVEL