读见

Vanguard:让 AI 查询遗留代码,研究时间从 7 天缩短到 15 分钟

原题AI Cut Our Research Time From 7 Days to 15 Minutes — Gareth Yoder, Vanguard

约 9 分钟原文英文已翻译

视频由 YouTube 提供

推荐理由维护金融或大型遗留系统的团队,可参考如何把代码知识开放给 AI 查询,并将调查提速与分阶段迁移、数据权限和可观测性结合。

看前速览

5 个要点

Gareth Yoder 分享 Vanguard 如何通过并行迁移、可供 AI 查询的遗留代码、受控数据访问与可观测性,完成现金账本现代化。

  1. 让遗留知识可被查询,能改变研究反馈周期

    通过 MCP 开放遗留代码,让产品负责人、技术负责人和开发者直接提问。Yoder 报告研究周期由 7 天缩短到 15 分钟,迁移文档的开放也减少了重复支持。

  2. 并行迁移必须配套明确的正确性核验

    团队同时迁移数据、生产者和消费者。变更数据捕获之外,还核验行数和逐列属性,包括金额、账户信息以及代扣税款等字段。

  3. 现代化也是改进接口与重试行为的机会

    生产者通过网关统一接入,消费者按需使用 GraphQL、数仓视图或 Kafka。至少一次投递不等于每条事件只处理一次,因此幂等与安全重试不可少。

  4. 业务上下文同时改善访问治理与事故响应

    消费者除了应用代码,还要说明业务用途。这既支持按需限定数据访问,也能区分可等待数小时的批处理任务和需要立即响应的客户接口。

  5. 文档、渐进采用和可观测性都属于产品责任

    Yoder 建议持续维护迁移指引,随着工具成熟逐步采用 AI,并提前为迁移完成后的日常运行建立监控,而非最后再补。

完整摘要

Gareth Yoder 回顾 Vanguard 现金账本的现代化过程。该系统负责外部资金流动、账户间转账和多种支付渠道,采用多区域双活架构,每天接收最多约 3,000 万次服务调用,并生成约 50 万份账本。由于项目是企业级优先事项,数据、生产者和消费者三条迁移线必须同时推进。

转折点是通过 MCP 服务器向 AI 工具开放遗留代码。Yoder 表示,过去需要大型机工程师研究 7 天的问题,如今 15 分钟就能得到回答。随后,迁移文档也通过同类方式开放,减少了与生产者团队反复沟通的支持成本。

技术迁移将变更数据捕获与行数、属性审计结合,通过生产者网关改进幂等设计,并分别用 GraphQL、数仓视图和 Kafka 为消费者供数。统一模式和按用途提供的视图支持数据治理;至少一次投递则要求消费者安全处理重试,不能假定不会重复处理。团队还向 50 个消费者收集应用代码和业务用途,帮助理解依赖与事故影响。Yoder 建议把迁移文档当作产品的一部分,重新设计能力而非照搬旧系统,渐进采用 AI,并持续保留可观测性。效率与使用率数字来自内部经验,分享的价值在于具体运行机制,而非受控生产率实验。

章节

文字稿

查看原文

简要描述Brief Description

Gareth Yoder 介绍了 Vanguard 的现金账本现代化项目,包括并行迁移数据、生产者和消费者。他阐述了如何通过 MCP 暴露旧代码和迁移文档,将调研时间从七天缩短至十五分钟,并分享了有关数据治理、渐进式采用和可观测性的经验。Gareth Yoder explains Vanguard’s cash-ledger modernization, including parallel data, producer, and consumer migrations. He describes how exposing legacy code and migration documentation through MCP shortened research from seven days to fifteen minutes, and shares lessons about data governance, incremental adoption, and observability.

