AAmit’s LibraryLEARN · PRACTISE · REFLECT

BCA

Big data: distributed processing, correctness and business value

Study map: Original foundation and applied business–computing lesson; related subjects, not a claim of complete unit coverage

Big-data work concerns datasets or workloads that strain a chosen processing arrangement. Size alone is not a sufficient design argument. Consider volume, arrival rate, structure, latency and the resources available. A well-designed local database may handle a business task more simply than a distributed platform. State the constraint that additional infrastructure is meant to solve.

1. Decide whether distribution is needed

Big-data work concerns datasets or workloads that strain a chosen processing arrangement. Size alone is not a sufficient design argument. Consider volume, arrival rate, structure, latency and the resources available. A well-designed local database may handle a business task more simply than a distributed platform. State the constraint that additional infrastructure is meant to solve.

Separate storage, computation and orchestration responsibilities. A pipeline may ingest records, validate them, transform them and publish a table for analysis. A scheduler coordinates tasks but does not automatically make each transformation correct. Map the full path from source event to business metric and identify where information can be lost, duplicated or delayed.

Further reading: Apache Spark quick start

2. Understand partitions and movement

Distributed processing divides work across resources. Partitioning determines how records are placed and which tasks can run independently. Operations requiring data from several partitions may involve movement, commonly called a shuffle in systems such as Spark. An uneven distribution can leave one worker overloaded while others finish early.

Choose keys based on workload and meaning. Partitioning by customer may support some queries but create imbalance when one customer dominates. Aggregation can reduce later work, but premature aggregation may discard information needed for correction. Test using representative distributions rather than perfectly uniform synthetic records alone. Explain performance observations in terms of data movement, computation and resource constraints.

Further reading: Apache Spark: RDD programming guide

3. Make pipelines repeatable and recoverable

A pipeline needs identities, checkpoints, validation and an appropriate way to retry work. Re-running an ingestion task should not silently duplicate business effects. Track input versions, transformation versions and completion status. Distinguish event time from processing time when records arrive late or out of order.

Define ownership and quality checks for published datasets. A completed job can still produce an incorrect table. Reconcile counts and important totals, inspect unexpected nulls and preserve records that fail validation for review. Orchestration tools can manage dependencies and schedules, while people must investigate changing schemas and business meaning. Build a controlled route for correcting historical output.

Further reading: CMU database systems: Fall 2025 schedule

4. Connect infrastructure to a decision

Measure the benefit of the engineering arrangement: faster usable data, improved reliability, lower effort or support for a previously infeasible analysis. Include infrastructure expense and operating complexity. A faster pipeline adds little value if the resulting data is too stale, ambiguous or inaccurate for the decision.

For study, implement a small pipeline first and explain how it would change at larger scale. Compare a local aggregate with a distributed equivalent using the same definitions. Introduce a duplicate, a late record and a schema change, then demonstrate recovery. Present both the technical evidence and a business explanation of why the architecture is justified.

Further reading: Apache Spark quick start

Study this subject through the nine question words

Who: Who owns sources and published datasets?

Whom: Whom does delay or error affect?

Whose: Whose schema and definition are authoritative?

What: What workload exceeds current capability?

Where: Where are partitions and transformations?

When: When are late records incorporated?

Why: Why is distribution justified?

Which: Which checks verify business correctness?

How: How will retries and historical correction work?

Transfer practice: replay and late events in a partitioned total

Treat these as paper records, not a supplied executable pipeline. Day-one input contains event E1 worth 100 and E2 worth 200, both with event dates on day one. The next delivery contains an identical replay of E2, E3 worth 50 with an event date on day two, and E4 worth 30 whose event date belongs to day one. If identity is a unique event ID and repeated identical payloads are replays, the distinct-event total is 380. Summing every arrival gives 580. Under event-date reporting, day one must be revised from 300 to 330; the processing-day arrivals and event-day totals answer different questions.

Define what happens if E2 later arrives with value 250. It is neither an ordinary replay nor automatically a new sale. Preserve both versions and invoke a correction rule before publishing the authoritative total. Similarly, partitioning by event date changes where E4 must be incorporated. A completed ingestion job proves neither deduplication nor correct historical revision.

An undergraduate should trace identities, dates and totals. A postgraduate should compare retaining detailed events with publishing aggregates, explaining recovery, late-data policy and skew if one partition receives most records. For research, compare correction delay and reconciled totals under documented policies using identical inputs. Small examples establish semantic checks; they do not establish throughput, fault tolerance or a distributed engine's delivery guarantees. Benchmark the actual workload before claiming distribution is necessary.

Study questions and answers

Why does a successfully completed job not establish data correctness?

The transformation may apply wrong definitions, omit records or duplicate effects despite finishing without a runtime error.

Extended practice questions

Explain why data engineering concerns correctness and business meaning as well as processing scale.

Data engineering arranges collection, transformation, storage and delivery so data can support a defined use. Large volume makes efficiency important, but a fast pipeline can still duplicate orders, lose events or change field meanings. Define keys, accepted states, quality checks and recovery behaviour with business owners. Preserve lineage and explain how late or corrected records are handled. Distributed processing changes coordination and failure conditions; it does not remove them. Judge the pipeline by dependable, interpretable outputs as well as speed and the amount of data processed.

Marking guide: Pipeline stages; correctness; keys/states/recovery; lineage; scale not validity. Indicative allocation: reasoning 4; application or workings 3; assumptions and limits 3.

Marks: 10

A batch has 100 records; ten are duplicate extras under a defined key and five different records are invalid. Calculate accepted count under the disjoint assumption.

Remove ten duplicate extras and five invalid records from 100, giving 85 accepted records. This uses the explicit assumption that the invalid records are distinct from the removed duplicate extras. If the categories overlap, subtracting both counts independently would reject too many. Define which duplicate is retained and why a record is invalid, then reconcile accepted and rejected outputs to the input. The calculation is a bounded batch balance; it does not establish that the retained records are complete or truthful, or that the same policy suits every business use.

Marking guide: 85; disjoint assumption/overlap; retention rules; reconciliation; truth limits. Indicative allocation: reasoning 4; application or workings 3; assumptions and limits 3.

Marks: 10

Critique retrying every failed pipeline step without considering duplicate effects.

A retry can repeat an action whose earlier outcome was uncertain rather than absent. If a write already occurred, another attempt may create a duplicate or repeat a business notification. Define operation identity, accepted outcomes and safe repetition or reconciliation according to the system design. Preserve enough evidence to determine what happened after a partial failure. Automatic retry is useful in bounded conditions, but it should not hide unresolved state. The business consequence matters: repeating a harmless read differs from repeating an irreversible commitment or customer-facing action.

Marking guide: Uncertain outcome; identity/reconciliation; partialfailure; read/write distinction. Indicative allocation: reasoning 4; application or workings 3; assumptions and limits 3.

Marks: 10

Frame research on pipeline quality checks and downstream rework.

Ask whether specific input checks and reconciliation reduce downstream correction without excluding valid cases unnecessarily. Define errors, exclusions and accepted outputs with the intended business users. Compare suitable processing periods while recording volume, source changes and staff effort. Investigate rejected records and workarounds, not only the successful output count. The contribution would explain how quality rules affect reliability and workload. A lower error rate in published data may be misleading if difficult cases were simply removed and their business consequences left unresolved elsewhere.

Marking guide: Defined quality/outcomes; comparisons/confounders; rejection/workload; selective-output limit. Indicative allocation: reasoning 4; application or workings 3; assumptions and limits 3.

Marks: 10

A team proposes distributed processing for a small dataset before measuring the workload. What decision evidence is needed?

Define data volume, update rate, latency requirements and correctness constraints, then measure a simpler appropriate baseline. Distribution may add coordination, movement, failure and operating costs without solving the actual bottleneck. Consider storage access, query design and process timing before adding machines. Data engineering and business owners should specify what decision depends on the result. A large technology label is not evidence of business value. Select the architecture that meets requirements with manageable complexity, and document what change in workload would justify reconsidering it.

Marking guide: Workload/correctness;simple baseline;coordination costs;bottleneck and decision;revisit trigger. Indicative allocation:reasoning4;application or workings3;assumptions and limits3.

Marks: 10

Compare partitioning data with replicating data.

Partitioning divides data among locations or processing units according to a rule. Replication creates additional copies of some data. They can coexist but have different implications for placement, load, consistency and recovery. A partitioning strategy can create skew, while replicas require a policy for updates and which copy to read. Neither automatically establishes correctness or resilience. Define identifiers, data versions and workload before choosing a design. The business consequence of stale or missing records must guide technical trade-offs rather than assuming that any distributed arrangement is faster and safer.

Marking guide: Division versus copies;skew/update policies;correctness/recovery;business staleness. Indicative allocation:reasoning4;application or workings3;assumptions and limits3.

Marks: 10

A pipeline receives 100 events, including 20 identical replays of already included events. Under a one-record-per-event-ID policy, what count remains?

If the 20 replay occurrences duplicate events already among the 100 and no conflicting values or other duplicates exist, deduplication leaves 100−20=80 distinct event records. That result depends on the stated identity and replay assumptions. Similar-looking events are not necessarily identical, and repeated identifiers with different payloads need a conflict policy. Retain replay and rejection evidence rather than silently dropping unexplained records. A downstream sum should count according to the agreed business event meaning. This fixture does not establish exactly-once processing across every storage and external side effect.

Marking guide: 80;identity/replay assumptions;conflicting payload;visible exclusions;exactly-once scope. Indicative allocation:reasoning4;application or workings3;assumptions and limits3.

Marks: 10

Specify repeatable and recoverable pipeline behaviour for daily transaction summaries.

Version inputs and transformation rules, define stable event identifiers and a replay policy, and retain quality exceptions. Publish outputs through a controlled commit boundary so an interrupted run does not expose a partly updated summary. Test reruns and a failure between stages using synthetic data, checking totals and record identity. Assign owners for corrections and recovery, with the reporting cutoff explicit. A successful batch log is not enough: validate the business output and downstream availability. External actions require their own coordination rather than assuming a pipeline replay is harmless everywhere.

Marking guide: Version/identity/replay;publication boundary;rerun/failure tests;cutoff/output validation;external scope. Indicative allocation:reasoning4;application or workings3;assumptions and limits3.

Marks: 10

Revision cards

Explain why data engineering concerns correctness and business meaning as well as processing scale.

Data engineering must deliver correct, interpretable data with defined keys, transformations and recovery, not merely process large volumes quickly.

A team proposes distributed processing for a small dataset before measuring the workload. What decision evidence is needed?

Measure requirements and the simpler baseline before distributing. Extra machines can add complexity without solving the real bottleneck.

Compare partitioning data with replicating data.

Partitions divide records; replicas copy them. Both need placement, version and recovery policies;neither inherently proves speed or correctness.

A pipeline receives 100 events, including 20 identical replays of already included events. Under a one-record-per-event-ID policy, what count remains?

80 records under the stated replay policy. Conflicting payloads and external side effects need separate rules;deduplication alone is not universal exactly-once delivery.

Specify repeatable and recoverable pipeline behaviour for daily transaction summaries.

Make reruns explicit, avoid partial publication and validate recovered totals. Pipeline success logs do not establish correct downstream business use.

A batch has 100 records; ten are duplicate extras under a defined key and five different records are invalid. Calculate accepted count under the disjoint assumption.

Accepted count is 85 if duplicate extras and invalid records are disjoint; define retention and reconcile all outputs.

Why does distributing a computation introduce correctness questions?

Work and records must be partitioned, coordinated and reconciled across components that can fail separately. Faster processing is insufficient if events are duplicated or omitted. Define what completion means and test recovery under the stated system boundaries.

Practice task

Build a small sales pipeline with unique event IDs and reconciliation. Simulate duplicate and late records, then explain which constraint would justify distributed processing.

Sources and further reading

Open interactive reading and progress tools