GlassFish in the Real World Mike Croft
GlassFish in the Real World Introductions
Who Am I? C2B2 Expert Support consultant Ex-IBM Snowboarder @croft
Who are you? CS/Software Engineering/etc students? Anyone know what Java EE/SE/ME is?
Why Are We Here? What’s a “Middleware”? What is RASP? Why is it important? How do I do this for real?
GlassFish in the Real World What’s a “middleware”?
What’s a “Middleware”? Internet Web Browser The Middle JEE Application Server Internet Web Browser DB Fire wall Load Balancer JEE Application Server The Middle
GlassFish in the Real World What is “rasp”?
Non-Functional Requirements These Are Priority 1 Requirements! What is RASP? Non-Functional Requirements Reliability Availability Scalability Performance These Are Priority 1 Requirements!
RELIABILITY What is RASP? Customers need confidence No Data Loss or Corruption Prevents Exploits Fraud Reputation Risk Legal Challenge Customers need confidence in their transactions
AVAILABILITY What is RASP? Available for customers No availability? No transactions Transactions = £££ Receive your P45 if you can’t sort it!
AVAILABILITY What is RASP? Systems Complex Systems must be 24/7 No Maintenance Windows Online Upgrade Graceful Degradation Failure Detection
Overall Availability = 0.99*0.99*0.99 = 97% What is RASP? AVAILABILITY System 1 2 3 99% Availability Overall Availability = 0.99*0.99*0.99 = 97% How many days downtime?
AVAILABILITY What is RASP? Redundancy Decoupling 99% Availability System 1 99% Availability System 2 System 3 System 99% Availability Pair = 1 – (0.01*0.01) = 99.99% Overall = 0.9999 x 0.9999 x 0.9999 = 99% Overall = 99%
AVAILABILITY What is RASP? Cluster Node 1 Cluster Node 2 Cluster Node 3 Cluster Availability = 99.99% ONLY IF 2 Nodes can cope with peak load Otherwise Availability is only 99%
Without a reduction in performance! What is RASP? SCALABILITY Add hardware in response to demand Without a reduction in performance!
Cloud Enables Elastic Scalability What is RASP? SCALABILITY Success of the Business or Service Growth of Mobile Huge Variation of Load through a period Sudden Large Spikes due to events Cloud Enables Elastic Scalability
SCALABILITY What is RASP? Scale UP Add hardware to a single host Add CPUs, memory or disk. Typical way of scaling databases Expensive for Price/Performance Increase server density Image credit: Cisco
SCALABILITY What is RASP? Scale OUT Add Additional Servers Add Load Balancer Distribute traffic across the servers Much Cheaper than Scale Up Has HA benefits Image credit: Cisco
What is RASP? SCALABILITY Nirvana
SCALABILITY What is RASP? Typical Architecture Node 1 Load Balancer 3 4 2 Database Nodes Host Stateless Services Database contains Persistent State
How fast does a single transaction take to execute? What is RASP? PERFORMANCE How fast does a single transaction take to execute? Faster Performance = Happier Customers Faster Performance = More Transactions
PERFORMANCE What is RASP? Raw Algorithmic Performance Resource Limitations Not enough cpu, disk, memory Resource Contention Locks IO Latency Network, Disk
Time delay in requesting an operation and it being initiated What is RASP? PERFORMANCE LATENCY Time delay in requesting an operation and it being initiated Key factor in large scale distributed applications Typically not taken into account during development
PERFORMANCE What is RASP? Latency Factors Network Distance Network Reliability Data Size Operation Granularity Resource Contention JVM GC
Move the Data and Processing What is RASP? PERFORMANCE Solution? Move the Data and Processing Close Together
GlassFish in the Real World How do I do this for real?
How Do I Do This For Real? Acquire Servers
How Do I Do This For Real? Acquire GlassFish 4 https://glassfish.java.net/download.html
How Do I Do This For Real? Configure GlassFish asadmin tool asadmin start-domain domain1 asadmin change-admin-password --user admin asadmin enable-secure-admin asadmin restart-domain asadmin tool Admin console
How Do I Do This For Real? Demo!
GlassFish in the Real World Any questions?