How We Mapped a 35-Million-Line Mainframe in 4 Days - Stephen Chin, Neo4j & Neeraj Deshmukh, Blitzy

Loading slides…

Read the talk

How Blitzy Mapped a 35-Million-Line Mainframe in Four Days, and What It Takes to Move the Money

Stephen Chin of Neo4j and Neeraj Deshmukh of Blitzy follow an interest payment from a COBOL batch job to its Java replacement, showing how to find the dependencies an agent needs and test whether the money comes out right.

From a talk by Stephen Chin and Neeraj Deshmukh

At a glance

Ideas worth remembering

  • Scope a financial migration around a complete posting. Identify the batch caller, record layout, persisted balance, transaction output, and failure outcomes before assigning the arithmetic.

  • Keep the repository revision and source span behind each dependency. Refresh the graph on merge so the next agent can work from the code that actually exists.

  • Use the existing system to establish expected behavior. Compare equivalent runs at each write and across the complete workflow, and ask a domain expert to decide which existing defects should change.

The mobile banking app has a nightly batch job underneath it

A customer can bank from a phone while decades-old software handles the account. Under that interface, business rules determine what should happen, nightly batch jobs do the work, and data contracts govern what one program can expect from another. Stephen Chin starts here because it explains why engineers hesitate over a one-line change. The line is easy to edit. Finding every process whose behavior depends on it can take much longer.

About 30 years earlier, Chin was a Java developer migrating COBOL applications off mainframes. These were multiyear projects. His team could translate the code and test it, yet still miss a corner case that surfaced as a small, consequential bug. In his experience, projects often failed. Neeraj Deshmukh takes up that testing problem with an example small enough to follow from the job invocation to the money it records.

0:14
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:14 · section reference included

Follow an interest posting through AWS CardDemo

AWS CardDemo is a public demonstration system developed by Amazon. Deshmukh picks one operation, computing interest. A batch job calls the interest program. The program works with record layouts defined in COBOL copybooks and produces VSAM data. To follow one posting, start with the inputs and the job that supplies them, inspect the layouts the program uses, then follow the account update and the outgoing transaction. The arithmetic sits partway along that path.

Now give an AI coding tool the instruction to convert the interest formula from COBOL to Java. It can find the expression and produce a translation. That instruction gives it little reason to inspect the precision of the record holding the amount, the update to the account, the transaction output, or the contract under which the batch job runs. Each affects what it means to post the right amount. Deshmukh describes the missing knowledge as the other 14 places the logic is used. A reviewer looking only at the translated expression has the same blind spot.

A solid cyan line connects the interest formula the agent found to the Java migration request. Dashed red lines lead to four missing pieces of context: record precision, account update, transaction output and batch contract. A pipe sprays water in the background.Open full source frame
The cost of missing context when moving interest calculation to Java
1:58
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

1:58 · section reference included

Three ways to retrieve context, with different results

Deshmukh asks why expanding context would fail to solve this. Chin distinguishes three retrieval approaches. A vector database finds material by similarity. It may surface another passage about interest, while a relevant layout matters because the program includes it. A relational database offers a larger repository of facts, accessible, for example, through an MCP server issuing SQL queries. Chin describes that pattern of use as a single-hop lookup. A graph supports multi-hop retrieval: begin at a program, find the job that executes it, inspect the copybook it includes, and follow its outputs. Each connection gives a reason to retrieve the next piece.

There is also a limit to what a model can use once the material has been found. Chin contrasts an advertised million-token window with his estimate of 200,000 or fewer usable tokens, citing declining accuracy as the window fills. The speakers also give a rough effective-context estimate of 20 to 30 percent and discuss codebases exceeding 200,000 to 300,000 lines. Those are different units and rough estimates. The practical problem is selection. A prompt presents material in sequence, while a program's caller, layout, and output may occupy distant parts of a repository.

3:55
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:55 · section reference included

Give each dependency a source location and a revision

