tn-cli speed compared to gRPC

17 views
Skip to first unread message

Chariton

unread,
Mar 8, 2024, 4:24:17 AMMar 8
to Tinode General
I'm trying to integrate tinode with an existing service that posts messages via MQTT. I will format the MQTT commands so that they can match the "to" and "from" usernames in tinode.

I am thinking of having a python script monitor the incoming MQTT messages, and have that script call tn-cli to post the messages. Do you think this is a suitable solution? Would tn-cli somehow be much slower or have other downsides compared to just using gRPC directly? I am new to gRPC, and it is easier for me to start out with just using tn-cli.

Gene

unread,
Mar 8, 2024, 11:48:29 AMMar 8
to Tinode General
It does not sound like a good idea to me, unless you expect very low rate of messages. Or if it's a toy/POC project.

Starting tn-cli for each message involves: starting  a python process, loading tn-cli code from files, doing a DNS lookup, opening a TCP connection, logging in to Tinode, etc. If I were doing it, I would write a custom daemon which includes both MQTT and gRPC clients.

Chariton

unread,
Mar 8, 2024, 12:19:28 PMMar 8
to Tinode General
Thank you very much for the information
Reply all
Reply to author
Forward
0 new messages