目录Table of Contents

  • 简介
    Intro
  • 什么是现金分类账
    What a cash ledger is
  • 三个并行迁移
    Three migrations in parallel
  • 通过 MCP 处理遗留代码:从 7 天缩短到 15 分钟
    Legacy code over MCP: 7 days to 15 minutes
  • 数据迁移
    Data migration
  • 生产者迁移
    Producer migration
  • 消费者迁移
    Consumer migration
  • 引导 50 位消费者入门
    Onboarding 50 consumers
  • 我们的收获
    What we learned
  • 五点启示
    Five takeaways

简介Intro

我叫 Gareth Yoder,是 Vanguard 这里现金项目的技术负责人,协助管理现金项目中的四到六个团队。这就是“绝不让现金掉队”——Vanguard 的现代化之旅。My name is Gareth Yoder. I'm the cash program technical lead here at Vanguard. I help oversee four to six teams in the cash program. This is no cash left behind, a Vanguard modernization journey.

这段历程实际上始于我们向 Vanguard 券商账户客户推出现金加值服务,我们在 2022 年启动了这项服务。推出之后,我们开始听到风声,说现代化改造即将提上日程,而这将成为我们的下一个重大项目。在座有多少人拥有遗留代码库?对吧?This journey really starts after we delivered our cash plus offering to our Vanguard brokerage account clients, and we launched that in 2022. And after we did the launch, we started to get the whispers that modernization is now coming down the pipeline, and that will be our next major project. How many here have legacy code bases? Right?

在座各位真不少。有多少人希望那套遗留代码库能直接升级现代化?对吧?很多人都会这么想。That's a lot of you. How many of you wish that legacy code base would just modernize? Right? Many of you would say the same.

那么,看看这段发展历程,我们会在今天的演示中逐步梳理这条时间线。不过,我想先跟大家讲讲,现金分类账究竟是什么。So, looking here at the journey, we're going to go through this timeline in today's presentation, but I want to first talk to you what a cash ledger actually is.

什么是现金账簿What a cash ledger is

现金分类账涵盖所有从外部转入我们 Vanguard 经纪账户的资金交易,也包括账户之间的现金划转。因此,它涉及各种支付通道,例如 ACH、电汇等。我们支持 Web、移动端和批处理渠道。我们的系统运行在一个主动-主动、多区域、容错的生态系统中。我们的服务每天最多会接收 3000 万次调用。我们的客户每天还会生成 50 万份分类账。A cash ledger involves all money movement transactions into our Vanguard brokerage accounts from the outside world. It also involves cash being moved between accounts. And so, the payment rails, think ACH, wires, and more. We support the web channels, mobile channels, and batch channels. Our system runs in an active-active multi-region fault-tolerant ecosystem. And our services will receive upwards to 30 million calls per day. Our clients will generate a half million ledgers every day as well.

三项迁移并行进行Three migrations in parallel

因此,在我们开始推进这种现代化方案时,我们将其分解为三大支柱:数据迁移、生产者迁移和消费者迁移。但由于这是企业的优先事项,我们必须同时推进这三项工作。现在,当我们着眼于研究分析时,请记住,我们正处于整个时间线的起点,那时还没有 AI 工具。因此,我们经常会与大型机工程师和架构师合作,尝试确定数据模式模型应该是什么样的。And so, as we start to go down this modernization approach, we broke it down into three pillars: a data migration, a producer migration, and a consumer migration. But, because this was an enterprise priority, we had to do all three in parallel. So, now, as we look towards the research analysis, remember we're at the beginning of our timeline, the AI tooling wasn't there. And so, oftentimes we would work with mainframe engineers, and we would work with architects to try to determine what that data schema model would look like.

通过 MCP 处理遗留代码:从 7 天缩短到 15 分钟Legacy code over MCP: 7 days to 15 minutes

