|
In the so-called 'internet of things' world, which is basically what has become of automation in the popular press and hence in the great unwashed masses for the most part, it's way too common. And of course it's even worse in that half the time it's a cloud based API, so not only REST but you have to talk to a server half-way around the world to talk to a device 20 feet from the computer.
Explorans limites defectum
|
|
|
|
|
Dean Roddey wrote: you have to talk to a server half-way around the world to talk to a device 20 feet from the computer Same deal where I work. They removed (or refused to replace) all of our attached desktop printers. We now have department printers, all managed from the home office. When I print a code fragment to mark up by hand(*), the data goes 800 miles to a server and then comes back 800 miles to the printer 30 feet away from me. This process typically takes 3-5 minutes.
(*) Yes, I'm an old fart. I still do this occasionally. Don't worry, though - my annual stack of recycled paper is around one inch tall.
Software Zen: delete this;
|
|
|
|
|
I find REST to be carp... but i'm in the minority... so i have to use it
I once wrote something, but did not focus on latency. Its a good point that i had not considered.
GitHub - maxsnts/TARAPI-An-API-Rant: “TARAPI” An API Rant![^]
(I end up not finish the Rant because by that point i had released some steam.
There's even lots of spelling mistakes)
|
|
|
|
|
<sarcasm>
Well duh, you need to use npm to install AngularJS so you can use Node.js for your WebSockets that you should connect using Webpack.
If you're not using at least 100 libraries you're not putting in enough effort and YOU're the problem
</sarcasm>
|
|
|
|
|
Does one of those libraries use the Retroflexive, Inter-secular Fractal Pipe Massage pattern?
Explorans limites defectum
|
|
|
|
|
Is your problem with REST per se, or is it just a problem with slow devices transferring too much state?
|
|
|
|
|
The problem is as I originally outlined. It's a completely synchronous call/response system being used in a situation where 99.9999% of the time there's nothing to respond with. But, when there is, it needs to be seen very quickly. So it's just the completely wrong tool for the job.
On the automation system side, you could be dealing with hundreds of devices, so it's doing huge amounts of I/O and network traffic for essentially no reason, and it has to parse all that data, convert to binary, and check it against what it saw last time to see if it has changed, and each of those devices might have quite a few values to deal with. If the device can only transfer a single big chunk of state, it just makes it that much worse.
If multiple clients needs to do the same on those devices, it compounds, and sometimes overwhelms the device.
Explorans limites defectum
|
|
|
|
|
Sorry, I had my HTML backward. Your computer should be the server and all the IoT thingamabobs should be clients. Then they could PUT or POST asynchronously. If that's not the way the world works, get another world.
|
|
|
|
|
That's generally not desirable for security reasons. The automation system should be the one making connections, as configured by the administrator. In some cases it's unavailable but typically it's something that's not done unless really necessary.
Explorans limites defectum
|
|
|
|
|
Dean Roddey wrote: Why don't people get that REST sucks for a wide variety of applications
Or from my point of view why don't people get that Agile doesn't work for architecture?
Dean Roddey wrote: People make a device, and probably make no effort to ask anyone like me what are needs are,
They decide that they can deliver the API in 6 weeks or worse 2 weeks, and the "product owner" is more interested in delivery than usability. Not to mention of course that when the implementation phase starts there is in fact no actual requirements beyond "make an API" but certainly no willingness to back off on the delivery.
Dean Roddey wrote: So now you have a a bunch of devices out that that you just have to pound relentlessly with GET commands ...make it 'easy' by only allowing the transfer of the entire state of the device
It was designed based on what info the implementer had. They didn't have time to make 120 different routines, and QA certainly would not have had time to test it. And probably when asked they asserted they were not even sure anyone would use the API. So you get one API call.
Dean Roddey wrote: It's like so many people just don't even think beyond a REST API or HTTP, and throw it into everything, whether it's remotely appropriate or not.
Its like people think that 2 week sprints are more than sufficient to plan for an architecture that is supposed to be robust and last for years. An an off hand comment in a meeting several weeks ago leads to a requirement that must be implemented right now. And it certainly doesn't have anything to do with actually determining how it will be used and very definitely there is no time to actually figure that out.
|
|
|
|
|
Do cows have hooves because they lactose?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Are all bulls horny?
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
I'll have to ruminate on that.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
How cud ewe? Udder nonsense! Being milked for all it's worth is the whey this will end up.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
|
That's probably a moot point.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
I hate cows - does that make me lactose intolerant?
Socialism is the Axe Body Spray of political ideologies: It never does what it claims to do, but people too young to know better keep buying it anyway. (Glenn Reynolds)
|
|
|
|
|
Police from Oklahoma called and asked if they'd seen my ex-wife, and I said, "No. Maybe she's migrating north with the rest of her pod."
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
A pod with a dominant female is a terrible thing.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
She's not dominant - she's always hungry. If you sit still for too long in the same room, she starts to view you as a food item.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
So they didn't give you a cetacean?
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Here in north Italy I have to survive without many things I am used to. One of them is to eat a piece of Rijstevlaai[^]. They are totally unknown here and when I come back next week, I will get one for my poor deprived coworkers. Stop orking the cows and do something good with their milk instead. Now the big guestion is: Belgian recipe or better the sort they have in Aachen?
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
It's just overcooked rice pudding (with 50% water, rather than 100% milk) dumped in a pre-cooked pastry base and re-baked.
There's no need to buy stuff like that (for 7000% of the cost of the materials), when you can make better yourself with precious little effort.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
I doubt that I will get the ingredients for 7 cents and if you could see my tiny kitchen (2m x 2m with a stove, a sink, a refrigerator and barely enough room to move), you would agree that that's not such a great alternative.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|