PhotonLibOS
PhotonLibOS copied to clipboard
It would be great if it supports various clients, such as grpc, redis, mysql..
Hah..it's nearly an impossible thing. :D.
gRPC had been talked before, but there were no actual needs. gRPC has async client/server API, which might be working with Photon together.
Do you know if the other two have the equivalents?
gRPC had been talked before, but there were no actual needs. gRPC has async client/server API, which might be working with Photon together.
Do you know if the other two have the equivalents?
If we use gRPC async api, then we go back callback mechanism.. redis-plus-plus have async api and partially support c++20 coroutine
gRPC had been talked before, but there were no actual needs. gRPC has async client/server API, which might be working with Photon together.
Do you know if the other two have the equivalents?
Or you mean, call gRPC async then suspend photon and later resume photon in gRPC callback?
gRPC had been talked before, but there were no actual needs. gRPC has async client/server API, which might be working with Photon together. Do you know if the other two have the equivalents?
Or you mean, call gRPC async then suspend photon and later resume photon in gRPC callback?
Yes, you can use eventfd to communicate between Photon thread and gRPC loop thread, by using Photon's wait_for_fd
API.
Or you can pass a Photon semaphore into gRPC's call back and do semaphore.Wait in your caller thread.
The main reason is that gRPC does not allow to run on an external event loop by far.
@jiangdongzi https://github.com/alibaba/PhotonLibOS/pull/424 can be potentially used for redis-cpp