Download the PHP package hivellm/synap-sdk without Composer

On this page you can find all versions of the php package hivellm/synap-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package synap-sdk

Synap PHP SDK

Official PHP client library for Synap - High-Performance In-Memory Key-Value Store & Message Broker.

Features

Requirements

Installation

Quick Start

Transports

Since v0.11.0 the SDK selects the transport via URL scheme — no separate builder methods required:

URL scheme Default port When to use
synap:// 15501 ✅ Recommended default — MessagePack over persistent TCP, lowest latency.
resp3:// 6379 Redis-compatible text protocol — interop with existing Redis tooling.
http:// / https:// 15500 Original REST transport — full command coverage.

All commands (KV, Hash, List, Set, Sorted Set, Queue, Stream, Pub/Sub, Transactions, Scripts, Geo, HyperLogLog) are fully supported on every transport. Native transports throw UnsupportedCommandException instead of silently falling back to HTTP.

The synap:// transport is Thunder

The binary transport is not hand-written in this SDK. It is Thunder (hivellm/thunder) — the HiveLLM family's shared binary RPC client, the same protocol the Synap server runs on, so the two ends of the wire cannot drift.

Frame cap 512 MiB, validated against the length prefix before allocating.
Authentication withAuthToken / withBasicAuth credentials travel in the handshake. The previous transport never sent AUTH, so it could not reach a require_auth server on 15501 at all.
Binary values A value that is not valid UTF-8 survives byte-exact: such strings travel as MessagePack bin. Sent as str, the server rejected the frame and closed the connection.
Push subscribePush receives server-push frames. The previous implementation sent SUBSCRIBE with id = 0xFFFFFFFF, the reserved push sentinel, which the server refuses outright — pub/sub over SynapRPC could not work at all.

Thunder's PHP client is synchronous and exposes no public poll, so a push subscription keeps the reader running by issuing a cheap PING and collecting it; push frames that arrived meanwhile are dispatched during that read. A public poll is requested upstream in thunder#11.

Queue, stream and pub/sub over synap://:

API Reference

Configuration

Key-Value Store

KV Watch

Observe a key — or a wildcard pattern — and receive its new value on every change. Requires the synap:// transport; the loop blocks the current process (same model as pubsub()->observe()) and issues KV.UNWATCH on the way out:

Delivery is best-effort, latest-value; WatchEvent::$version resets when the key is deleted, expires or is evicted — version 1 marks a new incarnation.

Message Queues

Event Streams

Pub/Sub

Error Handling

Examples

See the examples/ directory:

Run examples:

Testing

StreamableHTTP Protocol

This SDK uses the StreamableHTTP protocol with a unified endpoint (/api/stream):

License

Apache License 2.0 - See LICENSE for details.

Links


All versions of synap-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
ext-sockets Version *
guzzlehttp/guzzle Version ^7.8
hivellm/thunder Version ^0.2.1
rybakit/msgpack Version ^0.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hivellm/synap-sdk contains the following files

Loading the files please wait ...