Skip to content

Latest commit

 

History

History
63 lines (48 loc) · 2.44 KB

index.md

File metadata and controls

63 lines (48 loc) · 2.44 KB

Flame SDKs

Flame provides SDKs for building clients that submit work to Flame and services that run inside Flame executors.

SDK Use it for Documentation
Rust SDK Typed async clients, compiled services, high-throughput task submission, and object-cache workflows Rust SDK
Python SDK Python services, scripts, agent and RL workflows, and dynamic packaging through App Python SDK

Both SDKs use the same Flame concepts:

  • An application is the service registered in Flame.
  • A session is a group of tasks for one application.
  • A task is one unit of work inside a session.
  • Common data is shared session input sent to every service instance.
  • Object cache stores larger shared values, files, packages, and versioned objects.

Configuration

Both SDKs read Flame configuration from ~/.flame/flame.yaml and accept environment settings from the Flame runtime:

current-context: flame
contexts:
  - name: flame
    cluster:
      endpoint: "http://127.0.0.1:8080"
    cache:
      endpoint: "grpc://127.0.0.1:9090"

Common environment settings:

  • FLAME_ENDPOINT
  • FLAME_CACHE_ENDPOINT
  • FLAME_CA_FILE
  • FLAME_CERT_FILE
  • FLAME_KEY_FILE

Use https:// for the session-manager endpoint when TLS is enabled. Use grpcs:// for the object-cache endpoint when cache TLS is enabled. For a client certificate, set both cert_file and key_file under the relevant cluster.tls or cache.tls section. An external cache proxy uses grpcs-proxy://host:port; reference requests carry the owning cache address in x-flame-object-cache metadata while TLS verifies the public proxy host.

Typical Workflow

  1. Start a Flame cluster with Docker Compose or flmadm.
  2. Deploy or register an application service.
  3. Create a session for that application from a client.
  4. Run tasks with run() or submit them with submit().
  5. Close the session when no more work will be submitted.

The SDKs wrap the gRPC APIs documented in Flame API Reference. Use the SDK pages for common application code and the API reference when implementing lower-level protocol integrations.

Examples