Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
1
Arquiteturas híbridas de atendimento em Cloud Computing para otimizar o uso de           recursos (Node.js)          Thiag...
Introdução                Nuvem,                 “Aalém da Infraestrutura.“                      (Rodrigo Gazzaneo)       ...
Introdução         Qual   Sistema                Gerenciador de                Banco de                Dados utilizar?Qual...
IntroduçãoQuando podemosprever a quantidade de acessos...                         tudo fica   mais simples!               ...
IntroduçãoMas... e quando esse número não é preciso?                                             6
Use CaseQue tal conhecermos o “use case” dessa palestra...                                                       Petshop? ...
Use CaseBaseando-se em um projeto          real   em    fase   dedesenvolvimento pela 4Linux.Foi criado um protótipo espec...
Use Case1º) Atendimento médico;2º) Prescrição médica;3º) Onde localizar o medicamento?                                    9
Use CaseAtravés de um serviço online de consulta,o sistema indica qual unidade possui osmedicamentos da prescrição.       ...
O problema a ser solucionadoTemos nosso ambientedeterminado               A linguagem é               o menor dos problema...
Entendendo o problema  webservice_rest.php?id=12           JSON    ●    Para cada requisição:          ●  Uma thread é cri...
Simulando o problema                   (resultados obtidos)Em “testes de stress”, foi obtido os seguintes resultados:     ...
O que fazemos agora?Como melhorar essa estatística?     Escalabilidade vertical?     Ou, escalabilidade horizontal?       ...
Que tal um novo paradigma?E se passarmos a pensar de uma nova forma?●    E/S não bloqueantes;●    Single thread;●    E/S a...
E quem faz esse trabalho para nós?         (http://www.nodejs.org)                                     16
O que é                      ?Resumidamente, essa tecnologia nos permite:●    Alta escalabilidade da aplicação desenvolvid...
Como o                      foi construído?O Node.js, foi desenvolvido utilizando:●    C/C++ e Javascript;●  Funciona base...
Chega de teoria, e vamos para prática?                                         19
O                               em ação    webservice_node.php?id=12             JSON            (ou xml)                 ...
Performance da nossa nova arquiteturaFazendo uso do node.js, obtemos a seguinte estatística:                             D...
Comparação das duas soluções                                          Apache/PHP5 vs Node.jsDocument Path:          /Cloud...
No que aplicar oPodemos desenvolver pequenos módulos de fácilmanutenção       em   node.js para necessidadesespecíficas, p...
Até onde vai o poder do               ?As requisições não param de   crescer?                                             24
Tranquilize-seO node.js está preparado para isso...Ele possui   extensões que permitem o desenvolvimentode aplicações em C...
ConclusãoO Node.js, apesar de ser um paradigma recém-criado, com menosde 5 anos de existência, vem demonstrando ser um mod...
ObrigadoThiago Henrique de Oliveirathiago.oliveira@4linux.com.br          @4LinuxBR           /4linux                     ...
Upcoming SlideShare
Loading in …5
×

Arquiteturas híbridas de atendimento em Cloud Computing para otimizar o uso de recursos (Node.js)

725 views

Published on

Published in: Technology
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://shorturl.at/krvUW } ......................................................................................................................... Download Full EPUB Ebook here { http://shorturl.at/krvUW } ......................................................................................................................... Download Full doc Ebook here { http://shorturl.at/krvUW } ......................................................................................................................... Download PDF EBOOK here { http://shorturl.at/krvUW } ......................................................................................................................... Download EPUB Ebook here { http://shorturl.at/krvUW } ......................................................................................................................... Download doc Ebook here { http://shorturl.at/krvUW } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • If you want to download or read this book, copy link or url below in the New tab ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Arquiteturas híbridas de atendimento em Cloud Computing para otimizar o uso de recursos (Node.js)

  1. 1. 1
  2. 2. Arquiteturas híbridas de atendimento em Cloud Computing para otimizar o uso de recursos (Node.js) Thiago Henrique de Oliveira 2
  3. 3. Introdução Nuvem, “Aalém da Infraestrutura.“ (Rodrigo Gazzaneo) 3
  4. 4. Introdução Qual Sistema Gerenciador de Banco de Dados utilizar?Qual Linguagem utilizar? 4
  5. 5. IntroduçãoQuando podemosprever a quantidade de acessos... tudo fica mais simples! 5
  6. 6. IntroduçãoMas... e quando esse número não é preciso? 6
  7. 7. Use CaseQue tal conhecermos o “use case” dessa palestra... Petshop? Pizzaria? Farmácia? Cinemas? Sistema de monitoramento? Taxi? 7
  8. 8. Use CaseBaseando-se em um projeto real em fase dedesenvolvimento pela 4Linux.Foi criado um protótipo especialmente para o CloudConf,seguindo os pré-requisitos do projeto e os testes dehomologação que foram realizados.Por questões de confidencialidade, o nome da empresa e osdetalhes do projeto não podem ser divulgados. 8
  9. 9. Use Case1º) Atendimento médico;2º) Prescrição médica;3º) Onde localizar o medicamento? 9
  10. 10. Use CaseAtravés de um serviço online de consulta,o sistema indica qual unidade possui osmedicamentos da prescrição. 0% 75% 100% 75% 50% 75% 25% 50% 0% 10
  11. 11. O problema a ser solucionadoTemos nosso ambientedeterminado A linguagem é o menor dos problemas!Mas, e a capacidade deprocessamento derequisições simultâneas? 11
  12. 12. Entendendo o problema webservice_rest.php?id=12 JSON ● Para cada requisição: ● Uma thread é criada (~ 2Mb de RAM); ● Com 5.000 requisições simultâneas, seria necessário 10Gb de RAM. ● Agravante, as requisições são bloqueantes! 12
  13. 13. Simulando o problema (resultados obtidos)Em “testes de stress”, foi obtido os seguintes resultados: Document Path: /CloudConf/homol_php.php Document Length: 0 bytes Concurrency Level: 200 Time taken for tests: 298.898 seconds Complete requests: 10000 Failed requests: 0 Write errors: 0 Total transferred: 2110000 bytes HTML transferred: 0 bytes Requests per second: 33.46 [#/sec] (mean) Time per request: 5977.967 [ms] (mean) Time per request: 29.890 [ms] (mean, across all concurrent requests) Transfer rate: 6.89 [Kbytes/sec] received 13
  14. 14. O que fazemos agora?Como melhorar essa estatística? Escalabilidade vertical? Ou, escalabilidade horizontal? 14
  15. 15. Que tal um novo paradigma?E se passarmos a pensar de uma nova forma?● E/S não bloqueantes;● Single thread;● E/S assincronas. 15
  16. 16. E quem faz esse trabalho para nós? (http://www.nodejs.org) 16
  17. 17. O que é ?Resumidamente, essa tecnologia nos permite:● Alta escalabilidade da aplicação desenvolvida;● Desenvolvimento server-side em javascript. 17
  18. 18. Como o foi construído?O Node.js, foi desenvolvido utilizando:● C/C++ e Javascript;● Funciona baseado em “Event Loop”, ou seja, a aplicação semantém em espera, aguardando a entrada de dados para aisim, realizar um processamento. 18
  19. 19. Chega de teoria, e vamos para prática? 19
  20. 20. O em ação webservice_node.php?id=12 JSON (ou xml) 20
  21. 21. Performance da nossa nova arquiteturaFazendo uso do node.js, obtemos a seguinte estatística: Document Path: /CloudConf/homol_node.php Document Length: 0 bytes Concurrency Level: 200 Time taken for tests: 60.513 seconds Complete requests: 10000 Failed requests: 0 Write errors: 0 Total transferred: 2110000 bytes HTML transferred: 0 bytes Requests per second: 165.25 [#/sec] (mean) Time per request: 1210.269 [ms] (mean) Time per request: 6.051 [ms] (mean, across all concurrent requests) Transfer rate: 34.05 [Kbytes/sec] received 21
  22. 22. Comparação das duas soluções Apache/PHP5 vs Node.jsDocument Path: /CloudConf/homol_php.php Document Path: /CloudConf/homol_node.phpDocument Length: 0 bytes Document Length: 0 bytesConcurrency Level: 200 Concurrency Level: 200 ~5 min → 1minTime taken for tests: 298.898 seconds Time taken for tests: 60.513 secondsComplete requests: 10000 Complete requests: 10000Failed requests: 0 Failed requests: 0Write errors: 0 Write errors: 0Total transferred: 2110000 bytes Total transferred: 2110000 bytesHTML transferred: 0 bytes HTML transferred: 0 bytesRequests per second: 33.46 [#/sec] (mean) Requests per second: 165.25 [#/sec] (mean)Time per request: 5977.967 [ms] (mean) Time per request: 1210.269 [ms] (mean)Time per request: 29.890 [ms] Time per request: 6.051 [ms] (mean, across all concurrent requests) (mean, across all concurrent requests)Transfer rate: 6.89 [Kbytes/sec] received Transfer rate: 34.05 [Kbytes/sec] received 22
  23. 23. No que aplicar oPodemos desenvolver pequenos módulos de fácilmanutenção em node.js para necessidadesespecíficas, principalmente aquelas que tratam grandesnúmeros de requisições. 23
  24. 24. Até onde vai o poder do ?As requisições não param de crescer? 24
  25. 25. Tranquilize-seO node.js está preparado para isso...Ele possui extensões que permitem o desenvolvimentode aplicações em Cluster, dividindo a execução dosseus processos entre as CPUs disponíveis, de forma simplese automática. 25
  26. 26. ConclusãoO Node.js, apesar de ser um paradigma recém-criado, com menosde 5 anos de existência, vem demonstrando ser um modelo dedesenvolvimento extremamente funcional, e de simplesutilização.Apesar das simulações não terem sido realizadas em um“supercomputador”, mas sim, em um servidor de médio porte, osresultados foram muito animadores: 80% em ganho de performance!Este ganho de performance, que é comprovado, tem chamadoatenção do nosso mercado, e, já estamos trabalhando com essanova demanda. 26
  27. 27. ObrigadoThiago Henrique de Oliveirathiago.oliveira@4linux.com.br @4LinuxBR /4linux 27

×