在这段现代化改造历程中,我们迎来了一个转折点:通过 MCP 服务器,我们的 AI 工具能够访问遗留代码库。随后,我们发现反馈周期加快了。过去,主机工程师需要花 7 天时间查看代码、进行分析,然后再回来给我们答复;现在,这些工作都可以通过向 AI 工具输入提示来完成。我们看到,反馈周期从 7 天缩短到了 15 分钟。这对我们的产品负责人、技术主管和开发人员来说都是巨大的收获。他们都认为,这款工具为现代化改造的成功提供了助力。And there was a turning point in this modernization journey, and that's when we had our legacy codebase being available to our AI tooling via an MCP server. And now we saw faster feedback loops. What was taking 7 days for a mainframe engineer to go into the code, do their analysis, and then kind of and come back to us for an answer, now could all be done via an AI tool prompt. And what we saw was that the feedback loop was reduced from 7 days down to 15 minutes. It was a huge win for our product owners, our technical leads, and developers alike. They all contribute this tool to helping our modernization succeed.

数据迁移Data migration

那么,我们来谈谈数据现代化。我们采用了业内常见的标准 CDC(变更数据捕获)方法,因此必须扫描两个数据库。一个团队每天都会进行审计。我们首先通过核对行级数据计数,确保数据具有强一致性;然后通过检查各个列,确保数据完整性,确认从旧系统迁移到现代系统的金额一致,账户信息一致,州预扣税和联邦预扣税也一致。旧数据库中的所有属性都必须与云端的数据相匹配。这里有一个重要建议:不要过度设计解决方案,因为随着现代化工作完成,这段代码最终会被弃用。So, let's talk about data modernization. We utilize the standard CDC change data capture approach that's common in industry, and we had to then scan both databases. A team did daily audits. We first made sure we had strong consistency by verifying the row level data counts, and then we ensured that we had strong integrity by checking the individual columns, making sure that the amounts matched from the legacy to the modern, making sure that the account information would match or the state withholding, the federal withholding. All of the attributes in the legacy database had to match to the to the cloud. A major tip here is that you don't want to over-engineer the solution because as modernization would complete, this code would then get deprecated.

生产者迁移Producer migration

现在,我们来谈谈生产者迁移。过去,生产者通过三种方式调用我们的基础设施。第一种是通过服务请求。第二种是通过一个封装了该服务请求的 API。Now, let's talk about producer migration. Our producers called our infrastructure in three ways from the legacy state. One was through a service request. The second was an API that wrapped that service request.

最后一个问题,也可能是最棘手的问题,就是直接插入数据表,因为我们会看到数据出现在数据库中,却不确定它是怎么进去的,也不知道是谁生成了这些数据。因此,我们采用了通用数据架构,并将其部署到一个网关上,由该网关封装我们的 API,以便将数据插入云端。现在,请把现代化转型之旅视为重新构想数据生态系统的契机。我们借鉴了金融科技公司的一些理念,例如幂等性。And the last and probably the most daunting was direct table inserts because we would see data appear in our database and we weren't sure how it got there or who produced that data. So, we took that common data schema and we put it onto a gateway that wrapped our APIs that would do our cloud data inserts. Now, take your modernization journey as an opportunity to reimagine your data ecosystem. We took concepts from FinTechs such as idempotency.

我们还确保了多个写入者之间具有很强的一致性。因此,我们采用了类似 Snowflake ID 所能提供的范式。我们重新构想了这一方案,并没有进行直接迁移。We also ensured that we had strong consistency across multiple writers. And so, we used utilized a similar paradigm to what a Snowflake ID would provide us. We are reimagined and we didn't do a lift and shift.

现在,我们已经提供了现代化的生产者方案。我们该如何让生产者加入?我们有35个生产者需要升级改造,以适配我们的生态系统。在早期,我们必须编写手动文档来推动这一转型。Now, we have a modernized producer offering available. How do we get our producers? We had 35 producers that had to then modernize to our ecosystem. Early on, we had to produce manual documentation to facilitate this transition.