In the graph of CardDemo, the interest program connects to the job that executes it, the copybooks it includes, and the outputs it produces. Deshmukh draws attention to what accompanies each edge. It retains its identity, its origin in the repository, the revision, and the symbols it touches. The evidence identifies the file, the span of source, and how the relationship was extracted. An engineer investigating a dependency can go back to the code that established it.

The INTCALC job executes the highlighted CBACT04C program. The program includes a copybook that defines DIS-INT-RATE, reads and updates ACCOUNT-FILE, and writes TRANSACT. A legend distinguishes observed edges from inferred edges.Open full source frame
Code becomes a graph that keeps its source

Blitzy updates the graph on every merge and invalidates relationships that have ceased to hold. That matters during a migration because the map is also an input to subsequent changes. Once a program or its dependencies change, an agent assigned to the next job needs the relationships supported by the merged revision. An accurate inventory of the original mainframe would, on its own, describe an increasingly old version of the system.

6:03
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

6:03 · section reference included

Package the evidence for one agent’s assignment

Each Blitzy agent receives a task context packet. It contains the task description, where the work belongs in the graph, the relevant slice of source, the constraints on the change, and the available evidence. The packet also identifies unanswered questions the agent is supposed to work on. In the interest example, the batch caller and the included layout belong together in the assignment even though they live outside the formula being translated.

A flowchart shows a shared system graph and persistent memory feeding a highlighted task context packet. An agent uses the packet and tools to produce a patch with test evidence. Unresolved questions trigger fresh retrieval.Open full source frame
A context packet for each agent

This is what Deshmukh means by “infinite code context.” The software estate can be much larger than one prompt because an agent can access the information relevant to its task when it needs it. The graph supplies the connections. The packet narrows those connections to a particular decision and distinguishes what the source already establishes from what still needs investigation.

7:08
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

7:08 · section reference included

Approve the transformation before generating code

Deshmukh likens Blitzy's process to compiling the knowledge in an enterprise. First it reverse-engineers the software estate to extract business logic, workflows, and hidden dependencies. The user then supplies requirements and rules for the proposed change. These feed an agent action plan, the specification that states the scope, what will be transformed, and which behaviors must carry over. A domain expert reviews that plan against the intended outcome and approves it before agents begin generation.

Agents have access to the repository and instructions for building the environment and running the software. When the source leaves a behavioral question open, they can execute the program, observe what happens, and use that observation while making the change. The deliverable has two parts. A pull request contains the tested code. A project guide documents what changed and the evidence used to validate it. That gives the person reviewing a consequential change both the implementation and an account of how it was checked.

7:53
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

7:53 · section reference included

Thousands of agents share a plan and test as they go

Deshmukh pairs what he calls hyperscale orchestration with extreme validation. Thousands of agents share the approved plan, while each works with the context relevant to its assignment. For a split such as interest calculation and account updating, the common specification matters: the work can be divided, but both pieces still have to satisfy the same posting behavior. Deshmukh says Blitzy spends more compute on testing than on code generation.

He identifies four controls throughout the process. System-level context exposes dependencies beyond the component being edited. Continuous validation checks the code during generation. Explicit guard layers apply security, governance, and compliance requirements, particularly important for financial systems. Finally, a human owns the decisions that matter. An existing defect is one such decision. If the replacement is supposed to reproduce today's behavior, correcting a defect changes the target and requires an explicit choice.

9:32
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

9:32 · section reference included

Compare what each operation returns, writes, and emits

For the interest operation, preservation has several observable dimensions. The monetary amount has a precision and a rounding behavior. The account has a balance after the update. A transaction record leaves the program. Failures have outcomes too. Blitzy runs tests against the existing system as a baseline, exercises the modern system with equivalent inputs, and compares the results operation by operation. A matching return value leaves open whether the program persisted the same balance or emitted the same transaction.

The same versioned fixtures and controlled clock feed a COBOL baseline and a Java candidate. Arrows from both lead to a comparison of four outputs, labeled diff=0.Open full source frame
Parity is proven, not promised

