Java scalability considerations yogesh deshpande

  • 1,170 views
Uploaded on

Session presented at the 6th IndicThreads.com Conference on Java held in Pune, India on 2-3 Dec. 2011. …

Session presented at the 6th IndicThreads.com Conference on Java held in Pune, India on 2-3 Dec. 2011.

http://Java.IndicThreads.com

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,170
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
15
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Scalability Considerations Yogesh Deshpande GS Lab 1
  • 2. Agenda• Scalability • Overview • Relevance Of Java Platform • Vertical Scaling • Horizontal Scaling • Cloud ==Scalability ? true: false• Horizontal Scaling: Case Study • Problem Statement • Basic Principles • Architecture Highlights• References 2
  • 3. Scalability: Overview• Allowing more users/mediums to use your application with consistent performance• System should be capable of handling increasing load dynamically• May come with cost of additional processing overhead• Its more about architecture and not about the language/frameworks 3
  • 4. Relevance Of Java Platform• Components/libraries/tools are widely available with choice• Famous GC pause?• Specification like OSGI• Vertical scaling of JVM• Cloud Platforms• New languages like Scala, Clojure on JVM 4
  • 5. Vertical Scaling• Adding resource within the same logical unit to increase capacity – Add CPU/Storage/memory• Some Solutions – AzulSystem’s Zinc: JVM with huge heap size – Terracotta’s BigMemory: JVM-level clustering 5
  • 6. Horizontal Scaling• Adding multiple logical units of resources and making them work as a single unit – Think everything in terms of services – Most clustering solutions, distributed file systems, load-balancers help you with horizontal scalability – More processing overhead 6
  • 7. Cloud == Scalability ? true:false• Not 100% true or false• I-a-a-S: If system is not scaling on data center it will not scale on Cloud• P-a-a-S: Has some meat – Google App Engine – Amazon Elastic Beanstalk – Oracle cloud and many more 7
  • 8. Horizontal Scaling: Case Study• This particular product required to support one million users and processing packets coming from each user’s device at frequent time interval• Our aim was to build horizontal scalable system using java/j2ee technologies 8
  • 9. Horizontal Scaling: Principles• Statelessness: – Each service should be stateless• Caching: – Use as much as you can• Parallelizing: – Distribute workload• Sharding: – Divide and Rule 9
  • 10. Architecture Diagram of Case Study 10
  • 11. Magnified View of Data Layer 11
  • 12. Architecture Highlights of Case Study• RESTful Design: CRUD operations as Web service calls – Technology: Restlet.(Spring3.0 has it now)• Stateless UI: No Session on Server – Technology: Struts2.0• READ and WRITE layer: HTTP POST/PUT to WRITE and GET to READ – Technology: Hibernate for WRITE and Spring-jdbc for read. 12
  • 13. Architecture Highlights• MySQL: Master/Slave replication• Workload Distribution:Scheduled job to run at multiple nodes – Simple logic to divide for (Long userId : allUserIds) { if ((userId % noOfNodes) == nodeId) { processUserData(userId); } } – Technology: Quartz library 13
  • 14. Failover ConsiderationWhat can fail• Application Server• Database Server• Scheduled Jobs 14
  • 15. References- Various articles on - http://highscalability.com - http://www.oracle.com - http://www.ibm.com 15
  • 16. Thanks For further questions contact yogesh@gslab.com 16