{"id":13562060,"url":"https://github.com/gleam-lang/otp","last_synced_at":"2025-04-05T05:09:04.456Z","repository":{"id":40586333,"uuid":"185173770","full_name":"gleam-lang/otp","owner":"gleam-lang","description":"📫 Fault tolerant multicore programs with actors","archived":false,"fork":false,"pushed_at":"2024-04-05T17:50:48.000Z","size":323,"stargazers_count":362,"open_issues_count":6,"forks_count":36,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-05-16T00:24:48.160Z","etag":null,"topics":["actors","erlang","gleam","otp"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/gleam_otp/","language":"Gleam","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/gleam-lang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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},"funding":{"github":["lpil"],"liberapay":"gleam"}},"created_at":"2019-05-06T10:19:59.000Z","updated_at":"2024-05-20T14:24:22.610Z","dependencies_parsed_at":"2024-01-17T16:08:05.500Z","dependency_job_id":"707dd9ca-f131-47ff-b028-0ff0eb765fd3","html_url":"https://github.com/gleam-lang/otp","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleam-lang%2Fotp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleam-lang%2Fotp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleam-lang%2Fotp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleam-lang%2Fotp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gleam-lang","download_url":"https://codeload.github.com/gleam-lang/otp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256078,"owners_count":20909240,"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":["actors","erlang","gleam","otp"],"created_at":"2024-08-01T13:01:04.100Z","updated_at":"2025-04-05T05:09:04.439Z","avatar_url":"https://github.com/gleam-lang.png","language":"Gleam","funding_links":["https://github.com/sponsors/lpil","https://liberapay.com/gleam"],"categories":["Gleam","Packages"],"sub_categories":["Erlang and OTP"],"readme":"# Gleam OTP\n\n\u003ca href=\"https://github.com/gleam-lang/otp/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/gleam-lang/otp\" alt=\"GitHub release\"\u003e\u003c/a\u003e\n\u003ca href=\"https://discord.gg/Fm8Pwmy\"\u003e\u003cimg src=\"https://img.shields.io/discord/768594524158427167?color=blue\" alt=\"Discord chat\"\u003e\u003c/a\u003e\n![CI](https://github.com/gleam-lang/otp/workflows/test/badge.svg?branch=main)\n\nA Gleam library for building fault tolerant multi-core programs using the\nactor model. It is compatible with Erlang's OTP framework.\n\nGleam’s actor system is built with a few primary goals:\n\n- Full type safety of actors and messages.\n- Be compatible with Erlang’s OTP actor framework.\n- Provide fault tolerance and self-healing through supervisors.\n- Have equivalent performance to Erlang’s OTP.\n\nThis library documents its abstractions and functionality, but you may also wish\nto read the documentation or other material on Erlang’s OTP framework to get a\nfuller understanding of OTP, the problems it solves, and and the motivations for\nits design.\n\nNot all Erlang/OTP functionality is included in this library. Some is not\npossible to represent in a type safe way, so it is not included. Other features\nare still in development, such as further process supervision strategies.\n\n## Usage\n\nAdd this library to your Gleam project.\n\n```shell\ngleam add gleam_otp\n```\n\n## Actor hierarchy\n\nThis library provides several different types of actor that can be used in\nGleam programs.\n\n### Process\n\nThe process is the lowest level building block of OTP, all other actors are\nbuilt on top of processes either directly or indirectly. Typically this\nabstraction would not be used very often in Gleam applications, favour\nother actor types that provide more functionality.\n\nGleam's [process](https://hexdocs.pm/gleam_erlang/gleam/erlang/process.html) module is defined in the `gleam_erlang` library.\n\n### Actor\n\nThe `actor` is the most commonly used process type in Gleam and serves as a good\nbuilding block for other abstractions. Like Erlang's `gen_server` it handles\nOTP's system messages automatically to enable OTP's debugging and tracing\nfunctionality.\n\n[Documentation](https://hexdocs.pm/gleam_otp/gleam/otp/actor.html)\n\n### Task\n\nA task is a kind of process that computes a value and then sends the result back\nto its parent. Commonly multiple tasks are used to compute multiple things at\nonce.\n\n- [gleam/otp/task](https://hexdocs.pm/gleam_otp/gleam/otp/task.html)\n  documentation.\n\n### Supervisor\n\nSupervisors is a process that starts and then supervises a group of processes,\nrestarting them if they crash. Supervisors can start other supervisors,\nresulting in a hierarchical process structure called a supervision tree,\nproviding fault tolerance to a Gleam application.\n\n- [gleam/otp/static_supervisor](https://hexdocs.pm/gleam_otp/gleam/otp/static_supervisor.html) documentation.\n- [gleam/otp/supervisor](https://hexdocs.pm/gleam_otp/gleam/otp/supervisor.html)\n  documentation.\n\n## Limitations and known issues\n\nThis library does not currently replicate all of the Erlang/OTP functionality.\nSome limitations include:\n\n- There is no support for named processes. They are untyped global mutable\n  variables which may be uninitialized, more research is needed to find a\n  suitable type safe alternative.\n- There are relatively few actor abstractions provided by this library. More\n  will be added in the future.\n- Actors do not yet support all OTP system messages. Unsupported messages are\n  dropped.\n- Supervisors do not yet support different shutdown periods per child. In\n  practice this means that children that are supervisors do not get an\n  unlimited amount of time to shut down, as is expected in Erlang or Elixir.\n- This library has not seen much testing compared to the Erlang OTP\n  libraries, both in terms of unit tests and real world testing in\n  applications.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgleam-lang%2Fotp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgleam-lang%2Fotp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgleam-lang%2Fotp/lists"}