IMHO: Going Native in a Distributed World

Commentary
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Today, there’s a prevailing philosophy on distributed systems design (and more and more, on all software development) that goes as follows: Everything must be Write Once, Run Anywhere (WORA). Therefore, all database access must be through SQL. So native AS/400 I/O is forbidden.

On the surface, this philosophy has merit. It indicates a trend toward simplification; everything is written in a common language with a common style, maybe even a common toolset—sort of a Grand Unified Theory of Development. However, looks can be deceiving. Forcing commonality can bring forth the deadly specter of the lowest common denominator, in which the natural advantages of a given approach are lost in the struggle to achieve sameness.

Still, you might argue, regardless of the AS/400’s incredibly robust and powerful native I/O mechanisms, the conclusions speak for themselves. Well, conclusions stem from proper assumptions; if one assumption falls, the entire theory falls with it. In this case, the first assumption is the one that falls. Let me explain.

WORA as a purely academic goal is a wonderful ideal. The fewer programming models your staff needs to learn, the better. The easier it is to move from platform to platform, the better. So, by itself, WORA is a good thing. But, like other decisions, the decision to move to WORA must be balanced against other factors.

One of those factors is performance. On the AS/400, SQL cannot match native I/O in performance. In some cases—most notably in online transaction processing, the AS/400’s backbone—it’s not even close. SQL’s set-based design does not lend itself to the test-and-decide style of navigation that is basic to most transaction processing. When data can come from different files based on the contents of a field in a third file or, even worse, on the setting of some global system flag (facility-based planning in ERP, for example), SQL is not up to the task. Even SQL’s designers have recognized this; the next release (SQL3) will support a Java-like embedded language in its stored procedures. However, that means in order to use SQL3 (at least the advanced features), programmers will have to learn object-oriented programming (OOP)! Even then, I doubt that SQL’s performance will measure up.

So there’s platform independence on the one hand and performance on the other. How do you balance these opposing forces? Well, rather than make a blanket statement that one is better than the other, you need to look at the business issues for each situation. I can easily break the discussion into two completely separate cases: clients and servers.

In these days of Internet (or intranet) accessibility, programs that run on any client are almost required. Because the server has no idea what type of client might connect, the client program needs platform independence. Windows, Macintosh, even Linux machines may be attaching; clearly WORA is important. And because today’s workstations are limited more by bandwidth than by CPU cycles, a little performance penalty is probably a reasonable tradeoff. Besides, SQL works well for queries, and servers, not workstations, should be doing transactional I/O anyway.

And it’s not so bad if your server software is platform-specific. Unless you are considering moving your server-side applications to a different platform, there’s probably no need for platform independence. However, your server probably is where performance bottlenecks are most pronounced and most noticeable. Unless your server software is intended to run on multiple platforms, native I/O on the AS/400 makes good business sense.

One more argument against a blind move to SQL: By using OOP techniques, it is possible to have the best of both worlds. Your business entities can be designed so that they recognize where they are deployed and take advantage of the unique characteristics of the server platform. This requires some additional programming (and some parallel development), but in multiple-platform server environments, the performance enhancement may be worth the development costs.

As with most things, there is no universal panacea when it comes to distributed program design. The surest route to a successful business solution requires making tough business decisions. I hope this article makes those decisions a little easier.

Joe Pluta

Joe Pluta is the founder and chief architect of Pluta Brothers Design, Inc. He has been extending the IBM midrange since the days of the IBM System/3. Joe uses WebSphere extensively, especially as the base for PSC/400, the only product that can move your legacy systems to the Web using simple green-screen commands. He has written several books, including Developing Web 2.0 Applications with EGL for IBM i, E-Deployment: The Fastest Path to the Web, Eclipse: Step by Step, and WDSC: Step by Step. Joe performs onsite mentoring and speaks at user groups around the country. You can reach him at This email address is being protected from spambots. You need JavaScript enabled to view it..


MC Press books written by Joe Pluta available now on the MC Press Bookstore.

Developing Web 2.0 Applications with EGL for IBM i Developing Web 2.0 Applications with EGL for IBM i
Joe Pluta introduces you to EGL Rich UI and IBM’s Rational Developer for the IBM i platform.
List Price $39.95

Now On Sale

WDSC: Step by Step WDSC: Step by Step
Discover incredibly powerful WDSC with this easy-to-understand yet thorough introduction.
List Price $74.95

Now On Sale

Eclipse: Step by Step Eclipse: Step by Step
Quickly get up to speed and productivity using Eclipse.
List Price $59.00

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: