{"id":20743057,"url":"https://github.com/aimingoo/sandpiper","last_synced_at":"2025-08-01T08:38:06.135Z","repository":{"id":89039506,"uuid":"46169313","full_name":"aimingoo/sandpiper","owner":"aimingoo","description":"Sandpiper is implement of N4C architecture in NodeJS.","archived":false,"fork":false,"pushed_at":"2015-12-03T23:21:39.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-15T11:55:49.000Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aimingoo.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":"2015-11-14T09:43:26.000Z","updated_at":"2015-11-14T09:44:16.000Z","dependencies_parsed_at":"2023-03-09T22:30:30.127Z","dependency_job_id":null,"html_url":"https://github.com/aimingoo/sandpiper","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":0.4,"last_synced_commit":"153118f3567a0804c89b2e72954d22d236b83597"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/aimingoo/sandpiper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimingoo%2Fsandpiper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimingoo%2Fsandpiper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimingoo%2Fsandpiper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimingoo%2Fsandpiper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aimingoo","download_url":"https://codeload.github.com/aimingoo/sandpiper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimingoo%2Fsandpiper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261937020,"owners_count":23232843,"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":[],"created_at":"2024-11-17T07:08:54.783Z","updated_at":"2025-06-25T19:03:32.578Z","avatar_url":"https://github.com/aimingoo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sandpiper\n\nsandpiper is implement of N4C architecture in NodeJS.\n\nabout N4C architecture  @see [n4c project](https://github.com/aimingoo/n4c).\n\n### Table of Contents\n\n* [install](#install)\n* [run as resource service/center](#run-as-resource-servicecenter)\n* [import and usage](#import-and-usage)\n* [testcase](#testcase)\n* [run testcase of interfaces](#run-testcase-of-interfaces)\n* [history](#history)\n\n# install\n\ninstall and start etcd service first(example in macosx):\n\n``` bash\n\u003e brew install etcd\n\u003e etcd\n```\n\nand install sandpiper by npm+nodejs\n\n\u003e npm install sandpiper\n\n# run as resource service/center\n\n\u003e npm start\n\n# import and usage\n\n\u003e @see $(sandpiper)/sandpiper.js\n\n``` javascript\nvar pedt = require('sandpiper');\npedt.run(...)\n```\n\nthe sandpiper run at n4c unlimited+dispatcher node.\n\n# testcase\n\ntry these:\n\n``` bash\n\u003e # start etcd fist\n\n\u003e # run sandpiper as resource service\n\u003e npm start\n\n\u003e # run sandpiper base test in a new shell\n\u003e npm test\n\n\u003e # or, run full testcase in a new shell\n\u003e node testcase/t_tasks.js\n[INFO] done.\nhi\nthe worker node upgrade as dispatcher.\n{ x: 'ok' }\nthe worker node unlimited.\nthe worker node initialized.\n[INFO] distribution scope: \"sandpiper:/com.wandoujia.n4c/sandpiper/nodes:*\"\n[INFO] distribution taskId: \"task:c2eb2597e461aa3aa0e472f52e92fe0b\"\n[INFO] daemon arguments: { a: 3, b: 4 }\n[INFO] arguments for loacalTask:  { p1: 'new value' }\n{ run_task: { p1: 'value from remote', info: 'HELLO' } }\n[INFO] arguments for loacalTask:  { p1: 'new value' }\n[INFO] arguments for loacalTask:  { p1: 'new value' }\n[INFO] recude result: [ { a: '1', b: '2', p1: 'new value', info: 'HELLO' } ]\ntrue\n[ { x: '100', y: '200', info: 'HELLO', p1: 'default value' } ]\n```\n\n# run testcase of interfaces\n\nand then, try next:\n\n``` bash\n\u003e bash testcase/t_interfaces.sh\n===============================================================\n:: registed items in init_worker_node.js\n/com.wandoujia.n4c/sandpiper/nodes/groupOwner\n/com.wandoujia.n4c/sandpiper/nodes/127.0.0.1:8032\n/com.wandoujia.n4c/sandpiper/nodes/.127.0.0.1:8032\n:: registed nodes\n/com.wandoujia.n4c/sandpiper/nodes/.127.0.0.1:8032\n:: execute_task interfaces\nhttp://127.0.0.1:8032/sandpiper/execute_\n:: heartbeat in init_worker_node.js\n1447493107586\n:: execute_task in init_unlimit_node.js\n{\"info\":\"HELLO\",\"p1\":\"default value\"}\n:: resource query in init_resource_center.js\n[\"http://127.0.0.1:8032/sandpiper/execute_\"]\n:: resource subscribe in init_resource_center.js\n[\"http://127.0.0.1:8032/sandpiper/execute_\"]\n:: resource subscribe at instance 2\n[\"http://127.0.0.1:8032/sandpiper/execute_\"]\n===============================================================\nDone.\n```\n\n# history\n\n``` text\n2015.12.04  v1.0.1 released.\n\t- minor update.\n2015.11.14\tv1.0.0 released.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faimingoo%2Fsandpiper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faimingoo%2Fsandpiper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faimingoo%2Fsandpiper/lists"}