Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

java in cloud - adopt cloud dev's DHARMA

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Wird geladen in …3
×

Hier ansehen

1 von 21 Anzeige

Weitere Verwandte Inhalte

Diashows für Sie (20)

Ähnlich wie java in cloud - adopt cloud dev's DHARMA (20)

Anzeige

Aktuellste (20)

java in cloud - adopt cloud dev's DHARMA

  1. 1. Java in Cloud — adopt Cloud Dev’s DHARMA Hochi Chuang Sr Backend Engineer Here2Shop.com
  2. 2. About me • Experiences • Java experience - J2SE, Android, JEE • Automation • DevOps • Here2Shop.com • High volume eCommerce platform • B2B2C - platform for both vendors and consumers • Small team with demonstrated ideas/skills to achieve big dream!! • We’re HIRING!!! —> send your resume to hochi.chuang@here2shop.com
  3. 3. DHARMA Concepts • Cloud Developer’s DHARMA - JavaOne 2014 • Documented • Highly cohesive/loosely coupled • Automated from commit to Cloud • Resource aware • Monitored thoroughly • Antifragile
  4. 4. Outline • Why Cloud? • Before You Go • Documented • Automation • Monitoring • Antifragile
  5. 5. Why Cloud? • Our goal • Going BIG!! • Flawless — hope so!!? • Scale horizontally • Fully automated • High availability and quick response
  6. 6. Why Java? • Our goal • Going BIG!! — proven • Flawless — mature & conventions • Fully automated — perfect integrated with Jenkins • Lots of resources & community support • Utilise AWS services to let us focus on core business implementations
  7. 7. AWS - the real world
  8. 8. Before You Go • AWS — tips should know before I started • VPC • Security groups • Disable SSH to all servers • Use AWS SDK for Java • Centralised logs • Automates everything • IAM for access control
  9. 9. DHARMA • Documented • Everything related to development process — Redmine wiki • Instructions for newbie • Development process — DO and DON’T • Coding conventions, code formatting, Eclipse settings • Environment setup, tools installation • CI and release cycle
  10. 10. DHARMA • Technologies • Architectural diagram • Software layers • API Docs — swagger • Testing — unit / api / gui tests • Security
  11. 11. DHARMA • Highly cohesive/loosely coupled • Class level • Single responsibility / interfaces • Component level • Divided by data stores / RESTful APIs
  12. 12. DHARMA • Automated from commit to cloud • Jenkins!! • Each commit — build + unit test • Daily build — build + unit / api / gui test • Deploy to Dev or Staging by promoting the build • UAT on staging —> promote to production
  13. 13. DHARMA • Jenkins setup • Build pipeline • https://wiki.jenkins-ci.org/display/JENKINS/Build +Pipeline+Plugin • Promoted build plugins • https://wiki.jenkins-ci.org/display/JENKINS/Promoted +Builds+Plugin
  14. 14. DHARMA • Resource aware • SES — starting quota 10,000/day, 5/sec • S3 bucket per account — 100 • S3 bucket name: use ‘-’ instead of ‘.’ — SSL • RDS IOPS — 3 IOPS / GB
  15. 15. DHARMA • Monitoring thoroughly • For usage • CloudWatch — instance metrics • CloudTrail — API access logs • For better security/details • WAF — F5 • Nagios — company intranet and centralised logs on AWS • Centralised, accessible and graph !!
  16. 16. DHARMA • Monitoring thoroughly • Diagnostic tools • top, htop, iftop, netstat, tcpdump, wireshark • Java utils: jps, jstat, jmap, jhat, hprof • Profiling tools: jProfiler, MAT, spring-insight
  17. 17. DHARMA • Antifragile • In opposite to fragile — Application must be ROBUST • Design for failure — Cloud Design Patterns • retries — guava-retrying • circuit-breaker — Netflix Hystrix
  18. 18. DHARMA • Antifragile • Elastic Scaling • Stateless components • Distributed data stores — RDS / MongoDB / S3 • Caching — ElastiCache • Search — CloudSearch
  19. 19. More things on Here2Shop • Sessions • on caches • API access • through API key and secret token
  20. 20. Thanks Q&A

×