fc4-framework icon indicating copy to clipboard operation
fc4-framework copied to clipboard

Local, offline, in-process rendering

Open aviflax opened this issue 8 years ago • 6 comments

i.e. not using Structurizr Express, nor Structurizr, nor any other service/app accessed via a network.

Ideally, fully in-process in fc4, i.e. without even having to spawn a child process.

aviflax avatar Feb 06 '18 23:02 aviflax

Migrated to JIRA as ENG-1457.

aviflax avatar May 16 '18 20:05 aviflax

Reopening because I’m no longer using JIRA to track work on this project; it’s important to me to work on this out in the open, so I’m trying to track all work using GitHub Issues.

aviflax avatar Jan 07 '20 00:01 aviflax

I recently learned about dali via @AndreaCrotti.

dali is:

a Clojure library for representing, exporting and manipulating the SVG graphics format.

It looks quite promising. It might serve as a good foundation on which to build our own renderer. TBD.

aviflax avatar Jan 07 '20 18:01 aviflax

Here’s another reason for doing this:

fc4-deps-with-highlight

That’s the dependency tree of the project as of today, created with tools.deps.graph. I’ve manually highlighted clj-chrome-devtools — the library we use to launch Chrome in headless mode and control it, so that we can load Structurizr Express and use it to render diagrams — and all of its dependencies.

It’s immediately obvious that this dep is bloating the project. Once we replace it with a local renderer, there’s a good chance our dependency tree will shrink significantly. There’s a good chance that would lead to our distribution packages being smaller (faster to download) and to the tool being faster to start up — it could end up having tens of thousands fewer classes to initialize.

aviflax avatar Jan 13 '20 17:01 aviflax

OTOH, maybe not. Just to see the difference, I tried temporarily removing the libraries we use for our current rendering path and replacing them with dali (see above) — which yielded this:

fc4-deps-with-dali

Also not great.

That said, there are some things in there we might be able to excise, such as enlive and its deps, and maybe we could replace the prismatic/plumatic schemata with Clojure.spec schemata. (We might have to fork dali to do so, but I’m already getting ahead of myself here.)

aviflax avatar Jan 13 '20 17:01 aviflax

This just became significantly higher priority, due to the news in #268 that Structurizr Express (SE) is being discontinued on 30 June of this year — 125 days from today.

I’m pretty sure I can make this happen before then. I’ve been working on it in a local branch that uses dali and it’s going well.

aviflax avatar Feb 26 '20 20:02 aviflax