You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

infinispan-ruby-client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

infinispan-ruby-client

0.0.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

Infinispan Ruby Client

Infinispan is a scalable, high-availability data grid. This is a native Ruby client implementation of Infinispan's Hotrod client/server protocol, allowing Ruby applications to natively store and retrieve strings and Ruby objects in the Infinispan data grid.

Introduction

This is a Level-1 client, meaning that it is a basic client and does not participate in the data grid clustering. The client currently only supports using the default cache, and all operations of the Hot Rod protocol are implemented except the server stats request.

Installation

$ gem install infinispan-ruby-client

Usage

Using the infinispan-ruby-client requires that you connect to an Infinispan server using the hotrod protocol.

  • First start Infinispan, specifying hotrod for the protocol

    $INFINISPAN_DIR/bin/startServer.sh -r hotrod

  • Then write code

    require 'infinispan-ruby-client' cache = Infinispan::RemoteCache.new => #<Infinispan::RemoteCache:0x100365a78 @name="", @host="localhost", @port=11222>

    Store and retrieve a string

    cache.put("Name", "Lance") => true cache.get("Name") => "Lance"

    Store and retrieve a ruby object

    cache.put("Time", Time.now) => true time = cache.get("Time") => Tue Jun 07 17:45:17 -0400 2011 time.class => Time

Todo

  • Support cache names
  • Add ping operation before any call
  • Validate response headers
  • Get server statistics
  • Support for lifespanSeconds and maxIdleTimeSeconds
  • Support for intelligent clients and topologies, and listeners
  • Configuration files support
  • Transaction support
  • Support for Apache Avro Marshaller ??

License

Copyright 2011 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

FAQs

Package last updated on 08 Jun 2011

Did you know?

Socket

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.

Install

Related posts