3

Multi-tier and/or ditstributed apps, do they have the same meaning ?

When we talk about layers in these apps, is it physical layers (database, browser, web server,...) or logical layers (data access layer, business layer,...) ?

mohamida
  • 804
  • 2
  • 11
  • 25

3 Answers3

7

Maybe these two sentences do convey intuitively the distinction between distributed and multi-tier:

  • Distributed: You replicate the processing amongst nodes
  • Multi-tier: You split the processing amongst tiers

In one case, the same processing is replicated over several nodes. In the other case, each tier has a distinct responsibility and the processing running on each tier differ.

Both notions are not exclusive: you can have non-distributed multi-tier apps (if there is no form of redundancy/replication), distributed apps which are not multi-tier, but also multi-tier apps which are distributed (if they have some form of redundancy).

There would be a lot more to say about the distinction, but the difference (to me) is essentially there.

ewernli
  • 38,045
  • 5
  • 92
  • 123
  • So distributed is like load-balancing ? – mohamida Aug 24 '10 at 08:00
  • Isin't like what said Eugene Mayevski 'Eldos and what's said in wiki that "a program is divided into multiple tasks, and each of them is run on different machine ? – mohamida Aug 24 '10 at 08:18
  • @mohamida I'm not sure I get your comment. What is not clear? Also, there won't be a hard line between the two concepts. But tiers is used more frequently to speak of enterprise apps, while distributed systems is more related to things like search engine, distributed database, fault-tolerance. – ewernli Aug 24 '10 at 11:28
  • I think the definition you gave about distributed sounds like the definition of load-balancing ? isin't ? Because the definition given in wiki says something like "distributed app is divided into multiple tasks, and each of them is run on different machine" but you said that "distributed app is replicated on different machine" – mohamida Aug 24 '10 at 12:26
  • @mohamida Ok, so I would say that horizontal scalability with replication and load balancing (usually in a stateless architecture) is one type of distributed system. But the term distributed system is more general than that. A bit more clear? – ewernli Aug 24 '10 at 13:42
  • So, having the same app in different machines, or having the different tasks of an app in different machines is called distributerd app ? (and sorry, can u plz answer the other question (physical/logical layers..)) – mohamida Aug 25 '10 at 10:49
1

ewernli has the mostly correct answer here. The only missing piece from the original question concerns physical and logical layers.

From a distributed and/or multi-tier perspective whether the layers are physically separate or just logically so is immaterial. Meaning, it doesn't matter. You can create multi-tier and even distributed applications which resides entirely on the same machine instance.

That said, it is more common to separate the tiers into different machines built specifically for that type of load. For example, a web server and a database server. Or even a web server, several web services machines, and one or more database servers.

All of these features, distributed, multi-tier, and/or load balanced with logical and/or physical layers are just features of the application design.

Further, in today's world of virtual machines, it's entirely possible (and even likely) to set up a multi-tier, distributed, and load balanced application within the confines of a single real machine. Although, I'd never recommend that course of action because the point of load balancing and distributed services is usually to increase availability or throughput.

Community
  • 1
  • 1
NotMe
  • 87,343
  • 27
  • 171
  • 245
  • And if many tasks are run by different processors in the same machine, do we talk here about Distributed app ? – mohamida Aug 24 '10 at 08:19
  • @mohamida: only if it is actually separate identical processes running. If a single process is using multiple threads to process the data then it's simply a multi-threaded app. – NotMe Aug 25 '10 at 15:38
0

Multi-tier means that your application will be based on multiple machines with different tasks (Database, Web application, ...). Distributed means that your application will run in multiple machines a the same time, for example your website could be hosted on 3 different servers.

For multi-tier applications we speak generally about physical layer. But in every application you can/should have different logical layers.

Colin Hebert
  • 91,525
  • 15
  • 160
  • 151
  • But you can have all your application in the same one machine, then here we talk about logical layer and not physical. And your definition of distributed application isin't the same as "duplication" because you said tha the same app is runnig on different machines ? – mohamida Aug 22 '10 at 19:04
  • To be more precise the distributed application will be only one application launched on several machines. Every machine will work with each other to have a balanced application. Whenever a machine is down other take relay. Or for example with a website, if a million of requests come, each server will handle a part of theses requests to avoid the overloading of only one machine. – Colin Hebert Aug 22 '10 at 21:36
  • I think you're are talking here about "load-balancing", and not distributed apps. I think that distributed is that One application is divided into many small apps, and those apps are spread in different machines, and each small app is doing some specific work. – mohamida Aug 23 '10 at 08:50
  • I think that load-balancing is one of the perks of distributed apps, but there is more, better performances, shared memory, ... – Colin Hebert Aug 23 '10 at 08:58
  • @Colin: better performance isn't a feature of distributed apps. A distributed app might handle larger amounts of traffic but still perform worse on a per transaction basis than a non-distributed application. – NotMe Aug 23 '10 at 17:59
  • @Chris Lively, when you try to solve a problem distributed computing will help you to solve it faster if the task takes a lot of time, this same task will take less time if it's distributed, it's also called grid computing. – Colin Hebert Aug 23 '10 at 18:15