Click here to Skip to main content
15,915,847 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: A couple of video intro tests Pin
#realJSOP19-Apr-19 7:02
professional#realJSOP19-Apr-19 7:02 
GeneralNo REST for the weary Pin
Dean Roddey18-Apr-19 7:49
Dean Roddey18-Apr-19 7:49 
GeneralRe: No REST for the weary Pin
PIEBALDconsult18-Apr-19 8:15
mvePIEBALDconsult18-Apr-19 8:15 
GeneralRe: No REST for the weary Pin
Dean Roddey18-Apr-19 18:53
Dean Roddey18-Apr-19 18:53 
GeneralRe: No REST for the weary Pin
Kirk 1038982119-Apr-19 1:41
Kirk 1038982119-Apr-19 1:41 
GeneralRe: No REST for the weary Pin
Dean Roddey19-Apr-19 7:46
Dean Roddey19-Apr-19 7:46 
GeneralRe: No REST for the weary Pin
GuyThiebaut18-Apr-19 8:19
professionalGuyThiebaut18-Apr-19 8:19 
GeneralRe: No REST for the weary Pin
Dean Roddey18-Apr-19 8:46
Dean Roddey18-Apr-19 8:46 
It's not up to me, we are at the mercy of whatever the device manufacturer decides to do. Of course TCP/IP in general is a bad choice for most small automation doo-dads, but since it's the defacto, ubiquitous connection scheme that is going to be in there in the home, more and more companies use it. It's always the same, unplanned, excremental growth leads to the worst case scenario becoming the standard scenario so often.

The only device that uses HTTP well (that I've run across) is the ISY 994. It uses a persistent HTTP connection and just asynchronously sends notifications as GETs to the automation system when something changes. If you are going to use HTTP, that's how it should be done.


There are other simple schemes that work well. One is to keep a running 64 bit serial number. Every time a value is changed, bump the serial number and set it on that value. Keep a sorted list of such changes (Which is simple and efficient to do, push each one onto the top of a stack when it changes, if it's full dump the bottom one.)

When a client asks for changes, they pass the last serial number they got (zero if none yet), and the device can just find that number in the list (binary search since it is sorted by serial number), and returns him anything from there forward. If the number is below the bottom, he returns an error saying 'sorry you have to do a full resync'. If it works, the automation system just stores that returned serial number as the last one it got, and passes it back next time. The majority of queries just return a very small 'no changes' status since the serial number passed is the same as the one on top of the stack.

I use this type of scheme to VERY good effect in CQC in a number of places. My ORB supports it as well, with a special 'poll method' that takes a serial number as the first parameter and returns a boolean. If the serial number is the same as the handler on the server side, then it returns false and the server side ORB knows it doesn't have to stream back any of the output parameters.
Explorans limites defectum

GeneralRe: No REST for the weary Pin
Dave Kreskowiak18-Apr-19 9:32
mveDave Kreskowiak18-Apr-19 9:32 
GeneralRe: No REST for the weary Pin
GuyThiebaut18-Apr-19 19:48
professionalGuyThiebaut18-Apr-19 19:48 
GeneralRe: No REST for the weary Pin
Dean Roddey18-Apr-19 20:18
Dean Roddey18-Apr-19 20:18 
GeneralRe: No REST for the weary Pin
#realJSOP18-Apr-19 9:13
professional#realJSOP18-Apr-19 9:13 
GeneralRe: No REST for the weary Pin
raddevus18-Apr-19 9:25
mvaraddevus18-Apr-19 9:25 
GeneralRe: No REST for the weary Pin
Dean Roddey18-Apr-19 10:39
Dean Roddey18-Apr-19 10:39 
GeneralRe: No REST for the weary Pin
#realJSOP18-Apr-19 12:50
professional#realJSOP18-Apr-19 12:50 
GeneralRe: No REST for the weary Pin
Dean Roddey18-Apr-19 18:54
Dean Roddey18-Apr-19 18:54 
GeneralRe: No REST for the weary Pin
User 483504718-Apr-19 9:26
User 483504718-Apr-19 9:26 
GeneralRe: No REST for the weary Pin
RickZeeland18-Apr-19 9:45
mveRickZeeland18-Apr-19 9:45 
GeneralRe: No REST for the weary Pin
Gary R. Wheeler18-Apr-19 12:26
Gary R. Wheeler18-Apr-19 12:26 
GeneralRe: No REST for the weary Pin
Dean Roddey18-Apr-19 15:02
Dean Roddey18-Apr-19 15:02 
GeneralRe: No REST for the weary Pin
Gary R. Wheeler19-Apr-19 1:38
Gary R. Wheeler19-Apr-19 1:38 
GeneralRe: No REST for the weary Pin
Max Santos18-Apr-19 22:48
Max Santos18-Apr-19 22:48 
GeneralRe: No REST for the weary Pin
Sander Rossel19-Apr-19 0:37
professionalSander Rossel19-Apr-19 0:37 
GeneralRe: No REST for the weary Pin
Dean Roddey19-Apr-19 7:55
Dean Roddey19-Apr-19 7:55 
GeneralRe: No REST for the weary Pin
SeattleC++19-Apr-19 4:33
SeattleC++19-Apr-19 4:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.