随着 AI 工具逐渐可用,我们将相关文档放在了公司的 Wiki 中,然后通过 MCP 服务器开放出来。这确实很有帮助,因为以前有很多团队会找我们沟通,我们得想办法把这些沟通都整理好。现在,这些沟通和来回交流都可以通过生产者端的提示词完成。我们发现,启用 MCP 后,我们团队需要处理的聊天数量以及为生产者提供的支持都大幅减少了。AI 工具在将状态从传统生态系统迁移到云端方面也做得非常出色。And as the AI tooling became available, we provided that documentation in our company's wiki, but then exposed it via the MCP server. And that was really great because what it did was we used to have many teams having chats with us, and we had to try to keep all of those organized. Now that communication and that back and forth could all be done via the prompt on the producer side, and we saw that the number of chats and producer support that our team was doing was greatly reduced when we had the MCP available. The AI tools also did a really good job of transitioning state from the legacy ecosystem to the cloud.

我们将云生态系统中的账本枚举设计为人类可读的,而不是像旧生态系统中那样只使用账本状态码。因此,我们的 AI 工具非常出色地弥合了从旧生态系统到云端的意图鸿沟。We made our cloud ecosystem, the ledger enums, to be human readable versus just ledger status codes in our legacy ecosystem. And so, our AI tooling did a really good job at bridging the gap of the intent from the legacy ecosystem to the cloud.

消费者迁移Consumer migration

现在我们来看看消费者迁移路径。我们有三种访问消费者级数据的方式:实时用例、批处理用例和流处理用例。它们的共同点是,无论消费者通过哪种渠道访问这些数据,我们都会提供一个模式注册表。So now let's look at the consumer migration path. We had three ways to access consumer level data. We had real-time use cases, batch use cases, and streaming use cases. And the commonality here is that we provided a schema registry, no matter which channel that your consumer would access that data.

因此,对于可用资金查询,这是我们流量最大的实时 API,它会用于确定账户上显示的余额。他们会通过 GraphQL 调用我们,并且只订阅符合其使用场景的属性。至于批处理场景,比如对账或数据分析,我们会通过数据仓库向每位使用者提供数据共享视图。And so, for a funds available, that's our most heavy traffic real-time API, and that goes into determining what is the balance that's displayed on your account. They're going to be calling us via GraphQL, and they're going to subscribe to only the attributes that meet their use cases. Now, for batch use cases, think of reconciliation or data analytics. We have our data warehouse that will expose data share views to each individual consumer.

每个消费者都会告诉我们他们的使用场景,而我们会根据其数据需求提供专属视图。Each of the consumers tells us their use case, and we provide a view that's specific to their data needs.

这得到了我们数据治理团队的支持,他们强烈主张,只有需要特定数据属性的使用方才能看到相应的数据。最后一部分是关于流式处理。我们有一个 Kafka 事件主题,会将该数据库中的所有插入和更新操作都流式传输到主题中。我们的欺诈团队能够利用这项技术,将实时数据摄取到他们的欺诈检测工具中。This was supported by our data governance team that strongly advocated that only the consumers that need the certain data attributes, they should only see those pieces of data. Our last piece was around streaming. We have a Kafka event topic that we would stream all of the inserts and updates to that database. Our fraud teams were able to take advantage of this technology to provide real-time data ingestion into their fraud tooling.

我们提供了至少一次投递。因此,我们在生产者端实现的幂等性理念,也延续到了事件流中。由于订阅方采用的是至少一次投递,我们确保他们使用的操作具备幂等安全性。这样一来,即使批处理作业在执行过程中途失败,相关团队也可以重试,同时我们还能确保不会创建重复的账本。We provided at least once delivery. And so, our concepts of idempotency that we did through the producer side, we carried forward through the event streaming. And so, as they subscribe to at least once delivery, we made sure that they had idempotent-safe operations. So, that if a batch job would fail halfway through the process, those teams could retry, and we can ensure that we don't have duplicate ledgers being created.

但事件系统侧的至少一次投递机制确保他们收到了所有已生成的账本事件。But, the at least once delivery from the eventing side ensured that they had all of the ledger events that were created.

