What I LOVE and HATE About MQTT and OPC UA

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
you know i'm hearing all the time mqtt is the greatest ever it's going to take over the automation world i've got other people saying opcua opcua is really got all this momentum behind it that's really going to take over the automation world so today i thought i'd do a video about all the things that i love and what i hate about mqtt and opc ua if you don't know me my name is john rinaldi i'm the owner of real-time automation i've been in the automation embedded networking industrial protocol field now for over 30 years i had hair when i started i didn't i didn't weigh as much either and so i've got written five books i've been i've been at this stuff for a long time and i really i actually love and hate both of these things and that's what i want to talk about today let's start first talk about what are these things so opc is the successor to opc ua is a successor to opc which i now call opc classic opc classic just ran on windows was very limited no object modeling capabilities it was only it was used windows com which is a a discontinued obsolete system within communication system within windows still there but they it's actually absolutely not being worked on so this was very limited it was just a driver you could buy say hey put the driver in now you can get some data into microsoft kinds of applications so you're very limited in platform you're limited on what kind of data you could get you were very limited on how fast you could get it so opc ua is to open all that up client server architecture you know client server architecture it's very sophisticated sophisticated object modeling so it was a much more much more enhanced than the original opc was so it was a a pretty exciting enhancement when this thing was released all about 2000 or in some place in the 2000s i don't recall exactly when mqtt is pretty different mqtt was designed for the oil space uh i think it was for for oil and gas and they wanted to send small amounts of data so this is a way of sending small pieces of data from a lot of different places all together to into into um into a central organization so kind of a different kind of it came from different backgrounds mqtt is now is used in some in things like facebook live it's got into spawn systems it's in all all kinds of things other than industrial systems where opc ua is really only used in industrial mqtt is a much broader technology used by all kinds of it kinds of applications so small pieces of data really simple lightweight and that and and so forth so they're they're really fairly different technologies that require a whole different kind of resource if you're going to try to implement them so let's talk about opc ua and some of the things i really like about opc ua one would be i really like the sophisticated object modeling um opc way has the is the only the only protocol that i've ever seen well pcu is really an architecture it's not a protocol but it has the only one that actually can model data and do it really well it's got object modeling and information modeling don't have time to talk about the difference of that today but it's very sophisticated better than what you find in profinet or ethernet ip or anything else and they did they did a really good job on that it's a it's a certifiable protocol so if you have a device that runs opc ua you can actually get it certified to make sure that it's going to operate within the bounds of the opc ua specification it's transport independent love the fact that it's transport and pretended you can then break apart all of the services and object modeling um transport independent you can break apart all of the opc us services and put them in and use any transport you want so you could take opc ua and run it on firewire for example if you wanted because all that stuff that's opc that actually has to do with the data is completely different for how it gets moved from one node to another node so there's some there's some really good things to say about this uh besides that you know and it's also and it's all platform independent would be another thing so those are those are kind of some of the things that i really love about it and if you want to know more about this of course you can get my blue book on opc ua it's one of the i think the best books there is explaining opcua okay there's lots of things though to be said about about mqtt because you know this has really taken off and has got a lot of adherence and people love it why do they love it well number one is a simple is that simplicity it's a very simple easy to understand iot protocol so this is really you know this is this is just uh as as simple as you can get i have to give credit to arlen nipper and everybody they did a great job of really simplifying simplifying this um it is another another thing about it is it's very scalable so this is this can you can have one node delivering this this or you could put this so for example you could put this in an apple grove in sensing what is the moisture in the ground near hundreds and you know 100 000 trees and get all of the data from all of those nodes collected i mean it's incredibly scalable uh and the other thing is that i love about it is the pub sub publish subscribe architecture so what happens is a node on op on on mqtt publishes data to a broker and then you could have subscribers who subscribe to that broker and get the data and get the data that the broker has so it breaks up if the connection between the device generating the data and where the data is going to be used so that's kind of i love i love that about it too so there's some you know there's there's some good things to be said about both of these now but there's also some things i really dislike about about this um the first thing i dislike about opc ua is that it's ever it they've they've just made it everything to everybody and technologies like that are are doomed some they it's it's difficult to to make something that could do everything and because as soon as you start adding this to it adding this to it and this to it it becomes overloaded with features and functions and it becomes unusable i'm worried about opc ua that they haven't said okay here's its niche here's what it does and it's gonna we're gonna make it do this really well instead they've said we're gonna make it do all of these things solve all of these problems so i really hate that about the fact that they've opened it up and and made it so big and so encumbered with all sorts of of uh of things to meet all different kinds of applications another thing i hate about it is is the pub sub that they have i don't think that the pub sub that they have is very useful this is based upon you know tns i'm sorry tsn time sensitive networking i don't think that there's time sensitive network is a way of making ethernet deterministic i don't think that that's necessary i don't think that i i don't think that tsn is is is well thought out i think that that's technology is not going to be successful so pub sub pro for obc ua is not going to be that successful so the publish subscribe architecture of this i don't think will be used very much so i really i really dislike what they did about that uh scalability is is an issue here too it's not all that scalable if you wanted to roll out opc ua nodes to do that ola to do that olive grove or apple tree grove whatever kind of application opc ua would be too big too encumbered it's stupid it's it's really too heavy for those small kinds of applications applications that mqtt is good at now that doesn't mean that that this doesn't have any disadvantages either so let's talk about this well one of the things that i dislike about mqtt is that we've got we've got all these different versions we came out with mqtt then they went out to you know then there was version 3.1.0 then there was 3.1.1 now there's version 5. so you know that makes things difficult i mean because if you have the you know sure it's it's backwards compatible but you still have to be concerned of well okay i can buy a device that does mqtt but what version of mqt does it do this is this is concerning because there's different features and functionality available in this uh so that's that's a cause for some concern i don't like i think that the object modeling that this thing has is weak um and i'm going to talk about something about how that feeds into some information modeling stuff but for you know initially the initial versions the 3.0 3.11 didn't have any object modeling essentially you were selling sending a packet and the content of that packet was who knows what the receiver would have to have some other kind of knowledge to know how to decode it well that thing kind of gets solved with spark plug spark plug b has object modeling the other thing the spark plug b added that's just really nice that i love is this thing called birth and death notices where you would know if an end node is comes online or if an end load goes offline that was pretty cool uh but this object modeling really hasn't been solved at least to the to my liking and i think that this is going to lead to some some trouble in the future when we get when we get there um the other thing that that i don't l i hate about this is is the topic names so topic names are kind of open and free again just like the uh the object modeling you've got content you've got a a packet of data and you don't know what it's called with everything on mqtt goes on a topic so essentially when you publish data to the broker you're going to give it a topic name well those topic names are pretty much anything especially with it 3.13 3.1.0 3.1.1 you had the topics could be were undefined whatever anybody wanted so you have they're just kind of random you have to know what the topic name is you're looking for spark plug b that kind of clean that up a little bit topic names are more well defined but still i i wonder you know is you know we need to get to a point where we have standardized uniform name spaces i don't know if the topic name structure which is in spark plug b is going to work or i haven't looked much at version 5 and they say that spark plug b is just kind of intermediate on the way to version 5. so i i have people telling me that opc ua has all the momentum all the big companies are behind opc ua aws and microsoft and google are all on that bang wagon then i have people saying no mqtt is growing like crazy everybody who's really doing real work and making projects work now is using mqtt i think i think the solution is that you got to be ready to support both of them now the future the future is information models where you're going to be able to go and get an information model in the cloud you want to be able to download it into your applications and now your applications would know how to talk to that hydraulic or or that valve or whatever the drive whatever it is you're going to have this standard information model now probably in the future i suspect that you know neither one of these is going to go away i think they're both going to be used and i have questions you know i have i have questions about either one of them no matter which one you choose there's going to be some limitations and some hurdles that you're going to have to jump over but so i i kind of i love mqtt i also hate mqtt i love opc ua i hate opc ua so i'm kind of in the middle with all of you the rest of you that i don't know what's gonna what the future's gonna hold i know that both of these are important we're gonna have to support both and i guess we're just going to be stuck with a couple of competing standards which is a standard case for industrial automation we're always stuck with competing standards and as we are where we are today i'm john rinaldi thank you very much for watching [Music] [Music]
Info
Channel: RealTimeAutomation
Views: 21,943
Rating: undefined out of 5
Keywords:
Id: k2Pwbtj_APc
Channel Id: undefined
Length: 13min 58sec (838 seconds)
Published: Tue Aug 31 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.