News for hackers. Stuff that matters.
Re:Western civilization runs on the mainframe by yummyfajitas on Monday August 02, 2010 @10:41AM (#1567743)
Obviously there is a business use case for mainframes, these can't all be legacy systems. But what is it? Can someone who has worked with such a system shed some light?
Re:Western civilization runs on the mainframe by Kadin on Monday August 02, 2010 @11:12AM (#1567834)
They're powerful, reliable, and compared to writing software for an equally-sized cluster or distributed system, (once you're in the right mindset) easy to write for. Or alternately, not to write for -- you can just keep migrating the same ancient COBOL up to newer systems, without ever changing it, and the stuff just keeps ticking.

The business case is that they work, and have a great track record.

Overall the biggest selling point that I've seen is probably reliability. There's a perception that mainframes are more reliable than commodity-parts systems. In truth I think this is confirmation and sample bias; if you run a business that has a mainframe (very expensive, built for reliability, software has had 20+ years of debugging) and a bunch of servers (inexpensive, cost-optimized, software is constant work-in-progress), it's always going to seem as though the mainframe is unbreakable and everything else is dangerously unreliable. It's as much a mindset issue as an architectural one.

So many businesses will pay the premium for mainframes as their "core" systems, and then hang a lot of commodity systems off of it to provide access or interaction with the mainframe data.

Re:Western civilization runs on the mainframe by thaumaturgy on Monday August 02, 2010 @11:26AM (#1567866)
You're exactly right.

I worked on a mainframe for a major Bay Area school district during and shortly after high school, as a computer operator and COBOL programmer.

I was there for a couple of years; rebooting the mainframe was unheard-of. It never seemed to develop memory leaks, it didn't get more quirky after it had been running for a long time. Since it wasn't accessible to the internet (or even most of the network), it didn't need to have any time spent on it trying to secure it against the latest Windows bug. It never required software updates, other than the ones that we coded ourselves and deployed without having to reboot anything. The database didn't fall over when we ran a payroll job or report cards.

But, best of all -- and I love telling this story, because I think it really illustrates something that the techs using all the modern stuff just don't "get" -- it had the best recovery systems I have ever seen, hands down.

So, one day there was a power outage. We had backup power systems, but like a lot of data processing departments we were just a couple of overworked people and they hadn't been checked in a while. They didn't last as long as we were expecting and the mainframe kicks off. Around that time, I'd been playing around with Linux and such, and I had some idea of just how ugly things got when a complex operating system powered off in the middle of doing things.

I was a little bit stressed out. The other guy, a clean-shaven greybeard, wasn't.

When the power came back on, the mainframe booted up -- quickly -- and resumed its operations from pretty much the exact point at which the power had gone out. It didn't miss a beat, none of the data it produced was erroneous.

That was in '98 or thereabouts.

To say that mainframes are more reliable than the popular alternatives is an understatement. :-)

Re:Western civilization runs on the mainframe by JunkDNA on Monday August 02, 2010 @12:19PM (#1568036)
This is interesting. Clearly it's not just the hardware that makes mainframes this fault-tolerant. I'm curious why other platforms haven't appropriated some of the core features and functionality of the mainframe machines? Is it lack of familiarity? Patents? I'd love for one of my database machines to be this reliable.
Re:Western civilization runs on the mainframe by jff on Monday August 02, 2010 @01:02PM (#1568182)
I think there's probably a few factors involved:

1. Writing completely solid, fully debugged software is Not Sexy, which is why Linux is getting shinier and shinier but the software still has bugs.

2. You and I have probably been spoiled by working with Unix. Now, I've never used an IBM mainframe, but I have used VMS, which is definitely more businesslike than Unix. Working with VMS feels like going to the DMV. Imagine how it would feel to be living in a mainframe world, right out of IBM's most conservative, straight-laced era--because I'm gonna bet you wouldn't be able to play as fast and loose if you had mainframe-style fault tolerance.

Re:Western civilization runs on the mainframe by wmf on Monday August 02, 2010 @12:05PM (#1567986)
They're powerful, reliable, and compared to writing software for an equally-sized cluster or distributed system, easy to write for.

Of course a big SMP such as System p has the same advantages (plus the greater familiarity of Unix), so in my mind the question stands. Why mainframes?

Re:Western civilization runs on the mainframe by maigret on Monday August 02, 2010 @12:33PM (#1568082)
Right, but big System p also plays in a similar class price than a mainframe with Linux. You get similar functionality on an easier platform (Unix), but the architecture and middleware functionalities are similar.
Re:Western civilization runs on the mainframe by gaius on Monday August 02, 2010 @11:03AM (#1567797)
1) If you need to do a lot of relatively simple things bloody quickly. There's nothing in the Unix world that can match the TPS of a mainframe. "Eventually consistent" just doesn't cut it for credit card auths.

That is the real difference between mainframes and supercomputers. A supercomputer is about computation, a mainframe is about I/O.

2) Extreme reliability. There are mainframe clusters in production with a continual service availability for decades. Again, nothing in the Unix world can touch this.

Re:Western civilization runs on the mainframe by rbranson on Monday August 02, 2010 @02:05PM (#1568437)
1) I refuse to believe banks and insurance companies have I/O that can't be satiated by commodity hardware. InfiniBand QDR can transfer 40Gbit/sec with 1µsec latency. That's easily 200,000 synchronous round-trip messages per second PER link. If you can deal with higher latency, those can be aggregated and you can easily exchange tens of millions per second. Let's take this one step further: ECNs and automated trading systems. Their latency and I/O requirements make banks look like amateurs, yet they almost entirely run on off-the-shelf hardware and systems. Billions are at stake in these systems.

2) When was the last time Google or Amazon or NASDAQ or Arca was actually out of service because of hardware failure or maintenance?

Re:Western civilization runs on the mainframe by gaius on Monday August 02, 2010 @02:42PM (#1568562)
You have to compare like with like. A tickstream is more like writing to an in-memory ring buffer than it is to a database. Or a tick is like a UDP packet compared to an X400 email. Even the ECNs run their backoffices on mainframes.

I would be willing to bet that Amazon do their warehouse and logistics operations on a mainframe too.

Re:Western civilization runs on the mainframe by rbranson on Monday August 02, 2010 @04:46PM (#1569002)
ECNs do trade matching, which is very similar to bank transactions in that it requires synchronized, transactional processing. You've got huge lists of bids and asks that are matched as quickly as possible. I know engineers who work(ed) on Archipelago, now known as NYSE Arca. It's UNIX-based, first Sun and now Linux. There are no mainframes at all. These aren't particularly impressive boxes or a ton of them either. The software is fast and well architected.

NYSE also apparently unplugged their last mainframe in 2008[1]. It appears NASDAQ OMX's INET trading platform is based on x86-64/Linux/Oracle stack on commodity hardware[2]. NASDAQ's US exchange has a record of 194,205 orders per second[3]. The latest VisaNet peak message rate I could find was from 2008 and was 8,442 transactions per second[4]. Based on the fact that Visa aggregates transactions over hundreds of major banks, I would guess that each individual bank processes less credit card transactions. Visa's 2009 volume was 9.0 billion transactions[5]. I couldn't find anything substantial on NASDAQ's stock market order volume, but NASDAQ does about 10 billion contracts/year JUST in US & European option derivatives[6].

[1] http://searchdatacenter.techtarget.com/news/article/0,289142...

[2] http://www.nasdaqomx.com/digitalAssets/66/66992_genium_inet....

[3] http://www.nasdaqomxtrader.com/trader.aspx?id=inet

[4] http://investor.visa.com/phoenix.zhtml?c=215693&p=irol-n...

[5] http://www.creditcards.com/credit-card-news/credit-card-indu...

[6] http://www.nasdaq.com/aspx/company-news-story.aspx?storyid=2...

Re:Western civilization runs on the mainframe by d2viant on Monday August 02, 2010 @03:54PM (#1568821)
Amazon did run a mainframe briefly, but apparently it didn't last more than a year.

http://blog.seattletimes.nwsource.com/brierdudley/2008/05/am...

Re:Western civilization runs on the mainframe by mmt on Monday August 02, 2010 @09:35PM (#1569773)
Amazon is beyond enterprise scale, it's Web scale.

This stark distinction in order of magnitude of scale is why there may be so much incredulity here as to the technical superiority of mainframes.

Re:Western civilization runs on the mainframe by ximeng on Monday August 02, 2010 @07:11PM (#1569460)
LSE went down last year if that helps for (2):

http://blogs.computerworld.com/14876/london_stock_exchange_d...

Re:Western civilization runs on the mainframe by gxti on Monday August 02, 2010 @11:09AM (#1567822)
I haven't worked with mainframes, and I frequently chortle every time someone mentions one even though deep down I know the article is right. But still, lack of experience has never stopped me from making stuff up before, so:

I imagine that the primary reason companies buy mainframes is that their monolithic architecture abstracts away a lot of the hard thinking that goes into a clustered system by putting it all in one chassis. If my 2000 CPUs are on separate machines then I have to write code to coordinate them and move data between them. If there's a super-fast bus connecting them and they can work with shared address space and let the OS deal with scheduling and data flow then even the average corporate code monkey can write naive large-scale apps that run a little slower but get the job done well enough to please their corporate overlords. And maybe the cost of developing a "proper" architecture for these sorts of business jobs is too high compared to the cost of a few hundred thousand in rent-a-mainframes.

Re:Western civilization runs on the mainframe by pedanticfreak on Monday August 02, 2010 @10:24PM (#1569881)
I have not worked on mainframes per se. But I was once tasked with investigating why a particular project to replace a mainframe process with a modern Java one failed.

Basically, the mainframe is FAST. Everything is simple there. The process in question was more or less a COBOL stored procedure doing a bunch of lookups in an incredibly denormalized DB2 database. The entire batch job would take less than 15 minutes on the mainframe of which this particular process was only a small fraction.

Now, the Java app to replace the mainframe process was apparently written by some smart dudes that had gone on to make lots of cash doing more exciting things by the time I got there. The replacement system was what lots of naive people drinking the Hibernate Kool-Aide were writing back then. The database was normalized to the extreme, it had a hierarchical object model that was mapped to objects with Hibernate, had a slick web interface, and so on. Well it ran like balls. It got exponentially slower as data was added. The administrative interface took 30 minutes to save a setting. This new process would increase the runtime of the overall batch by an estimated 10 hours. So I looked at it, and with another guy cleaned up a bunch of bad SQL and Hibernate.

The administrative interface got shaved down to seconds for a post. But in the end the overhead alone of marshaling and unmarshaling XML for the service calls was enough to push the batch process a full two hours longer than the mainframe one. Which, by the way, was unacceptably long for the 1 hour maximum processing window allotted to the batch.

OK, I know what you're saying. That's when you bring in the cloud and run a bunch of parallel instances and such and such. Or dump XML and use some kind of raw binary message format. But shit. The mainframe already did all that with a single threaded COBOL stored procedure in under 15 minutes. Needless to say, today they're still using that same old COBOL stored procedure and they're still making money hand over fist.

So yeah. Big companies spend lots of money trying to get off the mainframe every year. Believe me, I have personally witnessed tens of millions of USD lost to failed mainframe replacement projects by developers who think they know better. It's not like some manager looked at the the estimate and said "hell no." Actually they said, "Hell yes! My top architects say the mainframe is dead. I will write a check for $50 million dollars right now because that is nothing compared to the $10 billion in revenue we make." It's just not as easy as it looks.

Re:Western civilization runs on the mainframe by thibaut_barrere on Monday August 02, 2010 @11:10AM (#1567826)
I've seen these for at least:

- payment processing

- mail order sending (retail market)

- insurance databases

All on fairly large (world-sized) markets. Never programmed these myself, but had to interface (file or api) with it.

My feeling is that high reliability / data throughput is favored over programmer productivity and data structure elegance (most data I've seen there was fixed width strings :-).

See Host Integration Server (http://www.microsoft.com/biztalk/en/us/host-integration.aspx) for an example of product that allows to use .Net (I guess, even IronRuby) to talk to a mainframe.

Re:Western civilization runs on the mainframe by astine on Monday August 02, 2010 @01:09PM (#1568212)
One major advantage of a mainframe vs commodity built clusters with similar capacity is internal bandwidth. With clusters, you are limited by your network speed. A high end ethernet based network is about 10Gbit, and you can reach higher with specialty hardware like Infiniband, but then you're no longer using commodity components. Within a mainframe your interprocess bandwidth is limited only by your bus speed. Problems that things like memcached are meant to solve are no longer a concern.
Re:Western civilization runs on the mainframe by wmf on Monday August 02, 2010 @02:01PM (#1568424)
Within a mainframe your interprocess bandwidth is limited only by your bus speed.

You're ignoring System p, Superdome, Altix, Beckton, etc. which are also big SMPs but are significantly cheaper and easier to use than mainframes.

Re:Western civilization runs on the mainframe by rbranson on Monday August 02, 2010 @01:26PM (#1568274)
How is Infiniband not commodity? It's not GbE cheap, but it's also a lot lower latency and 20x-40x the bandwidth. Infiniband is about $250-$500 per port, which is around what 10GbE costs right now.
Re:Western civilization runs on the mainframe by mmt on Monday August 02, 2010 @09:53PM (#1569811)
I had been dismisising Infiniband out of hand for a few years now, assuming it remained too uncompetitively[1] expensive, much as 10GE has.

However, 2-4x the bandwidth (and lower latency) than 10GE, for the same price, could make it compelling. Does the price you quote include all of host adapters, cables, and switch ports?

How is Infiniband not commodity?

How many suppliers are there for the critical components? There may be more than one vendor for adapters, but if they all use the same HBA-on-a-chip, the market hasn't yet been commoditized.

[1] Since my POV is centered around disk I/O, it would compete against SAS. Per 8-lane bundle, it's 24x the bandwidth at about $400 at the host and $100 at the expander, as of the previous generation. The current generation doubles the bandwidth, though I don't have reliable "street" prices yet.