引导 50 名消费者完成入驻Onboarding 50 consumers

当时,我们在组织内接入了 50 个不同的数据使用方,他们都需要我们的数据。在 Vanguard,接入应用时,必须先提供一个三字符的应用代码,才能注册并完成接入。这个应用代码用于说明应用是什么,以及它的功能。不过,我们还更进一步。Now, when we onboarded consumers, we had 50 different consumers across our organization that needed our data. At Vanguard, when you onboard an application, you need to have a three-character application code to register to onboard. This application code describes what your application is and what it performs. But, we took it a step further.

我们要求数据使用方提供一份说明,描述他们的需求,并说明获取这些数据的业务理由。比如,如果某笔交易需要现金账簿来履行交易的现金义务,这就可以算作一个业务用例。又比如,退休账户需要进行规定的强制分配;529 教育储蓄账户则可以向大学学费账户缴款。We requested that our consumers would provide us a description and a business case justification for their need for the data. And so, think about if I am a trade order that needs a cash ledger to fill fulfill the cash obligation of the trade, that could be a business use case. Or for a retirement account that needs to do a required mandatory distribution. A 529 account could do a contribution to their college tuition account.

通过整合所有这些业务描述,AI 工具现在可以汇总相关信息,准确说明我们的生态系统中哪些用例已经实现现代化,同时也能梳理出我们支持的核心业务功能。By grouping together all of these business descriptions, now the AI tooling can compile that together and provide an accurate description of what use cases have been modernized in our ecosystem, as well as we now have what is the top business functionality that we support.

我们还可以更进一步,探讨 SLA 违约会造成什么影响。这一点至关重要,因为如果发生重大事故,并且我们发现某个应用的可用性开始低于五个九(99.999%),就可以进一步判断:对于批处理应用,我们可能有几个小时的响应时间;而对于实时 API,如果另一端有客户端正在接收错误,我们就只有几分钟,分秒必争,必须尽快实现自我修复。我们会继续评估如何将业务用例的合理性依据融入可观测性和日志追踪中,以缩短响应时间。We can also take it a step further by asking what is the impact if our SLAs are breached. And this is critical because if you're in a major incident and if we see an app code that starts to go below the five nines of availability, we can go in and we can see, okay, a batch application we may have hours to respond. A real-time API where there's a client on the other side that's receiving errors, we have minutes and time is of the essence to self-heal. We're continuing to evaluate how we can get faster response times by combining the business use case justification into our observability and log traces.

我们的收获What we learned

总的来说,我们了解到,尽管在 AI 工具尚未问世时,我们就已经踏上了这段旅程,但我们及时调整,并持续采用新技术。这极大地助力了我们的研究、开发和测试。如今,在我们的现金项目中,90% 的工程师每天都会使用这些 AI 工具。我们的团队采用多智能体工作流,并共享知识库。So what we've learned, we've learned that although we started this journey before the AI tooling was even available, we adapted and continued to adopt the newer technologies. This greatly aided in our research, in our development, and our testing. Today our cash program, 90% of our engineers utilize these AI tools on a daily basis. Our teams use multi-agent workflows, and we have shared knowledge bases.

我们正在持续演进这套 AI 工具框架,以满足现代化转型的需求。我们提出了“团队大脑”这一概念:工程师开发产品功能时积累的知识会存入一个共享存储库,供团队所有成员访问。新加入的工程师也可以利用这个共享知识库,从而在提示词中获得与已在这里工作五年的工程师相同的上下文。We're continuing to evolve this AI harness to meet our modernization demand. We have the concept of a team brain that as engineers are building out product features, that knowledge goes into a common storage where it's now accessible by all members on the team. And if there's an engineer that has just joined, they can tap into this common knowledge base, and now they have the same context in their prompt as an engineer that has been here for the last 5 years.