The checks accumulate. Generated code must compile and pass unit tests. At runtime it must integrate with the existing framework. Each write must achieve data parity, and the full workflow must reproduce the baseline, including error outcomes for the failure cases exercised. Deshmukh sets the target at zero differences for the operations being compared. He gives a customer's acceptance result as an example: at a Fortune 100 insurer, a transpiled job produced output identical byte for byte to its golden mainframe baseline. That is a concrete comparison for a particular job.

11:35
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

11:35 · section reference included

The Java calculation compiles and misses by one cent

Chin remembers making decimal-arithmetic and rounding mistakes as a Java developer. Did the AI do better? In Deshmukh's interest example, the generated Java compiled and produced an amount that looked reasonable to someone familiar with Java. On the test input, the Java calculation rounded up and posted one cent more than the COBOL baseline.

Three cards compare results for one calculation. COBOL stores $16.66, the illustrative Java mutation rounds to $16.67 with HALF_UP, and Java with RoundingMode.DOWN matches the $16.66 baseline.Open full source frame
One cent exposes the difference

The mainframe run supplied the decisive expected value. A unit test written from the translated expression could have endorsed the Java result, and a reviewer inspecting the amount in isolation could easily have accepted it. Comparing the two implementations on the same operation exposed the cent. Deshmukh asks the audience to imagine that discrepancy recurring across a million transactions. Even at one cent, the team needs to know which accounts and records its calculation would change.

13:26
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

13:26 · section reference included

An 18-day migration, a four-day map, and a policy platform

Deshmukh reports three engagements with different deliverables. At a tier-one bank, the starting point was a monolithic trade-posting engine with stored procedures and writes across databases. Blitzy converted it into six capability modules using PostgreSQL, Java, TypeScript, and Python. Deshmukh reports full behavioral parity, more than 4,000 tests, and a modern codebase less than half the size of the old one. Delivery took 18 elapsed days. The bank's original plan had allocated 18 engineer-weeks, a labor estimate rather than an elapsed-time measurement.

On the 35-million-line mainframe, the four-day result was reverse engineering. According to Deshmukh, the customer had already spent about eight months and several million dollars with a systems integrator and had no usable result to show. The customer described the earlier experience as inspecting individual modules in a dark room with a pencil light. Seeing the mapped system felt like switching on the overhead light. What the customer could now see was how the pieces related across the estate.

A bar chart compares the time to map a Fortune 100 insurer’s mainframe into a knowledge graph. The short cyan bar shows 4 days for Blitzy. The long orange bar shows 8–12 months for a typical SI.Open full source frame
Mapping a ~35M-line mainframe

The third engagement involved modernizing a 25-million-line policy administration monolith. Deshmukh says Blitzy completed the work nine times faster than he estimates an engineer using IDE-based agentic tools would have done it. He also reports that 85 percent of the code was completed autonomously and that almost 90 percent of that portion made it into production.

14:22
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

14:22 · section reference included

Use the updated interest path to introduce a promotional rate

Deshmukh returns to CardDemo with a different assignment. Suppose the business now wants a promotional interest rate. The modernization has left the team with a graph of the upgraded posting path, established governance rules, and an expanded test suite. Engineers can trace where the new rate should apply and use the existing comparisons for postings that should continue to behave as before. The domain decision concerns which behavior to change. The earlier work supplies evidence about everything that decision touches.

A checklist shows what the promotional-rate feature can reuse, including a test for the one-cent rounding rule. A list alongside names the knowledge layer, governance rules, and test suite from prior changes.Open full source frame
Adding a promotional interest rate to AWS CardDemo

Deshmukh extends that reasoning to new products, feature development, security detection and remediation, and evidence for compliance audits. Chin describes moving from code relationships to business rules and processes, with possible applications in tracking rule changes, examining DORA compliance across a system, and investigating financial fraud. For practitioners who want to inspect the example, Deshmukh points to the Blitzy Sandbox, which includes the AWS CardDemo modernization and accepts users' own code. Chin points to the Nodes Conference for 24 hours of sessions on building and applying knowledge graphs.

16:37
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

16:37 · section reference included

Transcript download
Full transcript

Loading transcript…