levo

Big Data

Distributed Processing and Functional Programming

  • 3 things to know
  • Paper 2
Start revising · £5/month

Overview

Recall questions on distributing work across machines, immutable data, statelessness, higher-order functions, and why this style suits code that runs in many places at once.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

What is statelessness, and why does it matter for distributing work?

Key term

What is an immutable data structure, and why does it help across machines?

Key term

What is a higher-order function?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What has to change about processing once data no longer fits on a single server?

    Model answer

    The processing has to be distributed across more than one machine. Since no single server can hold the data, no single server can work through it either, so the dataset is divided into portions held on different machines and each machine processes the portion it holds. The results are then combined. This removes the single-machine limit, but it introduces the problem of writing code that stays correct while running in many places at once.

  2. 2

    What is distributed processing?

    Model answer

    It is carrying out one computation across several machines working at the same time, each on part of the problem, with their results combined into a single answer. The machines are separate computers connected by a network rather than processors sharing one memory. It is what makes very large datasets tractable, because capacity is increased by adding more machines rather than by finding a bigger one, but the coordination between them has to be managed.

  3. 3

    Why is functional programming put forward as a solution for distributed processing?

    Model answer

    Because correct, efficient code for many machines at once becomes far easier to write in that style. Its restrictions — data that cannot be modified, functions that keep nothing between calls — remove most of the situations where machines running simultaneously interfere with one another. What is a discipline the programmer must impose by hand in other styles is simply built into the language here, so whole categories of distribution error cannot arise.

  4. 4

    What is an immutable data structure?

    Model answer

    One that cannot be altered once it has been created. Any operation that appears to change it in fact produces a new structure holding the modified values, leaving the original exactly as it was. A function that adds an item to a list returns a new list containing that item rather than modifying the list it was given, so anything else still holding the original sees precisely what it saw before.

  5. 5

    Why does immutability help when the same data is held on many machines?

    Model answer

    Because a value that can never change is safe to copy freely. Copies cannot fall out of step with one another, so there is no need to coordinate updates between machines or to lock data while one of them writes. Two machines reading the same value at the same time cannot interfere, and a copy sent across the network is guaranteed to still be accurate when it arrives, since nothing at the far end can have modified it.

  6. 6

    What is meant by statelessness?

    Model answer

    It means a function's result depends only on the arguments it is given. It keeps no stored information between calls and changes nothing outside itself, so it has no memory of what it did previously and no effect on anything else. Everything it needs arrives as input, and everything it produces leaves as its return value — there is no hidden channel through which one call can influence the next.

Other ways to work this

The same content, four other ways.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

Fundamentals of Programming
Fundamentals of Data Structures
Fundamentals of Algorithms
Theory of Computation

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

A driver is .
softwarehardwarestorage

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

Head means the first single element of a non-empty list.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Big Data, on a schedule.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.