beckysweger.com
IRS Direct File ADR Highlights
The newly-released source code for IRS Direct File is a truly important artifact for:
* anyone who has tried to express the U.S. tax code programmatically
* anyone interested in how teams make technical decisions.
The former group should check out the Fact Graph, which deserves its own post (IRS DAG, anyone?).
For the latter, the repo’s docs directory has all kinds of rare treats. If you’ve ever worked in government, you know how hard it is to publish _anything_ , let alone something that describes your thinking or lessons learned. Much respect to the Direct File team for including artifacts about their research and decisions.
The themes of the project’s architectural decision records (ADRs) are pragmatism and simplicity. Which isn’t to say that Direct File is simple. My impression is that the team rightly chose to spend more time on unsolved problems (_e.g._ , representing the tax code as a graph) and less time on solved problems (databases).
These ADRs were some of my highlights, but they’re all worth reading.
### On simple databases
> The data we are planning to store is not so large as to cause a problem for any common RDBMS provider. There won’t be any particular slowdown or read issues associated with reading the data out of the database.
> We can architect around having the database be a single point of failure in our system… If our database system does go completely down, our system will go down as well. Introducing another system doesn’t solve that problem, and it in fact compounds the problem.
**Spoiler:** They went with Postgres
### On choosing programming languages
I confess to pouting a bit after realizing that DIrect File is Java-heavy, which is why I really appreciated this ADR.
In addition to noting that the IRS is already a Java shop, the document lists a number of other technical considerations, many of which aren’t obvious to someone without tax domain experience. For example, Direct File needs a language that works well with WSDL/SOAP because that’s the basis of the electronic filing system it integrates with (IRS Modernized e-File system).
There’s also a lot of Scala in Direct File, an unexpected choice for government. However, Scala has strong support for graph concepts and also runs on the JVM:
> All of the support systems are already in place within the IRS to update and manage Java systems. Except for the code, our systems will appear no different. They will use common Java libraries, common java tools, and require the same sorts of maintenance.
Regarding Python/Node/Ruby, the ADR is tough but fair:
> we don’t want to have to go through open source package management nightmares in a production application
### On deciding against microservices for the data import system
> Philosophically this works, but it adds a lot of failure points for very little gain at our current scale and set up
Also:
> I would like to hear a solid reason why breaking this into multiple applications is worthwhile.
Shout out to the old _Software Architecture: The Hard Parts_ book club at Trello!