Git Product home page Git Product logo

Comments (6)

zoic21 avatar zoic21 commented on June 27, 2024

Hello,
I'am not sure it's good idea. With batch order request will take more time and can failed with timeout.

from core.

Cajuteq avatar Cajuteq commented on June 27, 2024

Hi, thanks for the response, it is however possible to limit the number of requests allowed in a batch to take care of sure scenario with an optional "batchLimit" parameter.
Also, a timeout fail is always possible due to bad network and should already be taken care of in the client side.

from core.

zoic21 avatar zoic21 commented on June 27, 2024

Hello,
Yes we can limite but it's impossible to find this limit, it's depend of what you do. I think for your needed it's better to add this by a plugin. With a plugin you can take all request respond fast if no response needed and do actions.

from core.

Cajuteq avatar Cajuteq commented on June 27, 2024

[EN] Hi, the limit indeed depends on usage but a sensible default that one can customize as a global option as those present in core/config/default.config.ini sould do the trick. A plugin would not be a good way to go, as the jsonRpc api should implement the jsonRpc specification (linked at the top of the Jeedom jsonRpc documentation) and more specificaly :

6 Batch

To send several Request objects at the same time, the Client MAY send an Array filled with Request objects.

The Server should respond with an Array containing the corresponding Response objects, after all of
the batch Request objects have been processed.


[FR] Bonjour, oui la limite dépend de l'usage, mais un paramètre global avec une valeur par défaut dans core/config/default.config.ini, me semble mieux que l'absence d'implémentation. Utiliser un plugin en remplacement de l'api jsonRpc, n'est pas une solution long terme pour ce cas précis car il s'agit d'une partie de l'implementation du protocole jsonRpc. Plus précisement le 6 chapitre de la spécification jsonRpc librement traduite comme suis :

6 Groupement

Pour envoyer plusieurs Requêtes en même temps, le Client PEUT envoyer une Liste de Requêtes.

Le serveur doit repondre avec une Liste contenant les objets de Réponses après avoir traités toutes les Requêtes.

from core.

zoic21 avatar zoic21 commented on June 27, 2024

Bonjour,
Jeedom se base sur le protocole jsonrpc mais ne le suis pas a la lettre, c'est une inspiration d'ou le faite qu'on n'implémente pas le chapitre 6.

Clairement cette modification me fait peur elle va être très lourde et impactante pour un usage vraiment restreint (1er demande en 10ans...). Je vais la remonter a l'équipe Jeedom c'est eux qui ont le dernier mot.

from core.

zoic21 avatar zoic21 commented on June 27, 2024

Bonjour,
Après discution avec l'équipe Jeedom nous allons voir pour améliorer l'api en 4.5, non pas avec le batch json rpc mais en rendant l'api accessible depuis mqtt ce qui permettra de faire du batch rpc.

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.