sdk-php
sdk-php copied to clipboard
Lazy connectivity for Temporal client and healthCheck
SDK should have a lazy and eager way to create a client and expose a healthcheck method
ref: https://github.com/temporalio/sdk-php/issues/223
The SDK healthcheck goes though the already open client on RR side. A.k.a. it should aready work as expected and not create any excessive connections.
Does PHP client support lazy and eager creation?
Does it call getSystemInfo on connection?
Is the gRPC health service exposed via the client?
We have all of that in the other SDKs.
Not at the moment. We also don't have dial() routine in PHP, it happens inside underlyling C library.
@roxblnfk We will work on RFC based on https://github.com/temporalio/sdk-features/issues/45
With the release of 2.7.0, interceptor functionality will be introduced. Along with this, the SystemInfoInterceptor is added, which calls getSystemInfo() and getCapabilities() on the first client request.
This interceptor is not added by default, but we can do this - add SystemInfoInterceptor if the user has not specified their list of interceptors for client calls. If the user wants to disable the interceptor, they can simply pass an empty list.
@wolfy-j @Sushisource what do you think about this?
Regarding gRPC HealthCheck - it's not supported by the PHP gRPC extension. https://grpc.io/docs/guides/health-checking/#language-support
@bergundy do we expect HealthCheck mostly in Activity and WF pollers or client code as well? We do have health checks for all the pollers, but PHP does not have a BG check mechanism for clients.
In other languages we have a lazy method to create a connection (client) that doesn't make any calls to the server, and an eager connection method that fails if getSystemInfo fails.
We also expose the gRPC heath service in the client for users that want to call that.
That's all I requested in this issue.
Eager connect on demand (lazy) - done (in fact in PHP this is the default way how GRPC works) getSystemInfo - done with 2.7
I think we are good there.