SlideShare uma empresa Scribd logo
1 de 25
루비 가   얼랭 에   빠진 날 http ://thinkr.egloos.com [email_address] 제 6 회 루비세미나  (2008.6.28)
Concurrency -oriented Programming
How Erlang programs work? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A Stateless Server Process -module(demo2). -compile(export_all). run() -> Pid = spawn(fun echo/0), Pid ! {self(), hello, 42}, receive {Pid, reply, 42} ->  Pid ! stop end. echo() -> receive {From, hello, Val} -> From ! {self(), reply, Val}, echo(); % loop! stop -> io:format("Done!~n", []), ok end. P1 P2 {P1, hello, 42} {P2, reply, 42} Client Server stop
Benefits of COP ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
generic_server OTP gen_server  비헤비어
Apache vs. Yaws *  http://www.sics.se /~joe/apachevsyaws.html
RE presentational  S tate  T ransfer
RESTful URL ( Rails ) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
respond_to  :wow! # POST /posts # POST /posts.xml def  create @post = Post.new(params[:post]) respond_to  do  |format| if  @post.save flash[:notice] = 'Post was successfully created.' format.html { redirect_to(@post) } format.xml  { render :xml => @post, :status => :created, :location => @post } else format.html { render :action => "new" } format.xml  { render :xml => @post.errors, :status => :unprocessable_entity } end end end
GoogleTrends “ ruby on rails ” 1.0 1.2 2.0 resource   도입  from MVC to  REST
The RADAR Architecture *  RESTful Application, Dumb-Ass Recipient   ( http://pragdave.pragprog.com/pragdave/2007/03/the_radar_archi.html )
Time to Relax…
CouchDB ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SQL vs. CouchDB *  http ://www.zefhemel.com/archives/2008/03/11/sittin-on-the-couchdb Static queries of dynamic schemas Dynamic queries of static schemas Must know only document name Must know schema to read/write a complete object Denormalized. Docs usually self contained. Data often duplicated. Normalized. Objects spread across tables. Duplication reduced. Collection of named documents with varying structure Uniform tables of data Dynamic, implicit schema Predefined, explicit schema CouchDB SQL
Document = JSON Object { "_id":"discussion_tables", "_rev":"D1C946B7", "Subject":"I like Planktion", "Author":"Rusty", "PostedDate":"2006-08-15T17:30:12-04:00", "Tags":["plankton", "baseball", "decisions"], "Body":"I decided today that I don't like baseball. I like plankton." }
Some CouchDB REST APIs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Accessing CouchDB with Ruby ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
DEMO
Admin Interface
Ruby View
Extending ARes class CouchResource < ActiveResource::Base class << self def element_path(id, prefix_options = {}, query_options = nil) &quot;#{prefix(prefix_options)}#{collection_name}/#{id}#{query_string(query_options)}&quot; def collection_path(prefix_options = {}, query_options = nil) &quot;#{prefix(prefix_options)}#{collection_name}#{query_string(query_options)}&quot; def instantiate_collection(collection, prefix_options = {}) collection = collection.fetch(&quot;rows&quot;) if collection.kind_of? Hash def instantiate_record(record, prefix_options = {}) record = record.fetch(&quot;value&quot;) if record.has_key? &quot;value“ def find_view(view_name, func_name) find(:all, :from => &quot;/#{element_name}/_view/#{view_name}/#{func_name}&quot;) end
Mywiki Resource class Mywiki  < CouchResource self.site  = &quot;http://localhost:5984&quot; self.format = :json  self.collection_name = 'mywiki' # used as a database name self.primary_key = '_id' end
Console Result
Finish!!

Mais conteúdo relacionado

Mais procurados

Introduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsIntroduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsDerek Anderson
 
NoSQL Injections in Node.js - The case of MongoDB
NoSQL Injections in Node.js - The case of MongoDBNoSQL Injections in Node.js - The case of MongoDB
NoSQL Injections in Node.js - The case of MongoDBSqreen
 
Building Web Apps with Express
Building Web Apps with ExpressBuilding Web Apps with Express
Building Web Apps with ExpressAaron Stannard
 
Html5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglHtml5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglKilian Valkhof
 
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 Minutes
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 MinutesDjangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 Minutes
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 MinutesNina Zakharenko
 
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Tatsuhiko Miyagawa
 
Server side scripting smack down - Node.js vs PHP
Server side scripting smack down - Node.js vs PHPServer side scripting smack down - Node.js vs PHP
Server side scripting smack down - Node.js vs PHPMarc Gear
 
Hash Signaling Made Easy
Hash Signaling Made EasyHash Signaling Made Easy
Hash Signaling Made Easydavidgouldin
 
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...andreaslubbe
 
Automating WordPress Theme Development
Automating WordPress Theme DevelopmentAutomating WordPress Theme Development
Automating WordPress Theme DevelopmentHardeep Asrani
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hopeMarcus Ramberg
 
Hartwarming lightning talk in winter Sapporo
Hartwarming lightning talk in winter SapporoHartwarming lightning talk in winter Sapporo
Hartwarming lightning talk in winter SapporoJun OHWADA
 
Evolving Software with Moose
Evolving Software with MooseEvolving Software with Moose
Evolving Software with MooseDave Cross
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js ExpressEyal Vardi
 
The promise of asynchronous PHP
The promise of asynchronous PHPThe promise of asynchronous PHP
The promise of asynchronous PHPWim Godden
 

Mais procurados (20)

Introduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsIntroduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCats
 
NoSQL Injections in Node.js - The case of MongoDB
NoSQL Injections in Node.js - The case of MongoDBNoSQL Injections in Node.js - The case of MongoDB
NoSQL Injections in Node.js - The case of MongoDB
 
Building Web Apps with Express
Building Web Apps with ExpressBuilding Web Apps with Express
Building Web Apps with Express
 
Html5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglHtml5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webgl
 
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 Minutes
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 MinutesDjangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 Minutes
Djangocon 2014 - Django REST Framework - So Easy You Can Learn it in 25 Minutes
 
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8
 
Server side scripting smack down - Node.js vs PHP
Server side scripting smack down - Node.js vs PHPServer side scripting smack down - Node.js vs PHP
Server side scripting smack down - Node.js vs PHP
 
Hash Signaling Made Easy
Hash Signaling Made EasyHash Signaling Made Easy
Hash Signaling Made Easy
 
Express js
Express jsExpress js
Express js
 
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
 
B03-GenomeContent-Intermine
B03-GenomeContent-IntermineB03-GenomeContent-Intermine
B03-GenomeContent-Intermine
 
Modern Perl
Modern PerlModern Perl
Modern Perl
 
Automating WordPress Theme Development
Automating WordPress Theme DevelopmentAutomating WordPress Theme Development
Automating WordPress Theme Development
 
Mojolicious on Steroids
Mojolicious on SteroidsMojolicious on Steroids
Mojolicious on Steroids
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hope
 
Hartwarming lightning talk in winter Sapporo
Hartwarming lightning talk in winter SapporoHartwarming lightning talk in winter Sapporo
Hartwarming lightning talk in winter Sapporo
 
Evolving Software with Moose
Evolving Software with MooseEvolving Software with Moose
Evolving Software with Moose
 
Vidoop CouchDB Talk
Vidoop CouchDB TalkVidoop CouchDB Talk
Vidoop CouchDB Talk
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js Express
 
The promise of asynchronous PHP
The promise of asynchronous PHPThe promise of asynchronous PHP
The promise of asynchronous PHP
 

Destaque

February 5 (child rights)
February 5 (child rights)February 5 (child rights)
February 5 (child rights)AIMEC Reporter
 
Hope Through the Resurrection
Hope Through the ResurrectionHope Through the Resurrection
Hope Through the ResurrectionMargaret Lepke
 
AC And DC Geared Motors by Strategi Automation Solutions Pvt. Ltd., Bengaluru
AC And DC Geared Motors by Strategi Automation Solutions Pvt. Ltd., BengaluruAC And DC Geared Motors by Strategi Automation Solutions Pvt. Ltd., Bengaluru
AC And DC Geared Motors by Strategi Automation Solutions Pvt. Ltd., BengaluruIndiaMART InterMESH Limited
 
ECCLU 2011 - B. Tombal - Prostate cancer: From biology to live expectancy - S...
ECCLU 2011 - B. Tombal - Prostate cancer: From biology to live expectancy - S...ECCLU 2011 - B. Tombal - Prostate cancer: From biology to live expectancy - S...
ECCLU 2011 - B. Tombal - Prostate cancer: From biology to live expectancy - S...European School of Oncology
 
Nordea Economic Outlook, September 2014
Nordea Economic Outlook, September 2014Nordea Economic Outlook, September 2014
Nordea Economic Outlook, September 2014Luca Falda
 
RIMS Update - Best Practices for Roading Asset Managemment
RIMS Update - Best Practices for Roading Asset ManagemmentRIMS Update - Best Practices for Roading Asset Managemment
RIMS Update - Best Practices for Roading Asset ManagemmentSimon Gough
 
Angela pronvinzano / historia de la arquitectura III
Angela pronvinzano / historia de la arquitectura IIIAngela pronvinzano / historia de la arquitectura III
Angela pronvinzano / historia de la arquitectura IIIAngela Provinzano
 
Evaluacion delprimer quimestre
Evaluacion delprimer quimestreEvaluacion delprimer quimestre
Evaluacion delprimer quimestremayurirami
 
Future of Composite Apps S-Controls and Beyond
Future of Composite Apps S-Controls and BeyondFuture of Composite Apps S-Controls and Beyond
Future of Composite Apps S-Controls and Beyonddreamforce2006
 

Destaque (15)

Rosemary Carter (2)
Rosemary Carter (2)Rosemary Carter (2)
Rosemary Carter (2)
 
February 5 (child rights)
February 5 (child rights)February 5 (child rights)
February 5 (child rights)
 
Hope Through the Resurrection
Hope Through the ResurrectionHope Through the Resurrection
Hope Through the Resurrection
 
AC And DC Geared Motors by Strategi Automation Solutions Pvt. Ltd., Bengaluru
AC And DC Geared Motors by Strategi Automation Solutions Pvt. Ltd., BengaluruAC And DC Geared Motors by Strategi Automation Solutions Pvt. Ltd., Bengaluru
AC And DC Geared Motors by Strategi Automation Solutions Pvt. Ltd., Bengaluru
 
Mattakuria
MattakuriaMattakuria
Mattakuria
 
Vahz aprendizaje autónomo
Vahz aprendizaje autónomoVahz aprendizaje autónomo
Vahz aprendizaje autónomo
 
ECCLU 2011 - B. Tombal - Prostate cancer: From biology to live expectancy - S...
ECCLU 2011 - B. Tombal - Prostate cancer: From biology to live expectancy - S...ECCLU 2011 - B. Tombal - Prostate cancer: From biology to live expectancy - S...
ECCLU 2011 - B. Tombal - Prostate cancer: From biology to live expectancy - S...
 
Nordea Economic Outlook, September 2014
Nordea Economic Outlook, September 2014Nordea Economic Outlook, September 2014
Nordea Economic Outlook, September 2014
 
Human rights timeline part 2
Human rights timeline part 2Human rights timeline part 2
Human rights timeline part 2
 
9
99
9
 
RIMS Update - Best Practices for Roading Asset Managemment
RIMS Update - Best Practices for Roading Asset ManagemmentRIMS Update - Best Practices for Roading Asset Managemment
RIMS Update - Best Practices for Roading Asset Managemment
 
Angela pronvinzano / historia de la arquitectura III
Angela pronvinzano / historia de la arquitectura IIIAngela pronvinzano / historia de la arquitectura III
Angela pronvinzano / historia de la arquitectura III
 
Sesión 2º autoestima
Sesión 2º  autoestimaSesión 2º  autoestima
Sesión 2º autoestima
 
Evaluacion delprimer quimestre
Evaluacion delprimer quimestreEvaluacion delprimer quimestre
Evaluacion delprimer quimestre
 
Future of Composite Apps S-Controls and Beyond
Future of Composite Apps S-Controls and BeyondFuture of Composite Apps S-Controls and Beyond
Future of Composite Apps S-Controls and Beyond
 

Semelhante a 루비가 얼랭에 빠진 날

Architecture | Busy Java Developers Guide to NoSQL | Ted Neward
Architecture | Busy Java Developers Guide to NoSQL | Ted NewardArchitecture | Busy Java Developers Guide to NoSQL | Ted Neward
Architecture | Busy Java Developers Guide to NoSQL | Ted NewardJAX London
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPMariano Iglesias
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomyDongmin Yu
 
Implementing Comet using PHP
Implementing Comet using PHPImplementing Comet using PHP
Implementing Comet using PHPKing Foo
 
[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기NAVER D2
 
jQuery Presentation - Refresh Events
jQuery Presentation - Refresh EventsjQuery Presentation - Refresh Events
jQuery Presentation - Refresh EventsEugene Andruszczenko
 
Eugene Andruszczenko: jQuery
Eugene Andruszczenko: jQueryEugene Andruszczenko: jQuery
Eugene Andruszczenko: jQueryRefresh Events
 
Reaching Out From PL/SQL (OPP 2010)
Reaching Out From PL/SQL (OPP 2010)Reaching Out From PL/SQL (OPP 2010)
Reaching Out From PL/SQL (OPP 2010)Lucas Jellema
 
Practical catalyst
Practical catalystPractical catalyst
Practical catalystdwm042
 
How Xslate Works
How Xslate WorksHow Xslate Works
How Xslate WorksGoro Fuji
 
Enhance Web Performance
Enhance Web PerformanceEnhance Web Performance
Enhance Web PerformanceAdam Lu
 
REST with Eve and Python
REST with Eve and PythonREST with Eve and Python
REST with Eve and PythonPiXeL16
 
Node js presentation
Node js presentationNode js presentation
Node js presentationmartincabrera
 
Introduction To Groovy 2005
Introduction To Groovy 2005Introduction To Groovy 2005
Introduction To Groovy 2005Tugdual Grall
 
JavaScript and jQuery Fundamentals
JavaScript and jQuery FundamentalsJavaScript and jQuery Fundamentals
JavaScript and jQuery FundamentalsBG Java EE Course
 
Good practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimizationGood practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimizationPrestaShop
 
Redis And python at pycon_2011
Redis And python at pycon_2011Redis And python at pycon_2011
Redis And python at pycon_2011sunilar0ra
 
WordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big wordsWordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big wordsTomAuger
 

Semelhante a 루비가 얼랭에 빠진 날 (20)

Architecture | Busy Java Developers Guide to NoSQL | Ted Neward
Architecture | Busy Java Developers Guide to NoSQL | Ted NewardArchitecture | Busy Java Developers Guide to NoSQL | Ted Neward
Architecture | Busy Java Developers Guide to NoSQL | Ted Neward
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHP
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomy
 
Implementing Comet using PHP
Implementing Comet using PHPImplementing Comet using PHP
Implementing Comet using PHP
 
[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기
 
jQuery Presentation - Refresh Events
jQuery Presentation - Refresh EventsjQuery Presentation - Refresh Events
jQuery Presentation - Refresh Events
 
Eugene Andruszczenko: jQuery
Eugene Andruszczenko: jQueryEugene Andruszczenko: jQuery
Eugene Andruszczenko: jQuery
 
Reaching Out From PL/SQL (OPP 2010)
Reaching Out From PL/SQL (OPP 2010)Reaching Out From PL/SQL (OPP 2010)
Reaching Out From PL/SQL (OPP 2010)
 
Practical catalyst
Practical catalystPractical catalyst
Practical catalyst
 
How Xslate Works
How Xslate WorksHow Xslate Works
How Xslate Works
 
Enhance Web Performance
Enhance Web PerformanceEnhance Web Performance
Enhance Web Performance
 
REST with Eve and Python
REST with Eve and PythonREST with Eve and Python
REST with Eve and Python
 
Web::Scraper
Web::ScraperWeb::Scraper
Web::Scraper
 
JS everywhere 2011
JS everywhere 2011JS everywhere 2011
JS everywhere 2011
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
 
Introduction To Groovy 2005
Introduction To Groovy 2005Introduction To Groovy 2005
Introduction To Groovy 2005
 
JavaScript and jQuery Fundamentals
JavaScript and jQuery FundamentalsJavaScript and jQuery Fundamentals
JavaScript and jQuery Fundamentals
 
Good practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimizationGood practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimization
 
Redis And python at pycon_2011
Redis And python at pycon_2011Redis And python at pycon_2011
Redis And python at pycon_2011
 
WordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big wordsWordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big words
 

Mais de Sukjoon Kim

워드프레스 웹사이트 제작 가이드
워드프레스 웹사이트 제작 가이드워드프레스 웹사이트 제작 가이드
워드프레스 웹사이트 제작 가이드Sukjoon Kim
 
Ruby on Rails와 함께 하는 애자일 웹 개발
Ruby on Rails와 함께 하는 애자일 웹 개발Ruby on Rails와 함께 하는 애자일 웹 개발
Ruby on Rails와 함께 하는 애자일 웹 개발Sukjoon Kim
 
루비, REST, jQuery 그리고 agile 웹에 관한 이야기
루비, REST, jQuery 그리고 agile 웹에 관한 이야기루비, REST, jQuery 그리고 agile 웹에 관한 이야기
루비, REST, jQuery 그리고 agile 웹에 관한 이야기Sukjoon Kim
 
JavaScript on Rails 튜토리얼
JavaScript on Rails 튜토리얼JavaScript on Rails 튜토리얼
JavaScript on Rails 튜토리얼Sukjoon Kim
 
레일스를 이용한 애자일 웹 개발 가이드
레일스를 이용한 애자일 웹 개발 가이드레일스를 이용한 애자일 웹 개발 가이드
레일스를 이용한 애자일 웹 개발 가이드Sukjoon Kim
 
Realtime Web 간보기
Realtime Web 간보기Realtime Web 간보기
Realtime Web 간보기Sukjoon Kim
 
페이스북 소셜 앱 개발 가이드 2011
페이스북 소셜 앱 개발 가이드 2011페이스북 소셜 앱 개발 가이드 2011
페이스북 소셜 앱 개발 가이드 2011Sukjoon Kim
 

Mais de Sukjoon Kim (8)

워드프레스 웹사이트 제작 가이드
워드프레스 웹사이트 제작 가이드워드프레스 웹사이트 제작 가이드
워드프레스 웹사이트 제작 가이드
 
Ruby on Rails와 함께 하는 애자일 웹 개발
Ruby on Rails와 함께 하는 애자일 웹 개발Ruby on Rails와 함께 하는 애자일 웹 개발
Ruby on Rails와 함께 하는 애자일 웹 개발
 
루비, REST, jQuery 그리고 agile 웹에 관한 이야기
루비, REST, jQuery 그리고 agile 웹에 관한 이야기루비, REST, jQuery 그리고 agile 웹에 관한 이야기
루비, REST, jQuery 그리고 agile 웹에 관한 이야기
 
Merb tutorial
Merb tutorialMerb tutorial
Merb tutorial
 
JavaScript on Rails 튜토리얼
JavaScript on Rails 튜토리얼JavaScript on Rails 튜토리얼
JavaScript on Rails 튜토리얼
 
레일스를 이용한 애자일 웹 개발 가이드
레일스를 이용한 애자일 웹 개발 가이드레일스를 이용한 애자일 웹 개발 가이드
레일스를 이용한 애자일 웹 개발 가이드
 
Realtime Web 간보기
Realtime Web 간보기Realtime Web 간보기
Realtime Web 간보기
 
페이스북 소셜 앱 개발 가이드 2011
페이스북 소셜 앱 개발 가이드 2011페이스북 소셜 앱 개발 가이드 2011
페이스북 소셜 앱 개발 가이드 2011
 

Último

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 

Último (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 

루비가 얼랭에 빠진 날

  • 1. 루비 가 얼랭 에 빠진 날 http ://thinkr.egloos.com [email_address] 제 6 회 루비세미나 (2008.6.28)
  • 3.
  • 4. A Stateless Server Process -module(demo2). -compile(export_all). run() -> Pid = spawn(fun echo/0), Pid ! {self(), hello, 42}, receive {Pid, reply, 42} -> Pid ! stop end. echo() -> receive {From, hello, Val} -> From ! {self(), reply, Val}, echo(); % loop! stop -> io:format(&quot;Done!~n&quot;, []), ok end. P1 P2 {P1, hello, 42} {P2, reply, 42} Client Server stop
  • 5.
  • 7. Apache vs. Yaws * http://www.sics.se /~joe/apachevsyaws.html
  • 8. RE presentational S tate T ransfer
  • 9.
  • 10. respond_to :wow! # POST /posts # POST /posts.xml def create @post = Post.new(params[:post]) respond_to do |format| if @post.save flash[:notice] = 'Post was successfully created.' format.html { redirect_to(@post) } format.xml { render :xml => @post, :status => :created, :location => @post } else format.html { render :action => &quot;new&quot; } format.xml { render :xml => @post.errors, :status => :unprocessable_entity } end end end
  • 11. GoogleTrends “ ruby on rails ” 1.0 1.2 2.0 resource 도입 from MVC to REST
  • 12. The RADAR Architecture * RESTful Application, Dumb-Ass Recipient ( http://pragdave.pragprog.com/pragdave/2007/03/the_radar_archi.html )
  • 14.
  • 15. SQL vs. CouchDB * http ://www.zefhemel.com/archives/2008/03/11/sittin-on-the-couchdb Static queries of dynamic schemas Dynamic queries of static schemas Must know only document name Must know schema to read/write a complete object Denormalized. Docs usually self contained. Data often duplicated. Normalized. Objects spread across tables. Duplication reduced. Collection of named documents with varying structure Uniform tables of data Dynamic, implicit schema Predefined, explicit schema CouchDB SQL
  • 16. Document = JSON Object { &quot;_id&quot;:&quot;discussion_tables&quot;, &quot;_rev&quot;:&quot;D1C946B7&quot;, &quot;Subject&quot;:&quot;I like Planktion&quot;, &quot;Author&quot;:&quot;Rusty&quot;, &quot;PostedDate&quot;:&quot;2006-08-15T17:30:12-04:00&quot;, &quot;Tags&quot;:[&quot;plankton&quot;, &quot;baseball&quot;, &quot;decisions&quot;], &quot;Body&quot;:&quot;I decided today that I don't like baseball. I like plankton.&quot; }
  • 17.
  • 18.
  • 19. DEMO
  • 22. Extending ARes class CouchResource < ActiveResource::Base class << self def element_path(id, prefix_options = {}, query_options = nil) &quot;#{prefix(prefix_options)}#{collection_name}/#{id}#{query_string(query_options)}&quot; def collection_path(prefix_options = {}, query_options = nil) &quot;#{prefix(prefix_options)}#{collection_name}#{query_string(query_options)}&quot; def instantiate_collection(collection, prefix_options = {}) collection = collection.fetch(&quot;rows&quot;) if collection.kind_of? Hash def instantiate_record(record, prefix_options = {}) record = record.fetch(&quot;value&quot;) if record.has_key? &quot;value“ def find_view(view_name, func_name) find(:all, :from => &quot;/#{element_name}/_view/#{view_name}/#{func_name}&quot;) end
  • 23. Mywiki Resource class Mywiki < CouchResource self.site = &quot;http://localhost:5984&quot; self.format = :json self.collection_name = 'mywiki' # used as a database name self.primary_key = '_id' end