Hi. In my scenario, I have many publishers sending fire-and-forget updates to specific channels from wearables (in particular, Apple Watch) every few seconds. They simply publish to a channel without requiring any subscription. Subscribers, instead, are more capable clients leveraging WebSockets, and they are fewer in number.
In this case, the suggested way to send data is to POST directly (leveraging HTTP/2 or HTTP/3 via URLSession on Apple Watch).
The publish API would be perfect for my use case, but I’m not comfortable with the fact that the only authentication option is an API key.
The only workaround I’ve found so far is to have clients POST to the backend, and then have the backend post to Centrifugo. However, this approach has drawbacks: the backend must scale as Centrifugo usage grows, and it introduces additional costs and complexity.
I understand that APIs are generally expected to be used by backends, but a client-facing POST endpoint with JWT authentication would be perfect for my use case.
Thanks!
Hi. In my scenario, I have many publishers sending fire-and-forget updates to specific channels from wearables (in particular, Apple Watch) every few seconds. They simply publish to a channel without requiring any subscription. Subscribers, instead, are more capable clients leveraging WebSockets, and they are fewer in number.
In this case, the suggested way to send data is to POST directly (leveraging HTTP/2 or HTTP/3 via URLSession on Apple Watch).
The publish API would be perfect for my use case, but I’m not comfortable with the fact that the only authentication option is an API key.
The only workaround I’ve found so far is to have clients POST to the backend, and then have the backend post to Centrifugo. However, this approach has drawbacks: the backend must scale as Centrifugo usage grows, and it introduces additional costs and complexity.
I understand that APIs are generally expected to be used by backends, but a client-facing POST endpoint with JWT authentication would be perfect for my use case.
Thanks!