Sign inSign up

senzing/serve-grpc

By senzing

•Updated 8 months ago

Image
0

10K+

senzing/serve-grpc repository overview

⁠serve-grpc

⁠:warning: WARNING: serve-grpc is still in development :warning: _

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.

⁠Synopsis

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.

Go Reference Go Report Card go-test.yaml License

⁠Overview

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/g2-sdk-go-base⁠. The response from the Senzing Go SDK API is returned to the gRPC client.

Senzing SDKs for accessing the gRPC server:

  1. Go: g2-sdk-go-grpc⁠
  2. Python: g2-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@/tmp/sqlite/G2C.db
senzing-tools init-database
senzing-tools serve-grpc --enable-all

⁠Install

  1. The serve-grpc command is installed with the senzing-tools⁠ suite of tools. See senzing-tools install⁠.

⁠Use

export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
senzing-tools serve-grpc [flags]
  1. For options and flags:

    1. Online documentation⁠

    2. Runtime documentation:

      export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
      senzing-tools serve-grpc --help
      
  2. In addition to the following simple usage examples, there are additional Examples⁠.

⁠Using command line options
  1. :pencil2: Specify database using command line option. Example:

    export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
    senzing-tools serve-grpc \
        --database-url postgresql://username:[email protected]:5432/G2 \
        --enable-all
    
    
  2. Run senzing-tools serve-grpc --help or see Parameters⁠ for additional parameters.

⁠Using environment variables
  1. :pencil2: Specify database using environment variable. Example:

    export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
    export SENZING_TOOLS_DATABASE_URL=postgresql://username:[email protected]:5432/G2
    export SENZING_TOOLS_ENABLE_ALL=true
    senzing-tools serve-grpc
    
  2. Run senzing-tools serve-grpc --help or see Parameters⁠ for additional parameters.

⁠Using Docker

This usage shows how to initialze a database with a Docker container.

  1. This usage specifies a URL of an external database. Example:

    docker run \
        --env SENZING_TOOLS_DATABASE_URL=postgresql://username:[email protected]:5432/G2 \
        --env SENZING_TOOLS_ENABLE_ALL=true \
        --interactive \
        --publish 8258:8258 \
        --rm \
        --tty \
        senzing/senzing-tools serve-grpc
    
    
  2. See Parameters⁠ for additional parameters.

⁠Parameters

⁠References

  1. Command reference⁠
  2. Development⁠
  3. Errors⁠
  4. Examples⁠

Tag summary

Content type

Image

Digest

sha256:fd01a04f3…

Size

1.6 GB

Last updated

8 months ago

docker pull senzing/serve-grpc