Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Simple, efficient, and reliable messaging queue for Ruby.
Falqon is a simple messaging queue implementation, backed by the in-memory Redis key-value store. It exposes a simple Ruby API to send and receive messages between different processes, between threads in the same process, or even fibers in the same thread. It is perfect when you require a lightweight solution for processing messages, but don't want to deal with the complexity of a full-blown message queue like RabbitMQ or Kafka.
See the documentation for more information on how to use Falqon in your application.
Falqon offers an elegant solution for messaging queues in Ruby.
Falqon requires a Redis 6+ server to be available. Use the docker-compose.yml file to quickly spin up a Redis server.
Add this line to your application's Gemfile:
gem "falqon"
And then execute:
$ bundle install
Or install it yourself as:
$ gem install falqon
The default configuration works out of the box with the provided docker-compose.yml
file.
See configuration if you want to adjust the configuration.
require "falqon"
queue = Falqon::Queue.new("my_queue")
# Push a message to the queue
queue.push("Hello, world!", "Hello, world again!")
# Pop a message from the queue (return style)
puts queue.pop # => "Hello, world!"
queue.empty? # => false
queue.peek # => "Hello, world again!"
# Pop a message from the queue (block style)
queue.pop do |message|
puts message # => "Hello, world again!"
# Raising a Falqon::Error exception will cause the message to be requeued
raise Falqon::Error, "Something went wrong"
end
queue.empty? # => false
puts queue.pop # => "Hello, world again!"
queue.empty? # => true
queue.peek # => nil
For more comprehensive examples, see the examples directory in the repository.
A queue is identified with a name, which is used as a key prefix. Queues are stored in Redis as a list of incrementing integers representing unique message identifiers. The messages itself are stored in Redis as strings.
The following Redis keys are used to store data.
[{prefix}:]queues
: set of queue names
[{prefix}/]{name}
: list of message identifiers on the (pending) queue
[{prefix}/]{name}:id
: message identifier sequence
[{prefix}/]{name}:processing
: list of message identifiers being processed
[{prefix}/]{name}:scheduled
: list of message identifiers scheduled to retry
[{prefix}/]{name}:dead
: list of message identifiers that have been discarded
[{prefix}/]{name}:data:{id}
: message data for identifier {id}
[{prefix}/]{name}:metadata
: metadata for the queue
[{prefix}/]{name}:metadata:{id}
: metadata for identifier {id}
# Run test suite
bundle exec rspec
To release a new version, update the version number in lib/falqon/version.rb
, update the changelog, commit the files and create a git tag starting with v
, and push it to the repository.
Github Actions will automatically run the test suite, build the .gem
file and push it to rubygems.org.
The documentation in docs/
is automatically built by YARD and pushed to docs.falqon.dev on every push to the main
branch.
Locally, you can build the documentation using the following commands:
rake yard
In development, you can start a local server to preview the documentation:
yard server --reload
Bug reports and pull requests are welcome on GitHub at https://github.com/floriandejonckheere/falqon.
The software is available as open source under the terms of the LGPL-3.0 License.
FAQs
Unknown package
We found that falqon demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.