{"id":17033507,"url":"https://github.com/morgul/nolang","last_synced_at":"2026-05-09T03:38:38.083Z","repository":{"id":8815080,"uuid":"10512907","full_name":"Morgul/nolang","owner":"Morgul","description":"An actor style concurrency framework for Node.js that implements a large percentage of Erlang's OTP framework.","archived":false,"fork":false,"pushed_at":"2013-06-06T20:16:04.000Z","size":102,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-11T06:35:26.970Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Morgul.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":"2013-06-05T21:12:30.000Z","updated_at":"2023-01-30T10:01:54.000Z","dependencies_parsed_at":"2022-09-22T13:25:06.827Z","dependency_job_id":null,"html_url":"https://github.com/Morgul/nolang","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Morgul/nolang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morgul%2Fnolang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morgul%2Fnolang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morgul%2Fnolang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morgul%2Fnolang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Morgul","download_url":"https://codeload.github.com/Morgul/nolang/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morgul%2Fnolang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32806488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-14T08:35:02.439Z","updated_at":"2026-05-09T03:38:38.068Z","avatar_url":"https://github.com/Morgul.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"-----\n\nUnfortunately, the current state of things is such that the library I'm using has some fundamental issues that make it\nill-suited for this use-case. This project could totally be a reality, but it will involve modifying the threading\nlibrary, and doing some work in C. While I can do that, I'm not currently working on that at the moment. I'll update\nthis notice if I pick this up again.\n\n-----\n\n# Nolang\n\nWhat is Nolang? Well, it's a portmanteau of 'node' and 'erlang'. It's also _an actor style concurrency framework for\nNode.js that implements a large percentage of Erlang's OTP framework_.\n\n## ...What?\n\nErlang has a beautiful concurency model. You can create a lightweight process, called a `pid`, which will execute the\nfunction you create it with. While that's neat, the real power comes in the ability to pass messages to the pid, and have\nit execute code based on those messages.\n\nNo state is shared between pids, except via message passing. This makes them much easier to work with than your standard\nthreading model. Pids are the backbone that most of Erlang's impressive level of concurrency is built upon.\n\nPids aren't the whole store, however. Erlang's OTP project also implements Supervisors (which monitor pids, and can take\naction if they die), `gen_server` (a module that simplifies building pids that are long running, listening to lots of\nmessages), `gen_fsm` (a module similiar to `gen_server`, except it implements a finite state machine), and `gen_event` (a\nmodule similiar to `gen_server`, but it is more focused on emitting events to a listeners based on messages coming in).\n\nNolang attempts to borrow the pieces of this that make sense, and build them ontop of a threading library comparitble with\nnode.js; basically taking the strengths of Erlang and the strengths of Node, and combining them.\n\n## But node doesn't need threads!\n\nI direct you to the wonderful description from the [threads-a-gogo](https://github.com/xk/node-threads-a-gogo) library:\n\n\u003e [Node.js](http://nodejs.org) is the most [awesome, cute and super-sexy](http://javascriptology.com/threads_a_gogo/sexy.jpg) piece of free, open source software.\n\u003e\n\u003e Its event loop can spin as fast and smooth as a turbo, and roughly speaking, **the faster it spins, the more power it delivers**. That's why [@ryah](http://twitter.com/ryah) took great care to ensure that no -possibly slow- I/O operations could ever block it: a pool of background threads (thanks to [Marc Lehmann's libeio library](http://software.schmorp.de/pkg/libeio.html)) handle any blocking I/O calls in the background, in parallel.\n\u003e\n\u003e ...\n\u003e\n\u003e The \"can't block the event loop\" problem is inherent to Node's evented model. No matter how many Node processes you have running as a [Node-cluster](http://blog.nodejs.org/2011/10/04/an-easy-way-to-build-scalable-network-programs/), it won't solve its issues with CPU-bound tasks.\n\u003e\n\u003e Launch a cluster of N Nodes running the example B (`quickIntro_blocking.js`) above, and all you'll get is N -instead of one- Nodes with their event loops blocked and showing a sluggish performance.\n\nFor this exact reason, I wrote Nolang, building ontop of [threads-a-gogo](https://github.com/xk/node-threads-a-gogo).\nUsing a paradigm that, IMHO, is the simplest concurency model I've ever worked with seemed like a no-brainer. At the same\ntime, it allowed me to implement the supervisor functionality of Erlang, something that has proven itself over decades to\nprovide a level of stability that no other systems have ever been able to achieve.\n\nNolang makes Node.js a stable, high-performance, multi-core beast that _just won't go down_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorgul%2Fnolang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorgul%2Fnolang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorgul%2Fnolang/lists"}