Socket
Book a DemoInstallSign in
Socket

livedata

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

livedata

0.3.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

== LiveData LiveData is a rubygem. This gem is used to implement the applications like chat, live process montior, etc.,

== Rails2 Installation Step 1 :- Install the gem gem install livedata Step 2 :- Add the livedata gem in config/environment.rb config.gem "livedata" Step 3 :- Add the following configuration in the config/environments/development.rb, config/environments/production.rb and config/environments/test.rb config.threadsafe!

== Rails2 Example Class MainController < ApplicationController

  def get_msg
    user_id = params[:id] || "test"
    chat = LiveData.get_channel('chat') || LiveData.create_channel('chat')
    user = chat.get_user( user_id ) || chat.create_user( user_id )
    render :text => user.read
  end

  def send_msg
    user_id = params[:id] || "test"
    message = params[:msg] || "Nothing"

    chat = LiveData.get_channel('chat') || LiveData.create_channel('chat')
    user = chat.get_user( user_id ) || chat.create_user( user_id )

    user.write( message )
    render :text => 'Finesh'
  end
end

== Run Webrick Server
	ruby script/server -b 0.0.0.0 -p 3000
== Browser
	Open two tabs in the web browser
	First tab :-
		http://localhost:3000/main/get_msg/tester
	Second Tab :-
		http://localhost:3000/main/send_msg/tester?msg=Hello World

== Rails3 Installation Step 1 :- Add the following line in the Gemfile gem 'livedata', '>= 0.3.0' Step 2 :- Install the gem, execute the following command
bundle install

== Rails3 Example The livedata gem contain, configurations, controller and routine. Execute the following command to find the services, that already present. rake routes == Run web server rails s -b 0.0.0.0 -p 3000 == Browser Open two tabs in the web browser First tab :- http://localhost:3000/live_data/chat/guest.xml Second tab :- http://localhost:3000/live_data/chat/guest/put?message=Hello World

== Bugs Report the bug on http://github.com/siddick/live_data/issues

FAQs

Package last updated on 08 Mar 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.