What does the term Fallback mean?

Asked

Viewed 21,016 times

20

I’ve seen that term fallback used several times. Including framework that I use every day, the Laravel 5, that word appears in a certain configuration:

Example:

/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/

'locale' => 'pt_br',

/*
|--------------------------------------------------------------------------
| Application Fallback Locale
|--------------------------------------------------------------------------
|
| The fallback locale determines the locale to use when the current one
| is not available. You may change the value to correspond to any of
| the language folders that are provided through your application.
|
*/

'fallback_locale' => 'en',

From what I could understand in the example above, this word fallback is more or less in the sense of: "use this location if the other one is not available".

This is what I could understand by simply analyzing, but I searched the internet and I came to the conclusion that the term could be more comprehensive.

So I’d like to know:

  • What does term mean fallback in our "world of programming"? It is a standard value if another fails, or goes beyond that?

  • That word is related to rollback?

7 answers

22


According to Wikipedia is a contingency option, meaning something is used when its original option is not available for some reason.

This is a generic definition that serves computation well. Of course in each context it may have a more specific meaning, but it always has that basis. And it’s used in very diverse contexts (infrastructure in general, project management, software development, configurations, algorithms, data structures, tests, specific technologies, etc.), some are even in technology specifications.

The translation is just contingency or plan B.

It doesn’t have much secrecy, rules, nothing. It’s just having an option chosen automatically when the main is not present or available for some reason. Note that the unavailability can be momentary or even selected by some specific criteria according to the will of those who made the software, probably following some requirements.

That’s different than having an option default where you have a choice and only if you explicitly choose another option is to change the option. The fallback occurs automatically and the noun is the opposite of default, is what is not the standard.

Examples

An example is an execution environment that tries to use a native option, not having available it tries to emulate the execution (rendering of something, compilation, etc.).

There are cases that the term can be used for backup options, such as a database that goes into action when another fails, but this use is less common, and often the term used is backup.

There’s a lot of talk about fallback when using web technologies where a mechanism may not be available in a browser. It has up to marking to indicate contingency.

But it can be extended to any technology. It has use when multiple versions are available and one of them is preferred, but others can also meet.

Nor will I cite examples of hardware, networks, etc. because it is not our focus, but it is where it occurs very often to give more reliability.

Rollback

The only relationship is that the two end with back. This term is the action of going back, undoing what has been done and returning to its original state. Usually because of a failure, but it may only be by option.

15

Fallback (contingency, in free translation) is an option to be used if the preferred option is not available.

The role of fallback is to increase the reliability and availability of systems.

When it comes to software, it is a structuring scheme that allows the handling of program, data or process errors. Generally (but not exclusively) involves restoring data, status or continuation of execution. A few practical examples:

On the other hand, Rollback (or restoration) is one of the possible actions to be taken in the case of a fatal environmental error, given or status. It means restoring the state of your application to a previous, more stable and functional.

11

Fallback means "plan B" or emergency plan, that is if the configuration set by the programmer fails there will still be a default option that will take a valid value.

It has no correspondence with the term rollback.

6

The very description in English answers.

| The fallback locale determines the locale to use when the Current one | is not available. You may change the value to correspond to any of | the language folders that are provided through your application.

As described, it may happen that a custom setting is not possible, so "drops back" (fallback) to the default setting.

An example, when trying to get the language from the user’s browser and perhaps not being able to get the value, is made a fallback to the default setting.

4

Fallback is not, in general, a technical term in computer science. It is used according to its general meaning of "contingency" or "secondary alternative".

Rollback is a well-established technical term, especially in databases, when one has a transaction and in the end is made the commit or the rollback.

4

Fallback specifies which file to use if you try to access a file that is not stored.

Fallback is different from Rollback.

  • Rollback is a term used in the sense of restoring data to a condition that was previously saved, such as a backup store.

  • Fallback is already something more comprehensive as it is a term used to designate planning with the procedures necessary to restore a system back to operational condition.

0

A simpler example is when we set a value for some field, on your site for example, coming from an API and if it doesn’t exist, you can set a default. It is quite recurrent the term fallback and the use in programming.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.