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.

15年前に作ったアプリを現在に蘇らせてみた話

1,499 views

Published on

15年前に Apache + Perl CGI で作成したwebアプリを、JS
(React)、sinatra、unicorn、nginx、docker など現在の技術を使ってリメイクした時の話です。

Published in: Technology
  • Be the first to like this

15年前に作ったアプリを現在に蘇らせてみた話

  1. 1. 15 YO 2017 6
  2. 2. Twitter : @nk_ngzm Blog : http://ngzm.hateblo.jp/ SI
  3. 3. 15
  4. 4. http://www.zumin.net/hamkko/zham.cgi
  5. 5. • Perl (v5) CGI • Apache + mod_cgi 
 https://github.com/ngzm/legacy_zcgi/tree/master/hamkko Apache mod_cgi
  6. 6. • HTTP • EUC utf-8 • HTML 4.01
 
 
 
 
 
 
 • 
 TSV • chrome 

  7. 7. • 1 MS Paint
  8. 8. ..
  9. 9. http://hamcco.free-game.space/
  10. 10. ( )
  11. 11. LOOK & FEEL (*´-`)
  12. 12. KWSK
  13. 13. • - Javascript / React SPA • - Sinatra perl ruby - Rack middleware unicorn - nginx https://github.com/ngzm/hamcco
  14. 14. • • Ajax REST • utf-8 • HTML5 / CSS3 → • 
 Yaml • Docker • Chat UserLocal
  15. 15. Hamcco / Scaleway React React-router Axios DOCKER CONTAINER nginx DOCKER CONTAINER unicorn sinatra faraday userlocal http://ai.userlocal.jp/
  16. 16. Hamcco React Components HamccoImage Component HamccoMessage Component HamccoMeter Component HamccoInput Component HamccoPanel Component Hamcco Component
  17. 17. Hamcco Server Application Sinatra <<Modular Application>> HamController <<Helper>> HttpHelper <<Helper>> ChatHelper UserLocal Hamcco Dic1Handler Dic2Handler Dic3Handler dic1 dic2 dic3 Axios User Local
  18. 18. Hamcco App • View 
 React v15.5 https://facebook.github.io/react/
 
 • 
 React Router 4.1 https://reacttraining.com/react-router/
 
 • HTTP 
 Axios 0.16 https://github.com/mzabriskie/axios
  19. 19. Hamcco App • 
 Create React App https://github.com/facebookincubator/create-react-app
 • 
 react-scripts 0.9.5
 
 (Babel, webpack, Autoprefixer, Jest, and so on..)
 • 
 eslint + eslint-airbnb
  20. 20. Hamcco App • 
 Sinatra 2.0.0 http://www.sinatrarb.com/
 
 • Rack 
 unicorn 2.0.0 https://bogomips.org/unicorn/
 
 • HTTP 
 Faraday 0.12.1 https://github.com/lostisland/faraday
  21. 21. Hamcco App • Web 
 nginx 1.13 latest https://nginx.org/
 • 
 docker 17.0 https://www.docker.com/
 • 
 Scaleway https://www.scaleway.com/ 
 • Chatbot Hamcco 
 User Local http://ai.userlocal.jp/document/free/top/
  22. 22. • React Router V3 V4 
 • 1 Angular_js node.js bower gulp 

  23. 23. • docker unicorn 
 docker unicorn • docker container 1 SIGTERM 
 10 SIGKILL 
 • unicorn Graceful Shutdown SIGQUIT 
 unicorn SIGTERM 
 SIGKILL Heroku https://devcenter.heroku.com/articles/rails-unicorn
  24. 24. • docker unicorn ✓ docker unicorn SHELL ✓ unicorn # Handling docker stop signal (TERM to QUIT) before_fork do |server, worker| Signal.trap 'TERM' do master_pid = Process.pid puts 'Unicorn master intercepting TERM and sending myself QUIT instead' puts "Unicorn master PID: #{master_pid}" Process.kill 'QUIT', master_pid end end SIGTERM SIGQUIT unicorn Graceful Restart SIGUSR2 TODO:
  25. 25. Scaleway 1 400
  26. 26. • - Twitter OpenID Connect - - SNS BOT • - FaaS - Sinatra Rails -
  27. 27. • - - AI • - - HTTPS - WebSocket - - AWS

×