{"id":21679880,"url":"https://github.com/nasdanika-demos/compute-graph","last_synced_at":"2026-02-23T18:08:42.421Z","repository":{"id":245154437,"uuid":"817417180","full_name":"Nasdanika-Demos/compute-graph","owner":"Nasdanika-Demos","description":"Demo for the medium story \"Executable (computational) graphs \u0026 diagrams\"","archived":false,"fork":false,"pushed_at":"2025-11-18T12:46:20.000Z","size":2849,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-18T15:53:49.432Z","etag":null,"topics":["compute","graph","java"],"latest_commit_sha":null,"homepage":"https://nasdanika-demos.github.io/compute-graph/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nasdanika-Demos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-19T16:56:58.000Z","updated_at":"2025-11-18T12:46:23.000Z","dependencies_parsed_at":"2024-06-20T05:45:40.704Z","dependency_job_id":"28796189-ec8a-4071-91bc-b9807383e8c9","html_url":"https://github.com/Nasdanika-Demos/compute-graph","commit_stats":null,"previous_names":["nasdanika-models/compute-graph","nasdanika-demos/compute-graph"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/Nasdanika-Demos/compute-graph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nasdanika-Demos%2Fcompute-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nasdanika-Demos%2Fcompute-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nasdanika-Demos%2Fcompute-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nasdanika-Demos%2Fcompute-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nasdanika-Demos","download_url":"https://codeload.github.com/Nasdanika-Demos/compute-graph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nasdanika-Demos%2Fcompute-graph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29750024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compute","graph","java"],"created_at":"2024-11-25T15:13:32.015Z","updated_at":"2026-02-23T18:08:42.401Z","avatar_url":"https://github.com/Nasdanika-Demos.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compute Graph\n\nDemo for the [Executable (computational) graphs \u0026 diagrams](https://medium.com/nasdanika/executable-computational-graphs-diagrams-1eeffc80976d) medium article.\n\nThis demo shows two approaches to creating executable software starting from arbitrary [Drawio](https://www.drawio.com/) diagrams which may not follow any notation.\nThe software traces back to the diagram(s) and modifications in the diagrams change how software executes.\n\nThe demo uses For this demo a ``parse-tree.drawio`` diagram is located in the [compute](compute) module/folder.\n\nThe demonstrated approaches may be applied when there is a body of pre-existing diagrams, or when diagram authors (subject matter experts) are not proficient with diagramming notations.\nIn general, a diagram created by a child might be used to create executable programs.\n\n## Direct mapping\n\nWith this approach processors are created for [Drawio diagram](https://docs.nasdanika.org/core/drawio/index.html) elements, which are [graph](https://docs.nasdanika.org/core/graph/index.html) elements.\n\n* [ComputeGraphTests](compute/src/test/java/org/nasdanika/demos/graph/compute/tests/ComputeGraphTests.java) ``testDrawioSyncComputeGraph`` shows how to create graph processors and perform computations using [ReflectiveProcessorFactoryProvider](https://javadoc.io/doc/org.nasdanika.core/graph/latest/org.nasdanika.graph/org/nasdanika/graph/processor/ReflectiveProcessorFactoryProvider.html)\n* ``testDrawioCapabilitySyncComputeGraph`` does the same, but using [CapabilityProcessorFactory](https://javadoc.io/doc/org.nasdanika.core/graph/latest/org.nasdanika.graph/org/nasdanika/graph/processor/CapabilityProcessorFactory.html)\n* Processors and factories can be found in [org.nasdanika.demos.graph.compute.computers.diagram.sync](compute/src/main/java/org/nasdanika/demos/graph/compute/computers/diagram/sync) package\n\n## Mapping to a a model\n\nThis approach uses mapping of a diagram to a semantic model and then providing executability for the semantic model. \n\n### Elicit a domain model (metamodel)\n\nYou may use an existing model, e.g. one of [Nasdanika](https://docs.nasdanika.org/index.html) models, or create a new model.\nA new model may extend existing models.\n\nIn this demo the metamodel is located in the [model](model) module.\n\n### Document the metamodel\n\nCreate metamodel documentation processors. \nMetamodel documentation processors can be found in the [processors/src/main/java/org/nasdanika/demos/graph/compute/processors/ecore](processors/src/main/java/org/nasdanika/demos/graph/compute/processors/ecore) package. \nThey are registered as services in the processor's module [module-info.java](processors/src/main/java/module-info.java).\n\nGenerate [metamodel documentation](https://nasdanika-demos.github.io/compute-graph/)[^not_complete].\nIn this demo documentation is generated with a JUnit test - [TestComputeModelDocGen.java](generator/src/test/java/org/nasdanika/demos/graph/compute/generator/tests/TestComputeModelDocGen.java).\n\n[^not_complete]: Currently the metamodel documentation is incomplete - it was copied from the [familiy metamodel](https://family.models.nasdanika.org/).\n\n### Map the diagram to the model\n\nUse diagram element properties to map them to metamodel classes to create a model. \nThe mapping process is explained in the [Beyond Diagrams](https://leanpub.com/beyond-diagrams) book.\n\n### Create documentation processors\n\nYou may create documentation processors and generate documentation from the loaded model. \nIn this demo documentation processors are located in [processors/src/main/java/org/nasdanika/demos/graph/compute/processors/doc](processors/src/main/java/org/nasdanika/demos/graph/compute/processors/doc) package.\nThe are incomplete. \n\nYou may find complete functional processors in https://github.com/Nasdanika-Models/family/tree/main/processors/src/main/java/org/nasdanika/models/family/processors/doc. \n\n* [An example of a web site generated using processors](https://family.models.nasdanika.org/demos/mapping/)\n* [Generator](https://github.com/Nasdanika-Models/family/blob/main/demos/mapping/src/test/java/org/nasdanika/models/family/demos/mapping/tests/TestFamilyMappingSiteGen.java)\n\nWith documentation generation you may associate detailed information with diagram elements.\n\n### Create compute processors\n\nFollow [examples](compute/src/main/java/org/nasdanika/demos/graph/compute/computers/model/sync) and [reference documentation](https://docs.nasdanika.org/core/graph/index.html#processors-and-processor-factories) to create compute processors.\n\nTo perform computations follow ``testModelSyncComputeGraph`` method in [ComputeGraphTests](compute/src/test/java/org/nasdanika/demos/graph/compute/tests/ComputeGraphTests.java).\n\nCurrently in this demo there is one set of model processors to perform computations synchronously. \nYou may have multiple flavors of processors. \nFor example:\n\n* Synchronous computations\n* Asynchronous computations (CompletionStage)\n* [Reactive](https://projectreactor.io/) computations\n* Code generation - text or, say, [Java model](https://java.models.nasdanika.org/)\n\nPlease note that you don't need to create documentation processors and generate documentation in order to create compute processors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasdanika-demos%2Fcompute-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnasdanika-demos%2Fcompute-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasdanika-demos%2Fcompute-graph/lists"}