Live data from Hacker News

Diagram as Code

diagrams.mingrammer.com

11–20 of 77 posts

Re: Diagram as Code

#11
post #8
post #6

Earlier quoted context omitted.

I’d prefer to avoid text blob artifacts if this was being used at work with plenty of text blobs to babysit already IMO the end days for TF and YAML engineering are close, at least for new work It’s all HTTP APIs. Build a web UX and store the state in a DB. SRE/ops people ...at work just use the methods everyone else does Unless the company still has hardware, cloud ops/SRE is just making their lives harder to be dif…

> It’s all HTTP APIs. Build a web UX and store the state in a DB. Please no. Don't make running a stateful service a requirement for tooling people need to use when the world is on fire. Or needs to load 40Mb of JS to rebuild a deployment, and works only on Chrome 46.012.2039465. Ops/SRE/DevOps/SysAdmin/SysOps/etc are different, and have optimised things to reduce the amount of dependancies.

What's the alternative you'd recommend?

Re: Diagram as Code

#12
post #11
post #8

Earlier quoted context omitted.

> It’s all HTTP APIs. Build a web UX and store the state in a DB. Please no. Don't make running a stateful service a requirement for tooling people need to use when the world is on fire. Or needs to load 40Mb of JS to rebuild a deployment, and works only on Chrome 46.012.2039465. Ops/SRE/DevOps/SysAdmin/SysOps/etc are different, and have optimised things to reduce the amount of dependancies.

What's the alternative you'd recommend?

The explicit, declarative model, using tools that don't need a ton of other things deployed.

Ideally the same tool can be run locally and in CI (with the same invocation commands) so that an Op can run tests locally, and even see the potential diff, before putting it up for review.

The advantage of this approach is you can see a diff, and use standard tooling like git / pr reviews to approve changes in day to day, and when the world is on fire, someone can break the glass and run it locally.

Never underestimate the value of peer review on a change to the infra - there is a reason things like ITIL exist, and we should learn from them.

Re: Diagram as Code

#13

When I first read this I thought this did the inverse of what it actually does. Let you interactively draw out diagrams then it would generate the boilerplate code to achieve that diagram.

I have the exact seem disappointment ;(. As we evolve towards a world were low code will become a part of everday tools, diagram generating code is to me a good answer, at least on a scaffolding level...

Re: Diagram as Code

#14

I was hoping this tool would support directionality/sequencing of nodes. A tool I've used in the past is SequenceDiagram.org for diagraming a sequence of service calls. While a bit old-school, it's good for its purpose. I've also used Whimsical[0] to model flows and graph-like relationships. It's got the added benefit of allowing multiple users to view and edit the same document. Whimsical is still my favorite tool r…

Visually Whimsical looks absolutely stunning... Wow

Re: Diagram as Code

#15
Why do we need a tool to draw its architecture and we don't have a tool which auto discover the architecture and auto updates it and draw it form here ?

That will shrink the gap between the current architecture and the current diagram that almost always exists

Re: Diagram as Code

#16
post #10

I like this a lot - trying to store diagrams that look good, without sticking a visio file into a git repo is something I keep an eye out for.

You may also find value in diagram.codes (I'm the author)

It's focused on non technical users so the syntax will always be very simple (at the cost of flexibility but that's on purpose).

Re: Diagram as Code

#17
This looks really neat! Is it possible to have embedded diagrams. For example, Gitlab lets you embed a PlantUML[1] diagram in any Markdown or ADoc file using a proxy server. This makes it really easy to write and serve documentation.

Personally, I'm a fan of PlantUML. Having an svg served in a browser that has labels linking directly to the relevant entity (code, resource etc) is a huge plus for new hire onboarding.

1: https://plantuml.com/

Re: Diagram as Code

#18
This is cool! I was hoping it would look something like:

‘’’ import diagrams calc_d = diagrams.new_diagram(“calculator_123”)

calc_d.Datum("SuperNumber") class SuperNumber(int): pass

@calc_d.Service(“Calculator”, “takes numbers and operations and operates”) class Calculator(object): @calc_d.Endpoint("Add", calls=["Increment"], main_data={"b": "SuperNumber}) def add(self, a, b: SuperNumber): out = a for i in range(b): calc_d.multi(calls=["Increment"]) out = self.increment(out)

  @calc_d.Function("Increment")
  def increment(self, a):
    return a+1
def integration_test(): calc_d.instantiate("Calculator") calc = Calculator() ... ‘’’

EDIT: Dear dang and YC Hacker News, I would love to create code blocks using surrounding triple quotes..

Re: Diagram as Code

#19
post #15

Why do we need a tool to draw its architecture and we don't have a tool which auto discover the architecture and auto updates it and draw it form here ? That will shrink the gap between the current architecture and the current diagram that almost always exists

xloudcraft.com auto-generates and updates from live account and gives you info like cost etc.

Looks really.i.ptessive

Re: Diagram as Code

#20
post #15

Why do we need a tool to draw its architecture and we don't have a tool which auto discover the architecture and auto updates it and draw it form here ? That will shrink the gap between the current architecture and the current diagram that almost always exists

xloudcraft.com auto-generates and updates from live account and gives you info like cost etc. Looks really.i.ptessive

cloudcraft.com

Stupid mobile keyboards...

Post reply on HN