
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
= AsyncRecord
One of the greatest things about running on an event-based server is that you can get accelerated performance in database access.
Usually there is a lot of time spent blocking for a database query to return. In AsyncRecord, your queries don't block the request. You will receive a callback once the query has completed. This has major performance implications.
NOTE: Even though your connections are non-blocking to the database server, the database server is still blocking when accessing IO (disk/memory).
To use AsyncRecord, do the following:
Install the Gem:
sudo gem install async_record
Setup async_record:
require 'async_record' conn = AsyncRecord::Connection::MySQL.new(:host => "127.0.0.1", :port => 3306, :user => "root", :database => "database") conn.connect
Define a model:
class User < AsyncRecord::Base set_table_name "users" end
=== Controller
These examples are for the Fastr web framework.
In your controller, try the following (remember to put the following in a deferred response):
=== Get all the rows in the table:
User.all(:limit => 256) do |users| users.each do |user| response.send_data("#{user.username}\n") end response.succeed end
=== Find a row by ID
User.find(1) do |user| if user.nil? response.send_data("User not found") else response.send_data("User: #{user.username}\n") end response.succeed end
=== Get the count of rows in the table
User.count do |count| response.send_data("Count: #{count}") response.succeed end
=== Run a custom query
User.query("select username from users") do |results| response.send_data("Results: #{results.inspect}") response.succeed end
WARNING: AsyncRecord is under heavy development, but its pretty cool :).
FAQs
Unknown package
We found that async_record demonstrated a not healthy version release cadence and project activity because the last version was released 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.