Author Topic: Java prevalence in industrial environments?  (Read 7139 times)

0 Members and 1 Guest are viewing this topic.

Offline Pack34Topic starter

  • Frequent Contributor
  • **
  • Posts: 753
Java prevalence in industrial environments?
« on: September 20, 2017, 09:36:45 pm »
I've been going back and forth with a new software engineering hire. He's wanting to move everything to Java claiming it's what everyone uses and is the most used in industrial environments. I've yet to meet a customer who wants it. It's 100% been C and C#.

I would find it really surprising for a piece of software for an industrial automation project to be written in Java. Is this really the case?
 

Offline hendorog

  • Super Contributor
  • ***
  • Posts: 1617
  • Country: nz
Re: Java prevalence in industrial environments?
« Reply #1 on: September 20, 2017, 09:53:57 pm »
I used to write all our automation stuff in Java after migrating from Delphi. Customers didn't ask for it, but that was because they didn't have to maintain it :)

The reason was we could run java on embedded linux boxes and it was so much easier to remotely maintain than a windows box.

Despite that, and that I'm out of date now, I expect you are probably right and the majority would be C/C# on windows.

Back in the day the only technical reason against java/linux was that OPC was windows only. That is probably not the case anymore.
IIRC I used a linux/unix native libraries instead of OPC to talk to the PLC's.
 

Offline John Coloccia

  • Super Contributor
  • ***
  • Posts: 1208
  • Country: us
Re: Java prevalence in industrial environments?
« Reply #2 on: September 20, 2017, 11:04:16 pm »
I really hate Java as a language, and my experience is that "everyone" is hardly a fair representation of it's prevalence in industrial settings. That said, I'd have to weight the pros and cons of a specific application, environment, requirements, etc, and if it's the right fit, it's the right fit.

Personally, I'm not one to do something because everyone is doing it, and I'm also not one to avoid something because no one is doing it. Just match the technology to the application, and all is well. :)
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19281
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Java prevalence in industrial environments?
« Reply #3 on: September 21, 2017, 08:21:24 am »
Before Java became available, quite a few Tek and HP instruments used Smalltalk internally. While I can't comment on the Tek ones, I know Smalltalk helped to get flexible products to the market speedily.

If you plan on using C/C++, be very sure you know which C/C++, since the standards vary widely over the years. In addition, make sure your programmers can understand all the gotchas in the FQA, http://yosefk.com/c++fqa/

There are two other vitally important considerations other than the language: the available libraries and available programmers with sufficient in-depth skill.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23018
  • Country: gb
Re: Java prevalence in industrial environments?
« Reply #4 on: September 21, 2017, 10:59:57 am »
tgzzz hits the nail on the head with the libraries and the skillset available.

On the subject of Java, I worked on a relatively large Java industrial automation product (ERP/manufacturing integration) in about 2002 and am currently maintaining the arse end of a dying one while we move it to something else. Regardless of skillset, it's not actually the worst platform simply because it's got lots of mature libraries and tools, particularly free debugging and profiling tools! Stuff tends to work and work well even if it is slightly horrible getting it there sometimes. It is certainly less volatile than C# which is going through MS's marketing crack pipe and fragmentation at the moment and safer than C/C++ and it is usually perfectly easy to write portable code with it.

If I was going to start again with a product now though, I'm not sure what I'd choose. Based on long working life, if I anticipated a complete rewrite interval of more than 20 years, I'd probably go with Java. Anything below that, I have literally no idea any more.
 

