Connecting with an SDK
Each SDK’s client speaks gRPC to an EvidentSource server. Pointing one at the Sandbox is a matter of the address.
The address
Section titled “The address”- gRPC:
https://sandbox.evidentsource.com:50051 - No authentication is required on the public Sandbox.
Keep the https://. The Sandbox serves gRPC over TLS, and every SDK chooses TLS from the address’s scheme: an address without https:// connects in plaintext, and fails against the Sandbox. Use http://localhost:50051 for a server on your machine.
use evidentsource_client::EvidentSource;
let es = EvidentSource::connect_to_server("https://sandbox.evidentsource.com:50051").await?;The crate is evidentsource-client.
import client "github.com/evidentsystems/evidentsource-sdks/go/packages/evidentsource-client"
es, err := client.ConnectSimple(ctx, "https://sandbox.evidentsource.com:50051")TypeScript
Section titled “TypeScript”import { EvidentSource } from "@evidentsource/client";
const es = EvidentSource.connect("https://sandbox.evidentsource.com:50051");Python
Section titled “Python”from evidentsource_client import EvidentSource
es = await EvidentSource.connect("https://sandbox.evidentsource.com:50051")The package is evidentsource-client.
using EvidentSource.Client;
var es = await EvidentSourceClient.ConnectAsync("https://sandbox.evidentsource.com:50051");From a client to a database
Section titled “From a client to a database”A client opens a connection to each database it uses. From a connection you run State Changes, and read State Views and events.
In Rust, Go, TypeScript and .NET, a connection follows the database’s revision as it advances. A Python connection doesn’t: ask it for the latest database when you need a current revision. The SDK repository’s examples show the whole flow in each language: see Set up the TodoMVC example.
What to do next
Section titled “What to do next”Your own deployment
Section titled “Your own deployment”The same clients connect to your own servers: change the address, and send a bearer token. See Security.