
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Active Remote provides Active Record-like object-relational mapping over RPC. Think of it as Active Record for your platform: within a service, use Active Record to persist objects and between services, use Active Remote.
Active Remote provides a base class that when subclassed, provides the functionality you need to setup your remote model. Because Active Remote provides model persistence between RPC services, it uses a GUID to retrieve records and establish associations. So Active Remote expects your RPC data format to provide a :guid field that can be used to identify your remote models.
Unlike Active Record, Active Remote doesn't have access to a database table to create attribute mappings. So you'll need to do a little setup to let Active Remote know how to persist your model*.
# Given a product record that has :guid & :name fields:
class Product < ActiveRecord::Base
# :guid, :name
end
# Configure your Active Remote model like this:
class Product < ActiveRemote::Base
attribute :guid
attribute :name
end
*Using Ruby's inherited hook, you could build an attribute mapper to setup your remote models for you.
Like Active Record, Active Remote relies heavily on naming conventions and standard CRUD actions. It expects models name to map to it's service (e.g Product => ProductService) and will infer the service name automatically.
# Given a product service that has #search, #create, #update, and #delete endpoints
class ProductService < RPCService
def search(request)
#...
end
def create(request)
#...
end
def update(request)
#...
end
def delete(request)
#...
end
end
# Your remote model will just work.
class Product < ActiveRemote::Base
end
You can, of course override it if need be:
# If you have a custom service:
class CustomProductService < RPCService
# CRUD actions
end
# Configure your remote model like this:
class Product < ActiveRemote::Base
service_name :custom_product_service
end
Add this line to your application's Gemfile:
gem 'active_remote'
And then execute:
$ bundle
Or install it yourself as:
$ gem install active_remote
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that active_remote 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
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.