{"id":20954435,"url":"https://github.com/devsisters/cine","last_synced_at":"2025-05-14T04:32:47.250Z","repository":{"id":34418657,"uuid":"38350434","full_name":"devsisters/cine","owner":"devsisters","description":"Actor model for golang","archived":false,"fork":false,"pushed_at":"2016-08-23T02:15:41.000Z","size":37,"stargazers_count":31,"open_issues_count":0,"forks_count":4,"subscribers_count":51,"default_branch":"master","last_synced_at":"2025-04-02T13:03:17.765Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devsisters.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-01T04:55:33.000Z","updated_at":"2025-03-22T11:48:19.000Z","dependencies_parsed_at":"2022-09-15T23:12:29.354Z","dependency_job_id":null,"html_url":"https://github.com/devsisters/cine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsisters%2Fcine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsisters%2Fcine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsisters%2Fcine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsisters%2Fcine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devsisters","download_url":"https://codeload.github.com/devsisters/cine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254071335,"owners_count":22009773,"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-19T01:14:41.161Z","updated_at":"2025-05-14T04:32:46.934Z","avatar_url":"https://github.com/devsisters.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Cine\n====\n[![Circle CI](https://circleci.com/gh/devsisters/cine.svg?style=svg)](https://circleci.com/gh/devsisters/cine)\n\nActor model for golang.\n\nThis project aims to implement actor model from erlang to Go. It attempts to\nadd a concept of `Pid` which is universal identifier for actors.\n\nActor supports `Call` which is a syncronous method call. `Cast` which is\nasyncronous method call ignoring all errors.\n\nActors can communicate with other actors using `Call` and `Cast`. Remote actors\nare treated same as local actors.\n\nThis project is originally based on [GLAM](https://github.com/areusch/glam)\n\nUsage\n=====\n\n```go\npackage main\n\nimport (\n\tlog \"github.com/Sirupsen/logrus\"\n\n\t\"github.com/devsisters/cine\"\n)\n\ntype Phonebook struct {\n\tcine.Actor\n\tbook map[string]int\n}\n\nfunc (p *Phonebook) Add(name string, number int) {\n\tp.book[name] = number\n}\n\nfunc (p *Phonebook) Lookup(name string) (int, bool) {\n\tresult, ok := p.book[name]\n\treturn result, ok\n}\n\nfunc (p *Phonebook) Terminate(errReason error) {\n}\n\nfunc main() {\n\tcine.Init(\"127.0.0.1:8000\")\n\tphonebook := Phonebook{cine.Actor{}, make(map[string]int)}\n\tpid := cine.StartActor(\u0026phonebook)\n\n\tcine.Cast(pid, nil, (*Phonebook).Add, \"Jane\", 1234)\n\tret, _ := cine.Call(pid, (*Phonebook).Lookup, \"Jane\")\n\tnumber := ret[0].(int)\n\tlog.Infoln(\"number:\", number)\n\t// Out: number: 1234\n}\n```\n\nPerformance\n===========\n\nPreliminary benchmarks indicate about 5x overhead over vanilla channels. Do not\nuse actors for call heavy operations.\n\n```\nBenchmarkChannel\t3000000\t       583 ns/op\nBenchmarkActor\t  \t500000\t      2850 ns/op\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsisters%2Fcine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevsisters%2Fcine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsisters%2Fcine/lists"}