Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dasch/minx
A library for creating massively concurrent applications in Ruby
https://github.com/dasch/minx
Last synced: about 18 hours ago
JSON representation
A library for creating massively concurrent applications in Ruby
- Host: GitHub
- URL: https://github.com/dasch/minx
- Owner: dasch
- License: mit
- Created: 2010-02-07T17:51:33.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2012-10-29T09:29:17.000Z (about 12 years ago)
- Last Synced: 2024-04-27T01:02:18.596Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 230 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Minx
====Massive and pervasive concurrency with Minx!
Minx uses the powerful concurrency primitives outlined by Tony Hoare in his
famous book "Communicating Sequential Processes". This library was written
as part of [my bachelor thesis](http://cl.ly/2E2s471i122S3I1s3W30).Usage
-----Minx lets you easily create concurrent programs using the notion of *processes*
and *channels*.```ruby
# Very contrived example...
chan = Minx.channelMinx.spawn { chan.write("Hello, World!") }
Minx.spawn { puts chan.read }
```These primitives, although simple, are incredibly powerful when composing highly
concurrent applications. When reading from or writing to a channel, a process
yields execution -- and thus blocks until another process also participates in
the communication. An example of when this would be useful is a simple network
server:```ruby
# Create a channel for the incoming requests.
requests = Minx.channel# Spawn 10 workers.
10.times do
Minx.spawn do
requests.each {|request| handle_request(request) }
end
end
```In the near future, evented IO will be implemented, allowing for highly
performant network and file applications.Documentation
-------------See [the full documentation](http://rubydoc.info/github/dasch/minx/master/frames).
Copyright
---------Copyright (c) 2010 Daniel Schierbeck (@dasch). See {file:LICENSE} for details.