top | item 37475417

(no title)

walnutclosefarm | 2 years ago

Well, that, and all those wonderful apps were inherently client-server architectures, with the business logic on the client. Nobody ever built a properly factored, with stateless layering, and high-end scalability on such an architecture. Just trying to keep 1000 clients in sync, so your business logic remained consistent could drive you to distraction; in a truly distributed product with tens or hundreds of thousands of clients, it was impossible.

discuss

order

mike_hearn|2 years ago

Nothing about two-tier architecture prevents you from keeping clients in sync, scaling up or implementing business logic.

Consider that scaling your database has to be done anyway. Your web app will bottleneck on the DB too. The only difference is number of connections assuming you keep them open (but there are multiplexers for that, and many business apps don't need them anyway, RAM is cheap enough).

With stored procedures you can implement whatever logic is needed for maintaining your data.

walnutclosefarm|2 years ago

Of course, if you want to twist VB, or Delphi, or any of the client-server construction sets into pretzels, you could build a well-factored system. And yes, your data has to scale to your system size, regardless of the architecture. But if you use any of those tools (the article was about VB, after all) as designed, you cannot escape the problems I outlined. Your business logic will be either entirely on-client, or split between the client and the database, and it won't be stateless. You will have database connections and transactions spanning thousands of client processes directly to the database, with all the scaling and contention problems that introduces. And you will have an update problem, because updating business logic requires you to push changes to thousands of client machines, which may or may not be available and updatable when you go to deploy your new version.

Can you still build a system, and operate it? Sure. A lot of us did. For small to medium scale systems, it was manageable. But there is a reason we abandond 2-tier client server 20 years ago. While it made building CRUDy business applications vastly easier for the developer, it was a systems nightmare.

(It also led to crappy user experience for any application that wasn't itself inherently a CRUD record keeping job, because it inhibited application designers from thinking of the application as anything other than CRUD. But that's a different argument for a different day).