The layout engine that supercharges D2
What does it mean to be designed for software architecture diagrams?
- Orthogonal pathing is more appropriate for software architecture diagrams than squiggly lines.
- Shape placements minimize distance to each other in an unconstrained way.
- Containers (shape nested in another shape) is a first-class consideration at every stage of the layout, as it commonly appears in software architecture diagrams.
- Clusters (e.g. multiple shapes connected to one), trees, and hierarchies are automatically identified based on the structure of the diagram, and laid out specifically as subsections of the diagram. This means you can blend hierarchical and non-hierarchical structures in the same diagram, a frequent occurence.
- Icons are first-class, and are placed dynamically to not interfere with labels or other obstructions.
These are all in contrast to popular diagram layout engines used in other tools. In those, either the whole diagram is hierarchical or none of it is, which is rarely what a software architecture diagram looks like. Connection paths are unnaturally squiggly. Containers are an afterthought or shim -- as a result, the layouts become suboptimal when containers are part of the equation.
TALA also has a number of optimizations that are not specific to software architecture diagrams. For example, it looks at label positioning, and will try to place labels somewhere where it doesn't clash into another label or another shape border or line.
You can see some samples here. To compare the results of TALA versus other layout algorithms, visit https://text-to-diagram.com.
TALA is constantly improving -- getting faster, producing better layouts, and supporting more types of layouts. Expect frequent updates/releases. If you find any bugs or have feature requests, please file them as issues on Github.
Usage
TALA powers all diagrams on D2 Studio. If you're just using D2 Studio, you're already using TALA. The rest of this section applies to its usage in diagramming with D2 outside D2 Studio (e.g. offline, locally).
You can install TALA by following instructions on Github. It's free to try and evaluate, but you'll need a license key that comes with your Terrastruct subscription to run it without restrictions.
Terrastruct primarily monetizes by charging income-generating, for-profit businesses. If that is not you, e.g. student, researcher, non-profit, open-source maintainer, etc, please email us for a discounted license ($5/month) at info@terrastruct.com using an email that confirms affiliation.
Licenses
There are two types of licenses, Personal and Enterprise. There are three differences:
- Usage. Enterprise licenses are allowed to run TALA on servers such as CI/CD environments. Personal licenses are for individual desktop/machine usage.
- IP assignment. Diagrams made on a Personal license belong to the creator. Diagrams made on an Enterprise license is automatically assigned IP to the purchasing entity.
- Enterprise licenses can be revoked by the company. This is used for when an employee departs and should no longer have access to company-internal diagrams and assets.
To be clear, these licenses only apply to usage of D2 Studio and TALA. D2 itself is FOSS (free and open-source software), governed by a different, open license (Mozilla Public License 2.0).
Yours forever after 12 months
When your subscription ends, you will no longer have access to updates or D2 Studio. But D2 will always live on in open-source as a growing go-to language for software teams to make diagrams, and if your subscription has totalled 12 months, your latest copy of TALA when your subscription ended is yours to use forever. Standalone personal licenses qualify for this.
Terms and privacy policy: The complete documents can be found here: Terms of Service and Privacy Policy. You must read, understand, and agree to each to use D2 Studio and/or TALA.