Project

General

Profile

Is it possible to keep the connection between scripts executions?

Igor Khomenko
Added about 4 years ago

Is it possible to keep the connection between scripts executions?

I would like to improve execution speed - connect only once and then execute scripts

thanks


Replies (6)

Added by Wojciech Kapcia TigaseTeam about 4 years ago

You can use -i to enter interactive mode.

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 4 years ago

or another option would be to write own tool based on the code to keep permanent connection and stream through this one connection. Some of our customers build kind of a XMPP client (a bot) integrated with their own services. This bot keeps admin connection open all the time and executed all the admin commands when necessary,

Added by Igor Khomenko about 4 years ago

Thanks,

Does Tigase REST API component work in a same way? It logins to Tigase for every API call?

Added by Wojciech Kapcia TigaseTeam about 4 years ago

No, REST API is an internal Tigase component so it operates inside the Tigase hence no log-ins.

Added by Igor Khomenko about 4 years ago

So it will work faster as I understand

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Well, it should. Basically, when it comes to speed it should be more-or-less like that:

  • constant XMPP socket connection and execution of ad-hocs (i.e. like interactive mode in tclmt)

  • HTTP API

  • TCLMT in normal mode (each execution opens the connection, login and execute the command)

    (1-6/6)