RPC

11 Aug 2009 . Edited: 11 Aug 2009

RPC is cool.  I've done similar tricks using php==>serial and UDP packets, but I can see RPC as being a better way for remote control.  Gonna have to play with that further.

 

One issue I've had is when the browser cashes a site, if you try and send the same rpc request multiple times, the browser may or may not resend the data.  If it thinks the site hasn't changed (not sure how it knows when to refresh) it won't update/resend unless you specifically tell it to.

Something to think about.

 

Scott 

11 Aug 2009

Hi Scott,

RPC is cool

Thanks! Yeah, it is great fun.

One issue I've had is when the browser cashes a site, if you try and send the same rpc request multiple times, the browser may or may not resend the data.

This best approach is to force the browser to resend, as this is the only thing you really have control of. The natural way is to use POST rather than GET, which requires a repost. For an AJAX request, this is easy.

Another thing to make GET work more reliable is to return headers that say non-cachable (which I think Rolf added for the HTTP-RPC bridge), but the browsers can happily ignore this (IE especially), so POST is the best approach.

Simon