NATS server in k8s and android client

23 views
Skip to first unread message

Denis Strokov

unread,
Oct 3, 2022, 10:16:34 AM10/3/22
to nats
Hi!

I use NATS between microservices in k8s.
Now I want to create a task service for android clients.
I need to publish tasks in NATS and receive them on android clients.
How to build the proper architecture?
Should I use REST proxy? 
What type of authorization is preferable?

Regards, Denis Alexandrovich.

derek

unread,
Oct 3, 2022, 11:52:00 AM10/3/22
to nats
You could write the android client in java if you have access to normal TCP sockets to connect to a NATS server. Or you could use Typescript/Javascript which can connect to NATS servers over websockets.

I might try TS/JS and use an NGS account to start.

Denis Strokov

unread,
Oct 3, 2022, 11:15:29 PM10/3/22
to nats
Thanks for the answer.
Yes, I can connect directly through the Java client, but this way I store the username and password on the client.
Is using NATS as a message queue and sending messages through a REST proxy a bad idea?

Derek Collison

unread,
Oct 4, 2022, 2:18:40 AM10/4/22
to nat...@googlegroups.com
No, just more moving parts to manage. However you would still need a way to prove AuthN on the client with HTTP as well.

There are ways to manage access to the signing key that would most likely be used for NATS and they can be globally revoked instantly and also locked down from an AuthZ perspective to control what they can and can not publish and subscribe to.


--
You received this message because you are subscribed to the Google Groups "nats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to natsio+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/natsio/77ba222f-6599-4530-a686-dcb530ac22d7n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages