4 ms·
> If you write code that doesn't need to be touched over a 28 year period, chances are that code has produced more value (ROI) than 99% of the code that is writ
by skohan 4y ago
> If you write code that doesn't need to be touched over a 28 year period, chances are that code has produced more value (ROI) than 99% of the code that is written every day will ever do. Even 10 years is pretty good.
Just because it's been in use for a long time doesn't mean it's any good. It only means it's good enough that they can keep enough clients to stay in business. And when it comes to logistics, a lot of times the quality of the tech integration is way down the list in terms of decision factors, like price or the ability to handle some special needs you might have.
We have plenty of problems with this system, some of which require our ops people to get on the phone and for instance find out why the number of orders they see in weekly reports don't perfectly match the reporting we have through the EDI.
> Sending XML, CSV or JSON files over sftp is a simple and relatively robust for exchanging data, especially when a latency of minutes to hours is acceptable and the data volumes are non-trivial.
It's fine as a data transfer protocol, but it's terrible as a real-time communication interface. Yes you can use sftp to exchange messages, but if we want to send an order out and give the customer confirmation as soon as possible that it's been confirmed, REST is the right tool for that job and sftp is a square peg that's been trimmed down to fit inside a round hole.
Using REST to solve a problem like this is not about being "fashionable", it's simply about using the right tool for the job. We're not talking about GraphQL and protocol buffers, REST is an old and extremely well-tested approach to web services, and has won because it's so well fit to the problem it solves.
And there's a huge benefit to standardizing web service interfaces. It means that any 3rd party you work with already knows how to talk to your system, and can just focus on which data has to be passed back and fourth. You don't have to teach your clients how to communicate with you via some arcane in-house protocol which has weird corners you only find out about once you start to work with it, like the system breaks if the documents come in the wrong order or something.
By not offering the modern standard, these kinds of businesses make it slower and more expensive for clients to work with them. If I am trying to get a product to market, give me a REST API and I can have warehouse integrated in a week or two. With some proprietary protocol who knows how long it is going to take.
This system is also solvable without a rewrite. If your system is so complicated and arcane that it's impossible to re-write it, just wrap it in a REST service. Your REST service can talk to sftp or whatever crazy system you want to come up with. But there is zero benefit to deviating from the standard from the client's perspective.
- trashtester 4y ago> Just because it's been in use for a long time doesn't mean it's any good. Not conclusively, but I would argue that on average, code that is still in production after 28 years is going to provide a higher ROI over its lifetime than code written yesterday. In other words, the age of the code doesn't prove conclusively that it is either good or bad, but higher age is an INDICATION (as in correlation) of higher quality (at least for the time it was written). > We have plenty of problems with this system, Had you argued based on this, instead of the age, I would not have objected. > It's fine as a data transfer protocol, but it's terrible as a real-time communication interface. Again, had you specified that ftp/sftp was used for real time communication, I would not have objected. (It would have been fine for the 90's though, and might still be in use if it was completely stable.)
- hansvm 4y ago> Again, had you specified that ftp/sftp was used for real time communication, I would not have objected. (It would have been fine for the 90's though, and might still be in use if it was completely stable.) Hahaha, I've seen enough of that sort of stuff that I immediately assumed the reason they objected wasn't the tech but because it was being grossly misused, kind of like trying to build a distributed lock-like-thing on top of S3 or any of a number of other sorts of atrocities you might see with more modern tech.