Skip to content

Releases: spiral/roadrunner-bridge

v3.7.0

03 Sep 21:42
4f166f9
Compare
Choose a tag to compare

What's Changed

Full Changelog: v3.6.2...v3.7.0

v4.0.0-RC1

10 Sep 18:59
92ee4eb
Compare
Choose a tag to compare

What was changed

  • Sync with Spiral 3.14

Full Changelog: v4.0.0-alpha2...v4.0.0-RC1

v4.0.0-alpha2

02 Sep 10:51
ccedaf9
Compare
Choose a tag to compare
v4.0.0-alpha2 Pre-release
Pre-release

Interceptors

Full integration with interceptors of Spiral v3.14.
In interceptors, you can interact with the request context, modify the input, handle the output, and perform any actions just before calling the target method.

Container Scopes

Added support for container scopes. Each worker will open the corresponding scopes immediately after initialization (dispatcher scope) and before running interceptors (context scope).
Dispatcher scopes are used to limit service bindings. Contextu scopes limits the context. For example, in the HTTP module, the context is ServerRequestInterface from PSR-7. Corresponding contexts have been added for the others as well.

HTTP:

  • http - dispatcher scope
  • http-request - context scope
  • \Psr\Http\Message\ServerRequestInterface - context class

Centrifugo:

  • centrifugo - dispatcher scope
  • centrifugo-request - context scope
  • \RoadRunner\Centrifugo\Request\RequestInterface - context class

gRPC (server):

  • grpc - dispatcher scope
  • grpc-request - context scope
  • \Spiral\RoadRunnerBridge\GRPC\UnaryCallInterface - context class

Queue:

  • queue - dispatcher scope
  • queue-task - context scope
  • \Spiral\Queue\TaskInterface - context class

TCP:

  • tcp - dispatcher scope
  • tcp-request - context scope
  • \Spiral\RoadRunner\Tcp\RequestInterface - context class

gRPC

Performance

The worker initialization time has been significantly optimized by using
tokenizer listeners
when searching for gRPC services.

Client

The responsibility for making client gRPC calls has been moved to the spiral/grpc-client package, which is included by default.

Generating client classes is no longer required, as spiral/grpc-client generates the necessary proxy classes at runtime.
That's why all the extra generators (BootloaderGenerator, ConfigGenerator, ClientGenerator) and client-related classes have been removed from this package.

To configure spiral/grpc-client, a client section has been added to the gRPC configuration:

return [
    // File 'app/config/grpc.php'
    // ... other options ...

    'client' => new GrpcClientConfig(
        interceptors: [
            SetTimoutInterceptor::createConfig(6_000),
            RetryInterceptor::createConfig(
                maximumAttempts: 1,
            ),
            ExecuteServiceInterceptors::class,
        ],
        services: [
            new \Spiral\Grpc\Client\Config\ServiceConfig(
                connections: ConnectionConfig::createInsecure('localhost:9001'),
                interfaces: [
                    \GRPC\Mailer\MailerServiceInterface::class,
                    \GRPC\Mailer\PingerServiceInterface::class,
                ],
            ),
        ],
    )
];

Refer to the spiral/grpc-client documentation for more information.

v4.0.0-alpha

02 Aug 22:36
d1cb4ee
Compare
Choose a tag to compare
v4.0.0-alpha Pre-release
Pre-release

Interceptors

Full integration with interceptors of Spiral v3.14.
In interceptors, you can interact with the request context, modify the input, handle the output, and perform any actions just before calling the target method.

Container Scopes

Added support for container scopes. Each worker will open the corresponding scopes immediately after initialization (dispatcher scope) and before running interceptors (context scope).
Dispatcher scopes are used to limit service bindings. Contextu scopes limits the context. For example, in the HTTP module, the context is ServerRequestInterface from PSR-7. Corresponding contexts have been added for the others as well.

HTTP:

  • http - dispatcher scope
  • http.request - context scope
  • \Psr\Http\Message\ServerRequestInterface - context class

Centrifugo:

  • centrifugo - dispatcher scope
  • centrifugo.request - context scope
  • \RoadRunner\Centrifugo\Request\RequestInterface - context class

gRPC (server):

  • grpc - dispatcher scope
  • grpc.request - context scope
  • \Spiral\RoadRunnerBridge\GRPC\UnaryCallInterface - context class

Queue:

  • queue - dispatcher scope
  • queue.task - context scope
  • \Spiral\Queue\TaskInterface - context class

TCP:

  • tcp - dispatcher scope
  • tcp.request - context scope
  • \Spiral\RoadRunner\Tcp\RequestInterface - context class

gRPC

Performance

The worker initialization time has been significantly optimized by using
tokenizer listeners
when searching for gRPC services.

Client

The responsibility for making client gRPC calls has been moved to the spiral/grpc-client package, which is included by default.

Generating client classes is no longer required, as spiral/grpc-client generates the necessary proxy classes at runtime.
That's why all the extra generators (BootloaderGenerator, ConfigGenerator, ClientGenerator) and client-related classes have been removed from this package.

To configure spiral/grpc-client, a client section has been added to the gRPC configuration:

return [
    // File 'app/config/grpc.php'
    // ... other options ...

    'client' => new GrpcClientConfig(
        interceptors: [
            SetTimoutInterceptor::createConfig(6_000),
            RetryInterceptor::createConfig(
                maximumAttempts: 1,
            ),
            ExecuteServiceInterceptors::class,
        ],
        services: [
            new \Spiral\Grpc\Client\Config\ServiceConfig(
                connections: ConnectionConfig::createInsecure('localhost:9001'),
                interfaces: [
                    \GRPC\Mailer\MailerServiceInterface::class,
                    \GRPC\Mailer\PingerServiceInterface::class,
                ],
            ),
        ],
    )
];

Refer to the spiral/grpc-client documentation for more information.

v3.6.2

02 Aug 08:26
f86982f
Compare
Choose a tag to compare

What's Changed

  • Change log level from error to warning for pipeline declarations when a pipeline with the same name already exists by @butschster in #107
  • Fix proto_path params order in a protoc command when PHP classes are generated by @roxblnfk in #106

Full Changelog: v3.6.1...v3.6.2

v3.6.1

25 Jun 10:22
c9db5fb
Compare
Choose a tag to compare

What's Changed

  • TCP: clear error variable before next request by @roxblnfk in #105

New Contributors

Full Changelog: v3.6.0...v3.6.1

v3.6.0

20 May 16:46
e7709ed
Compare
Choose a tag to compare

What's Changed

Full Changelog: v3.5.0...v3.6.0

v3.5.0

12 Apr 11:39
191042e
Compare
Choose a tag to compare

What's Changed

  • Added support for spiral/roadrunner-tcp v4.0.0. by @msmakouz in #102

Full Changelog: 3.4.0...v3.5.0

v3.4.0

29 Feb 15:40
15013b3
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.3.1...3.4.0

v3.3.1

28 Dec 13:03
fd53f42
Compare
Choose a tag to compare

What's Changed

  • Adding Exception handling when searching for a handler by @msmakouz in #96

Full Changelog: 3.3.0...3.3.1