Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Cassandra in Action with Twitter's Ruby Client

ÓÐÒ»¸öȫеÄÏîÄ¿£¬ÒòΪ¿¼Âǵ½½«À´µÄÊý¾ÝÀ©Õ¹ÐÔÄÜ£¬ËùÒÔ¿¼ÂÇÓÃCassandra×öÊý¾Ý´æ´¢£¬Ç°¶ËÓÃLighttpd + FastCGI + Rails¡£ÔÚʹÓÃCassandraµÄʱºò£¬¾õµÃÓÐһЩ¶«Î÷¿ÉÄÜ´ó¼Ò¶¼ÐèÒª£¬¾ÍдÁËÒ»¸ö¼òµ¥µÄÖ¸ÄÏ¡£ÒòΪÄÚÈݱȽϳ¤£¨16Ò³£©£¬¾ÍŪÁ˸öPDFÎļþ¸ø´ó¼ÒÏÂÔØ¡£
Cassandra in Action with Twitter's Ruby Client.pdf
Èç¹ûÏÂÔØÁ´½ÓÓÐÎÊÌ⣬Çë¸øÎÒÓʼþ£ºspanzhang@gmail.com¡£ÐèҪ˵Ã÷һϵÄÊÇ£¬Õâ¸öÖ¸ÄÏÊÇÓÃÓ¢ÓïдµÄ£¬²»¹ý¶¼ÊÇЩºÜ¼òµ¥µÄ¾ä×Ó£¬ÏàÐÅÓÐËļ¶Ó¢Óï¾Í¿ÉÒÔºÁ²»·ÑÁ¦µÄ¿´Ã÷°×¡£ÏÂÃæ°ÑÎÄÕµÄÒýÎÄ·ÅÕâÀ¹©´ó¼Ò²Î¿¼£¬Äã¿ÉÒÔ¿´¿´Êʲ»ÊʺÏÄãµÄÐèÒª£º
Okay, let me get something straight. I’m not going to persuade you to use Cassandra. I just assume you have already chosen Cassandra as your storage solution. Maybe you know the basic things, the underneath mechanisms, about Cassandra or maybe not. Anyway, I assume you don’t care what makes Cassandra outstanding and you just want to use it. If that’s the case, this tutorial is going to help you, in these 3 aspects:
 
1) to set up the environment correctly,
2) to understand how to model you data in a Cassandra way,
3) to understand and use Twitter’s Cassandra Ruby client.
 
After reading this tutorial, you should have a working environment and can start your project with a good understanding of doing your job in a very Cassandra way. Here we go!
 


Ïà¹ØÎĵµ£º

RUBYʵ¼ù—Êý¾Ý¿â¼òµ¥²Ù×÷

¿ª·¢»·¾³£º
Ruby:1.9.1
Rails:2.3.5
Rake:0.8.7
Rack:1.0.1
Mysql:5.0.9
Ruby-mysql:mysql-2.8.1-x86-mswin
IDE:RubyMine2.0.1
Êý¾Ý¿â×¼±¸£º
database:dbdevelopment
user:crystal
password:crystal
Ò»¡¢´´½¨RubyÏîÄ¿RorTest
¶þ¡¢ÐÞ¸Ädatabase.yml
ÕâÀïÖ»ÆôÓÃdevelopment»·¾³Êý¾Ý¿â£¬ÐÞ¸ÄÅäÖÃÎļþÈçÏ£º
dev ......

Ruby On Rails 2.0.2Ô´´úÂë·ÖÎö£¨3£© resource


RESTfulµÄ»¯Éí----resource
  µ±È»£¬¹â°ÑRESTfulºÍresource³¶µ½Ò»ÆðËÆºõÏ൱ÏÁÒ壬ÔÚRailsÖУ¬ActionController::Resources³éÏóÁËRESTÖеÄResource£¬ÕâÀÎÒ²»Ì¸RESTµÄÏà¹Ø¸ÅÄî£¬ÍøÉÏ×ÊÁÏÒ»´óÛç¡£ÎÒÃǾÍÀ´¿´¿´RailsÖÐÊÇÈçºÎͨ¹ýResourceÀ´ÇáËÉ£¬¼ò±ãµÄÍê³ÉRESTfulÓ¦Óõİɡ£
  resources.rb
  Ô´´úÂë ......

rubyÀ´Ã¶¾Ùcsdnδע²áµÄÓû§Ãû

require 'open-uri'
$NAME_CHARS= (?a..?z).to_a+(?0..?9).to_a
def is_name_used(name)
str=open('http://passport.csdn.net/UserExist.aspx?UserName='+name)
str=str.read
#str=str.encode('GBK','utf-8')
return true if str[/Red/]
end
def enum_names(len=2)
return if len<2
f=File.open(' ......

Ruby¼Ì³Ð ¾ÅͲһÌõ

Ruby ÀàµÄ¼Ì³Ð
¹Ø¼ü×Ö: Ruby ÀàµÄ¼Ì³Ð


Ò»¡¢ÆÕͨ·½Ê½µÄ¼Ì³Ð
 RubyÖ»Ö§³Öµ¥¼Ì³Ð
 
ruby ´úÂë
class
 Child < Father
  

......   

end
  

    ObjectÊÇËùÓÐÀàµÄÊ¼×æ£¬²¢ÇÒObjectµÄʵÀý·½·¨ ......

Watir Óï·¨£¨Web Application Testing in Ruby)

Watir Óï·¨£¨Web Application Testing in Ruby)
# watirµÄ°²×°
watieµÄ°²×°Çë²é¿´ -> Ruby libraryµÄ°²×°
# ʹÓÃWatir¹¤¾ß£¬ÐèÒªÔڽű¾ÖмÓÉÏ
require 'watir'
# ´´½¨Ò»¸öIEµÄʵÀý
ie = Watir::IE.new
»òÕßÔÚ´´½¨µÄͬʱֱ½Óתµ½Ò³Ãæ
ie = Watir::IE.start('http://www.text.com/')
WatirʹÓÃstart·½·¨ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