{"id":21058674,"url":"https://github.com/facaiy/dag-lite","last_synced_at":"2025-07-10T00:05:22.005Z","repository":{"id":57733184,"uuid":"90832917","full_name":"facaiy/DAG-lite","owner":"facaiy","description":"An experimental DAG library with functional programming technology.","archived":false,"fork":false,"pushed_at":"2017-06-24T01:48:07.000Z","size":38,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-20T19:46:25.431Z","etag":null,"topics":["dag","functional-programming","scala-library"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/facaiy.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}},"created_at":"2017-05-10T07:17:52.000Z","updated_at":"2019-11-21T12:45:17.000Z","dependencies_parsed_at":"2022-09-26T22:30:41.884Z","dependency_job_id":null,"html_url":"https://github.com/facaiy/DAG-lite","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facaiy%2FDAG-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facaiy%2FDAG-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facaiy%2FDAG-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facaiy%2FDAG-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/facaiy","download_url":"https://codeload.github.com/facaiy/DAG-lite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243503330,"owners_count":20301228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dag","functional-programming","scala-library"],"created_at":"2024-11-19T17:08:49.100Z","updated_at":"2025-03-14T00:29:58.484Z","avatar_url":"https://github.com/facaiy.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DAG-lite\n[\u003cimg src=\"https://img.shields.io/travis/facaiy/DAG-lite.svg\"/\u003e](https://travis-ci.org/facaiy/DAG-lite)\n[\u003cimg src=\"https://img.shields.io/maven-central/v/io.github.facaiy/DAG-lite.svg\"\u003e](http://search.maven.org/#search|ga|1|g:\"io.github.facaiy\"%20AND%20a:\"DAG-lite\")\n\nAn experimental DAG library with functional programming technology.\n\nfeatures:\n+ lazy evaluation.\n+ concurrent computing.\n\n\n### Install\n\n1. maven\n   ```\n   \u003cdependency\u003e\n     \u003cgroupId\u003eio.github.facaiy\u003c/groupId\u003e\n     \u003cartifactId\u003eDAG-lite\u003c/artifactId\u003e\n     \u003cversion\u003e0.2.0\u003c/version\u003e\n   \u003c/dependency\u003e\n   ```\n\n2. sbt:\n   The configuration should be right, while it need to be verified.\n   ```\n   \"io.github.facaiy\" %% \"DAG-lite\" % \"0.2.0\"\n   ```\n\nNote: the 0.2.x release is only tested on scala 2.11.8 *with JDK 8* on Linux and Mac.\n\n\n### Usage\n\n1. A simple example:\n   ```scala\n     def read[A](): A\n     def process1[A](a: A): A\n     def process2[A](as: Seq[A]): A\n     def write1[A](a: A): Unit\n     def write2[A](as: Seq[A]): Unit\n\n     // create nodes\n     import io.github.facaiy.dag.core._\n\n     // InputNode(uid, function)\n     val inputNode1 = InputNode(\"input1\", read)\n     val inputNode2 = InputNode(\"input2\", read)\n     // ProcessNode(uid, dependencyUids, function)\n     val internalNode1 = ProcessNode(\"process1\", \"input1\", process1)\n     val internalNode2 = ProcessNode(\"process2\", Seq(\"input1\", \"input2\"), process2)\n     // OutputNode(uid, dependencyUids, function)\n     val outputNode1 = OutputNode(\"output1\", \"process1\", write1)\n     val outputNode2 = OutputNode(\"output2\", Seq(\"process1\", \"process2\"), write2)\n\n     val nodes = Seq(inputNode, internalNode1, internalNode2, outputNode1, outputNode2)\n\n     // build network\n     import io.github.facaiy.dag.serial.Implicits._\n\n     val lm = nodes.toLazyNetwork\n     /**\n      * input1 ---\u003e process1 ---\u003e output1\n      *         |             |\n      *         v             v\n      * input2 ---\u003e process2 ---\u003e output2\n      */\n\n     // run if needed\n     lm(\"output1\").getValue\n     lm(\"output2\").getValue\n   ```\n\n2. Experimental: to run nodes in parallel.\n   ```scala\n     // build network\n     import io.github.facaiy.dag.parallel.Implicits._\n\n     val pm = nodes.toLazyNetwork\n     /**\n      * input1 ---\u003e process1 ---\u003e output1\n      *         |             |\n      *         v             v\n      * input2 ---\u003e process2 ---\u003e output2\n      */\n\n     // run if needed\n     pm(\"output1\").getValue    // wait forever.\n\n     import scala.concurrent.duration._\n     pm(\"output2\").getValue(10 seconds)  // wait 10 seconds.\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacaiy%2Fdag-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffacaiy%2Fdag-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacaiy%2Fdag-lite/lists"}