https://github.com/austinksmith/1-billion-row-challenge
The 1 billion row challenge implemented in node.js
https://github.com/austinksmith/1-billion-row-challenge
Last synced: 10 months ago
JSON representation
The 1 billion row challenge implemented in node.js
- Host: GitHub
- URL: https://github.com/austinksmith/1-billion-row-challenge
- Owner: austinksmith
- License: artistic-2.0
- Created: 2024-06-20T17:28:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-24T13:49:20.000Z (over 1 year ago)
- Last Synced: 2025-01-15T20:19:01.369Z (12 months ago)
- Language: JavaScript
- Size: 247 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hamsters-Socket
**Author**: Austin K. Smith
**Website**: [asmithdev.com](http://www.asmithdev.com)
**Description**: The 1 Billion Row Challenge Implemented in Node.js using Hamsters.js and Ruby and Python
**License**: Artistic License 2.0
# Node.js Setup
* Clone the repository
* Run `npm install`
* Run `npm start`
# Ruby Setup
* Clone the repository
* Install [ruby using official site](https://www.ruby-lang.org/en/documentation/installation/)
* `gem install concurrent-ruby`
* Run `npm run ruby`
# JRuby Setup
* Clone the repository
* Install [jruby using official site](https://www.jruby.org/)
* `gem install concurrent-ruby`
* Run `npm run jruby`
# Python Setup
* Clone the repository
* Install python3 using your preferred method
* Run `python3 challenge.py`
# Considerations
Both the jRuby and Ruby implementation use the exact same file and logic, both using the concurrent-ruby gem for threading, unfortunately in normal Ruby we have
a global interpreter lock that prevents multiple threads from executing at a time, this means our ruby implmentation is extremely slow. Switching to running the file with jRuby
eliminates this limitation allowing us to fully use our cpu threads and have multiple threads executing logic at at time.