当前位置:网站首页>09. Tencent cloud IOT device side learning -- RRPC and behavior

09. Tencent cloud IOT device side learning -- RRPC and behavior

2022-06-24 10:43:00 fancyxu

The main purpose of this series is to record the learning notes of Tencent cloud Internet of things device , And on the device side SDK Make a supplementary explanation .

brief introduction

RRPC And behavior

RRPC And behavior are used for The server initiated Communication process of , With confirmation mechanism , It is applicable to response sensitive scenarios ( With timeout concept ,RRPC 4S / Behavior 5S).

  • RRPC The message in is transmitted through , The client designs the application layer protocol interaction
  • Messages in behavior need to design data templates , Interact according to the format of the data template

Development considerations

  1. Timeout time : This mainly refers to the server cloud API Time out returned ,RRPC And the results of behavior will pass through the cloud API return , The device needs to send a reply within the specified time . So if the device side cannot determine the time required for the reply ( Generally, the logic is completed according to the message , Return the message according to the result ), The proposal USES attribute perhaps Reply first + Send events The way .
  2. Easy to expand : For application scalability ,RRPC Transparent content can be selected JSON character string , And behavior usually defines Input parameters of string type Deposit JSON, To avoid frequent modification of data templates .
原网站

版权声明
本文为[fancyxu]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/06/20210621015131134H.html