Online Jeroen3

  • Super Contributor
  • ***
  • Posts: 4068
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Java prevalence in industrial environments?
« Reply #5 on: September 21, 2017, 12:08:39 pm »
Where java?
- Real time processing. (don't)
- Server side data crunching. (yes)
- HMI panels. (yes)
- Client app for remote access. (don't even think about it)
 

Offline Pack34Topic starter

  • Frequent Contributor
  • **
  • Posts: 753
Re: Java prevalence in industrial environments?
« Reply #6 on: September 21, 2017, 02:41:47 pm »
Where java?
- Real time processing. (don't)
- Server side data crunching. (yes)
- HMI panels. (yes)
- Client app for remote access. (don't even think about it)

Client-side applications
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19281
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Java prevalence in industrial environments?
« Reply #7 on: September 21, 2017, 03:04:25 pm »
Where java?
- Real time processing. (don't)

Maybe you can't, but many people and companies "do", very successfully. I've done it personally. Application domains: telecoms components and systems, financial systems.

I wouldn't use it for hard realtime embedded systems, but Java is perfectly satisfactory for some soft realtime embedded systems.

As I noted, both HP and Tek also used Smalltalk embedded in their instruments.

There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Java prevalence in industrial environments?
« Reply #8 on: September 21, 2017, 03:47:28 pm »
I've been going back and forth with a new software engineering hire. He's wanting to move everything to Java claiming it's what everyone uses and is the most used in industrial environments. I've yet to meet a customer who wants it. It's 100% been C and C#.
You shouldn't hire them.  Any hire should be flexible enough to use a tool appropriate for the task and it isn't always Java.
 
The following users thanked this post: agehall

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26757
  • Country: nl
    • NCT Developments
Re: Java prevalence in industrial environments?
« Reply #9 on: September 21, 2017, 04:06:38 pm »
I've been going back and forth with a new software engineering hire. He's wanting to move everything to Java claiming it's what everyone uses and is the most used in industrial environments. I've yet to meet a customer who wants it. It's 100% been C and C#.

I would find it really surprising for a piece of software for an industrial automation project to be written in Java. Is this really the case?
I'd look at your customers and see what fits their needs. C/C++/C# seem much easier to me to deploy because you can create a single installer blob which doesn't depend on a third party runtime (the Java runtime can be upgraded and cause all kinds of breakage). I would be very carefull with changing directions because a lot of programmers are completely clueless when it comes to deploying software. Many assume customers have the latest version of the OS, that there are no conflicting libraries and every customer has a genius IT guy around. Another question you might want to ask yourself is whether you ever need Linux or Mac support for your software. In that case C# is absolutely the worse choice and C++ (combined with a cross-platform framework like Qt or WxWidgets) might be the best one.

Besides that there are many similar languages like Java such as Python.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23018
  • Country: gb
Re: Java prevalence in industrial environments?
« Reply #10 on: September 21, 2017, 04:39:36 pm »
You can do that with a JRE as well. You just bundle it with your application. JRE + SWT + install4j will cover all three major platforms. I've seen this automated. Someone makes a code change, integration and build done and out pops an rpm, a dmg and an msi package.

As for client facing applications though, I'd probably ship Electron now: https://electron.atom.io

Whatever you do stay away from Windows Installer. That shit eating demon and me do regular battles.

The thing with Java is (a) it's actually pretty good in most locations (b) if you can use it in most locations it makes people's skills fungible which is good (c) it's perfectly fine for *everything* other than hard real time systems as tgzzz says but even then some of the embedded JVM and cross compiled Java products are actually pretty good believe it or not (d) there are a lot of mature frameworks out there that make it very easy and reduce the time to market.

As for real time, redundancy, latency control etc, look at akka.io.

Getting a product written in C off the ground is monumentally difficult now. I wouldn't start another product in it now.

Getting a product written in C# off the ground is a monumentally stupid decision at the moment as the platform is going through a transition phase between "corporate Microsoft" and "happy shiny open source Microsoft" but the ship has sailed and the house of cards is falling on the last half.
« Last Edit: September 21, 2017, 04:41:46 pm by bd139 »
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Java prevalence in industrial environments?
« Reply #11 on: September 21, 2017, 05:20:40 pm »
I honestly can't say what's hot in industrial right now (except for CAN)... But...

I can promise you if anyone came to me suggesting we move to JAVA for anything but maintaining an existing system I'd probably fire them. If you can't see the writing on the wall by now, IDK what to tell you.
 
The following users thanked this post: agehall

Online Jeroen3

  • Super Contributor
  • ***
  • Posts: 4068
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Java prevalence in industrial environments?
« Reply #12 on: September 21, 2017, 05:44:13 pm »
If you can't see the writing on the wall by now, IDK what to tell you.
You're no Oracle that's for sure.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6694
  • Country: nl
Re: Java prevalence in industrial environments?
« Reply #13 on: September 21, 2017, 06:00:10 pm »
Besides that there are many similar languages like Java such as Python.
I fail to see much similarity.

I see more similarity with Electron, complete environment including a default cross platform GUI, often inefficient, large pool of developers. Hell you can (and should) even use static typing with it now because of the Typescript API definitions.
 

Offline hendorog

  • Super Contributor
  • ***
  • Posts: 1617
  • Country: nz
Re: Java prevalence in industrial environments?
« Reply #14 on: September 21, 2017, 07:07:49 pm »
... it's got lots of mature libraries and tools, particularly free debugging and profiling tools! Stuff tends to work and work well even if it is slightly horrible getting it there sometimes.

This ^

There is just so much mature and well written stuff around now for java that you can nearly always find a good library to do what you need. The hard part is actually picking the libraries and frameworks as there are so many. If you don't like the language there is always Scala. I'm learning that and while it is hard, it removes the ugly from Java quite nicely.

 

Offline f5r5e5d

  • Frequent Contributor
  • **
  • Posts: 349
Re: Java prevalence in industrial environments?
« Reply #15 on: September 21, 2017, 07:16:03 pm »
https://www.springer.com/us/book/9781441981578 doesn't sound like its really mature yet - perhaps some applications would be OK
 

Offline hendorog

  • Super Contributor
  • ***
  • Posts: 1617
  • Country: nz
Re: Java prevalence in industrial environments?
« Reply #16 on: September 21, 2017, 07:39:38 pm »
https://www.springer.com/us/book/9781441981578 doesn't sound like its really mature yet - perhaps some applications would be OK

I'd be interested to know if anyone is using Java for hard real-time stuff?
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23018
  • Country: gb
 

Online Jeroen3

  • Super Contributor
  • ***
  • Posts: 4068
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Java prevalence in industrial environments?
« Reply #18 on: September 21, 2017, 08:22:36 pm »
I think the fact that java is still "big" is because google chose (and modified) it for Android.

I know a few PLC's that have their HMI written in java. With the idea being that you can buy their fancy expensive touch panel, or your PC/phone.
Fast forward to today, running the jre in a browser on regular workstations is almost completely impossible today. Turned out that the jre was not very secure despite being advertised that way.
Running a normal java application on your pc is slow as hell. Even the well made ones.

I'd say go with something else. What? I don't know, that depends on your target audience and how much maintenance you're willing to spend later on.
Don't overspend on aesthetics if it's for industrial though. You're selling functionality and productivity, not fancy and shiny.
 

Online JPortici

  • Super Contributor
  • ***
  • Posts: 3452
  • Country: it
Re: Java prevalence in industrial environments?
« Reply #19 on: September 21, 2017, 08:34:20 pm »
Getting a product written in C# off the ground is a monumentally stupid decision at the moment as the platform is going through a transition phase between "corporate Microsoft" and "happy shiny open source Microsoft" but the ship has sailed and the house of cards is falling on the last half.

i don't know anything about the subject. Well, all i know is that the guys doing apps for us use Xamarin and C# to make multiplatform apps, apparently it's good enought for that.
Anyway, i aways read of people saying that using this or that language is a bad idea, but rarely suggest an alternative. what would you all use then?
 

Offline hendorog

  • Super Contributor
  • ***
  • Posts: 1617
  • Country: nz
Re: Java prevalence in industrial environments?
« Reply #20 on: September 21, 2017, 08:43:32 pm »
I think the fact that java is still "big" is because google chose (and modified) it for Android.

Fast forward to today, running the jre in a browser on regular workstations is almost completely impossible today. Turned out that the jre was not very secure despite being advertised that way.

The running java in a web browser thing has been a bad (dumb) idea for at least 10 years, probably more. Why people continued to write software that way is beyond me. That is not how java _should_ have been used in the real world and never has been.

Unfortunately non-tech's get confused and think that because java in the browser is bad, then java is bad, oh and javascript is also bad cos of the name...

Java webstart suffered too. It was quite useful back in the day for delivering applications which run locally but can update themselves on demand.

Java is huge in corporates. It's the new COBOL. I doubt Android has that much impact on it's popularity to be honest.

 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23018
  • Country: gb
Re: Java prevalence in industrial environments?
« Reply #21 on: September 21, 2017, 09:00:28 pm »
Running it in the browser was a bad idea to start with. There was a lot of hoo har about this when applets first dropped.

Getting a product written in C# off the ground is a monumentally stupid decision at the moment as the platform is going through a transition phase between "corporate Microsoft" and "happy shiny open source Microsoft" but the ship has sailed and the house of cards is falling on the last half.

i don't know anything about the subject. Well, all i know is that the guys doing apps for us use Xamarin and C# to make multiplatform apps, apparently it's good enought for that.
Anyway, i aways read of people saying that using this or that language is a bad idea, but rarely suggest an alternative. what would you all use then?

Give it a few years when MSFT dump it, like they did with: WS-*, WWF, WCF, ClickOnce, AppFabric, Velocity, EF3, Silverlight, Lightswitch etc. The lifecycle is:

1. Market the fuck out of something they are going to do on blogs.
2. Buy in a 3rd party product or chop out a broken CTP
3. Market the fuck out of that saying it'll be fixed soon.
4. Do some turd polish, say it's RTM and dump it on the market.
5. Everyone integrates it.
6. About 6 months in everyone realises it's a pile of crap or MSFT's direction changes like the schizophrenic nightmare that it is.
7. Dumped instantly.
8. EOL'ed and not supported, still quality issues.

Xamarin is exactly the sort of product they will shit on in the future because it's part of their completely failing mobile first cloud first strategy. They screwed a whole mobile platform into the ground with the above (windows phone), they have a cloud platform which is plainly unreliable (azure) and amazon is eating them for lunch, they're trying to gain market share on O365 but large companies are exiting all the time and migrating to GA. They are even facing competition on the second hand market because people would rather buy a second hand device offered by Apple now than a new MSFT device in the consumer sector. Then there's the subscription and enterprise shafting that is turning everyone to Linux on the server and MacOS on the desktop.

Their last ditch is to try and bring up their dev tools cross platform but they're not delivering quality, just version increments. They're like a drunken cat trying not to fall down the toilet.

Would you build a business on the above? Nope.

Electron / Qt / WxWindows / Java+SWT / native apps per platform is the way to go. Something that insulates you from any specific platform volatility.
 

Online wraper

  • Supporter
  • ****
  • Posts: 16803
  • Country: lv
Re: Java prevalence in industrial environments?
« Reply #22 on: September 21, 2017, 09:02:37 pm »
The running java in a web browser thing has been a bad (dumb) idea for at least 10 years, probably more. Why people continued to write software that way is beyond me. That is not how java _should_ have been used in the real world and never has been.
Yep, I run away from it like a plague. The only virus I got in my PC in last 15 years was because of java with it's endless security vulnerabilities, and it was the latest version of java at that time. I hate that keysight chosen this piece of malware for web interface of their new multimeters  :palm:.
http://www.zdnet.com/article/oracle-drops-massive-patch-update-which-fixes-299-vulnerabilities/  :palm: |O
« Last Edit: September 21, 2017, 09:07:18 pm by wraper »
 

Offline mib

  • Contributor
  • Posts: 14
Re: Java prevalence in industrial environments?
« Reply #23 on: September 21, 2017, 09:07:33 pm »
I think the fact that java is still "big" is because google chose (and modified) it for Android.

Google took the complete clusterfuck that was java for mobile and made something usable out of it. Sun totally failed to properly capitalise on java. Oracle have just continued that trend and then some. Java is still relevant, but only for some applications. There's a massive amount of server side stuff that will be java for the foreseeable future. There's also a surprising amount of real time and safety critical code out there - I've even written some of it. Java no longer really has much of a place on desktops though. And anyone still using java applets should be hung, drawn, quartered, revived, shot, revived again and forced to spend the rest of their lives teaching at a coding bootcamp. Applets just never got the security right and won't be given the opportunity to get it right.

To the OP. A new employee coming along saying you need to throw away everything and start again in a new language? Yes, you do need to start again, at the beginning of the recruitment process. NIH is a never ending problem and the only solution is experience. If you have something that works, then don't break it. If you can't find people to maintain your existing code base, you're not offering appropriate salaries.

If, however, you are looking to start again, then python on the device with web/javascript based cloudy bs frontends seems to be the popular choice right now.

I've done a lot of system level software support for industrial control devices over the last few years and that's what they all ask for. Usually they start off asking for 'something like a raspberry pi' but eventually settle on one of the more easily customisable ARM systems. Usually a fairly capable system so they can run a full linux with python, SQL, web server, etc, etc. There is a common trend away from MS technology on devices, but sticking with things that 'developers' can do on their windows PCs with no linux knowledge. Python combined with the various web technologies seems to fit that bill quite well.
« Last Edit: September 21, 2017, 09:09:47 pm by mib »
 
The following users thanked this post: wraper

Offline hendorog

  • Super Contributor
  • ***
  • Posts: 1617
  • Country: nz
Re: Java prevalence in industrial environments?
« Reply #24 on: September 21, 2017, 09:13:54 pm »
The running java in a web browser thing has been a bad (dumb) idea for at least 10 years, probably more. Why people continued to write software that way is beyond me. That is not how java _should_ have been used in the real world and never has been.
Yep, I run away from it like a plague. The only virus I got in my PC in last 15 years was because of java with it's endless security vulnerabilities. I hate that keysight chosen this piece of malware for web interface of their new multimeters  :palm:.

Wow are Keysight really doing that? Crazy...

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf