Case study / Professional services and consulting

A self-service ML platform where no job sees data it isn't cleared for.

Deloitte (opens in a new tab) partnered with Rodgers Almer to give its data scientists self-service access to test and deploy machine learning algorithms against tens of terabytes of data. In six months we designed and built an elastic, Hadoop-free Spark platform on AWS, with PII and PHI walled off at the platform layer before any job could touch it.

Engagement model
Contract build
Embedded architect and implementor
Partner
Deloitte (opens in a new tab)
Duration
6 months
Team
1 RA architect and implementor; 4 partner engineers, 4 data scientists and 2 DevOps engineers
Stack
Apache Spark (Standalone, no Hadoop or YARN) · Amazon EC2 · Amazon S3 · Parquet · REST job submission (Python, Scala, Java)

80%

reduction in processing cost, from moving tens of terabytes of data to Parquet's columnar format

6 mo

from a blank page to a production self-service ML platform

Zero

PII or PHI exposure incidents while the platform ran, enforced at the platform layer rather than left to each data scientist's judgment

01 · Architecture

What we built together

Long-running, elastic Spark clusters on EC2 replaced the alternative of spinning up a cluster per job or per data scientist, so a request landed on warm infrastructure rather than waiting on a cold start. The clusters run Spark Standalone, with no Hadoop or YARN underneath.

Fig. 1: Data scientists submit jobs through the REST layer; every request passes the permission scope check, which masks or drops PII and PHI columns before the job reaches the Spark cluster, which reads Parquet straight from S3.Accent: where PII and PHI are enforced

Data lives only in Parquet on S3, with no HDFS layer. Compute scales independently of storage, and the columnar format means each job reads only the columns it uses, which adds up across the repeated, overlapping queries data scientists run against the same data.

A REST job submission layer sits in front of the cluster and accepts jobs in Python, Scala or Java, so each data scientist works in whatever language fits the algorithm rather than being boxed into one.

02 · The six months

How the work split

Months 1–6
RAEmbedded architect and implementor: designed the platform, wrote platform code, and directed the partner's engineers and DevOps staff on infrastructure and platform code
Engineering4 engineers and 2 DevOps engineers built the infrastructure and platform code alongside RA
Data science4 data scientists used the platform as it came together and set the requirements for what job submission had to support
  1. Months 1–6
    RA · Embedded architect and implementor: designed the platform, wrote platform code, and directed the partner's engineers and DevOps staff on infrastructure and platform codeEngineering · 4 engineers and 2 DevOps engineers built the infrastructure and platform code alongside RAData science · 4 data scientists used the platform as it came together and set the requirements for what job submission had to support
03 · The core change

PII and PHI enforced before a job runs

Illustrative code, written for this page; not from the partner’s codebase.

The enforcement point sits between the REST layer and job execution. Every incoming request resolves the requesting data scientist’s permission scope, and any column tagged PII or PHI in the schema is masked or dropped before a job context ever touches it. Submitted algorithms are never trusted to behave; they only see what the scope allows.

ScopedReader.java
// Jobs read through their job context, never from S3 directly.
public Dataset<Row> read(String table, PermissionScope scope) {
  Dataset<Row> df = spark.read().parquet(catalog.location(table));
  for (StructField field : df.schema().fields()) {
      Sensitivity tag = Sensitivity.of(field.metadata()); // PII, PHI or NONE
      if (tag == Sensitivity.NONE || scope.canRead(table, field.name())) continue;
      df = scope.allowsMasked(tag)
          ? df.withColumn(field.name(), lit(null).cast(field.dataType()))
          : df.drop(field.name());
  }
  return df;
}

Yours could be next

Tell us what you're building.

Schedule a call