现在,在现代化改造过程中,同时维护两套代码库很有挑战。你要做的是继续向前修复,不要回头修复过去。当你遇到那些可能已经存在了几十年的 bug 时,继续修复现代化后的系统,并以此激励生产者和消费者将系统现代化并迁移到云端。这会影响你的审计日志,因此你需要支持白名单,这一点至关重要。最后,确保你具备合适的指标、告警和可追溯性,因为随着产品不断发展,你会经常查看这些信息。Now, when you're in a modernization process, maintaining two code bases is challenging. And what you'll want to do is you'll want to continue to fix forward. Don't fix the past. As you encounter bugs that have may have listed have existed for decades, continue to fix the modernized state and allow that to be the incentive for your producers and your consumers to modernize to the cloud. Now, this will throw off your audit logs, so you'll want to have white listing available, and that's really critical. And the last piece is ensure that you have the right metrics, alarms, and traceability, because you're going to review those often as your product continues to grow.

五点启示Five takeaways

现在,由于这是一个领导力课程,我想重点指出五个要点。第一,让你的知识和遗留代码库能够被 AI 查询。通过 MCP 服务器公开遗留代码库,缩短了研究周期,也让反馈循环更快。这一周期从 7 天缩短到了 15 分钟。Now, because this is a leadership track, I want to call out five main points. Number one was make your knowledge make your legacy code base AI queryable. That exposing that via an MCP server, our legacy code base it cut that research cycle time and gave quicker feedback loops. That's 7 days down to 15 minutes.

这是一次巨大的胜利。要把迁移文档视为产品的一部分。迁移文档需要和业务功能同等重要,因为所有生产者都会利用它们来接入你的应用。最终,这些文档确实会被弃用,但在过渡期间,它们至关重要。That was a huge win. Treat your migration docs as part of your product. It needs to your migration docs are just as in critical as your business functionality because that's what all of your producers are going to utilize to onboard to your application. Eventually, yes, those will get deprecated out but for that interim process those migration docs are critical.

第三点是重新构想,而不是简单照搬迁移。我们在将用户和数据提供方接入现代化体系时,遇到的最大困难来自那些想把旧系统直接迁移到新系统的人;相比之下,另一些人会先退一步思考:“我们如何利用现金账本生态系统提供的现代化能力,更好地演进我们的产品?”Reimagine and don't lift and shift is the third point. The consumers and producers that we had the most trouble onboarding to our modernized state were the ones that wanted to do a direct lift and shift transfer of old to new versus those that took a moment to step back and say, "How could we better evolve our product by taking advantage of the modern capabilities that the cash ledger ecosystem provides?"

第四个组成部分是逐步采用 AI。随着 AI 工具不断涌现,你要继续提升产品。在我们当今所处的世界里,永远不会有一个完美的起点。重要的是开始行动,并随着技术的发展不断改进和适应。The fourth component is adopt AI incrementally. As the AI tools arrived, you continue to enhance your product. There's never going to be a perfect starting point in the world that we live in today. The important thing is that you get started and you continue to enhance and adapt as the technology changes.

最后一点是,可观测性绝不可妥协。你需要了解谁在生产数据、谁在使用数据。随着产品进入常态化运营阶段,这一点也变得愈发重要。现代化改造完成后,你们的团队将需要把支持这项工作作为日常运营的一部分。非常感谢大家。Last piece is observability is non-negotiable. You need to know who's producing your data and who's consuming your data. And this is ever more important as your product goes to BAU and once the modernization is complete, your teams will now have to support this as their daily operations. Thank you very much, all.

如果时间允许,我们会回答问题。否则,我会在房间外面,你们之后可以联系我。再次感谢你们给我这个机会。If we have time, we'll take questions. Otherwise, I'll be outside of the room. You can connect with me later. And thank you again for the opportunity.

值得记下

我们的系统运行在多区域双活、具备容错能力的环境中。
第三点是重新构想,而不是原样迁移。
最后一点,可观测性没有商量余地。