Your SlideShare is downloading. ×
The Service doing "Ping"
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

The Service doing "Ping"

138
views

Published on

Published in: Technology, Design

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
138
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
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. The Service doing “Ping”In a Service-Oriented Architecture, implementing“ping” utilities to monitor services and to deducebusiness information such as checking SLAs is proneto error Ignaz Wanders
  • 2. The Ping Utility• Ping is originally a computer network administration utility used to test thereachability of a host on an IP network and to measure the round-trip time formessages sent from the originating host to a destination computer. (Wikipedia)• The term originates from active sonar technology• Defined in 1983• Phased out from 2003 onwards– Exploited by internet worms to find new computers– Added load to the system, causing problems with routers across the internet– Considered a security risk• E.g., Ping of Death (malformed ping resulting in buffer overflow)See http://en.wikipedia.org/wiki/Ping_(networking_utility)
  • 3. The world of servicesServiceConsumerapplicationServiceService“My service provider says he isavailable at least 90% of the time, soI will check him out regularly if hekeeps his promise!”2“My service depends onanother service, so I will notmake my service available ifmy service provider is notavailable.”31“If I depend on the availability ofanother service, I’ll ask if it isavailable, just before I use it.”“I need a ping!”
  • 4. The world of service pingsServiceConsumerapplicationServiceServicePing()Ping()Ping()Each service offers a Ping operationin the interface (WSDL)“I need a ping!”
  • 5. Real-life example 1: A service with special ping operation<wsdl:operation name="ping"><soap:operation style="document" soapAction="" /><wsdl:input><soap:header message="tns:Ping" part="header" use="literal" /><soap:body parts="body" use="literal" /></wsdl:input><wsdl:output><soap:header message="tns:PingResponse" part="header" use="literal" /><soap:body parts="body" use="literal" /></wsdl:output></wsdl:operation>
  • 6. Real-life example 2: A special ping service
  • 7. See if it is there, by using ping1 “If I depend on the availability ofanother service, I’ll ask if it isavailable, just before I use it.”This is brilliant. The network is known to have availabilityissues every now and then, especially with synchronousprotocols like HTTP.So before calling a SOAP web service, let’s do a ping first. If theservice doesn’t answer, we don’t call it with the real request.Flaws:1. There is no guarantee that after a successful ping, the realrequest will pass through.2. An unsuccessful ping does not guarantee that the realrequest would not have passed through.The conclusion drawn from the result of the ping can very well be wrong
  • 8. See if it is there, by using ping1 “If I depend on the availability ofanother service, I’ll ask if it isavailable, just before I use it.”Solution:Just call the service with the real request and make sure thatyou handle a connection error properly.This way, you have never taken the wrong decision.Compared with the ping “solution,” there will be moresuccessful hits, which means more business.
  • 9. Monitoring, by using ping“My service provider says he isavailable at least 90% of the time, soI will check him out regularly if hekeeps his promise!”2 Let’s do a ping every n minutes, and calculate the availabilitypercentage of the provider. This is a measure of the uptime ofthe service provider.Flaws:1. There is no guarantee that between two successfulpings, the service was really available.2. An unsuccessful ping can be an intermittent networkissue of very short duration, but it may be counted as nminutesThe conclusion drawn from the monitoring by pinging has nothing to do withthe real statistics of uptime of the provider
  • 10. Monitoring, by using ping“My service provider says he isavailable at least 90% of the time, soI will check him out regularly if hekeeps his promise!”2Solution:Just call the service with the real request and make sure thatyou handle a connection error properly.It doesn’t matter if the service provider is off-air in betweenrequests. All that matters is that at least x percent of yourrequests are served correctly. That’s what needs to be statedin a service level agreement. And that is what is measurable.
  • 11. Proactive service provisioning, by using ping“My service depends on anotherservice, so I will not make my serviceavailable if my service provider isnot available.”3 Let’s do a ping of the service provider. If he doesn’t answer Iwill close down my web application so consumers can’t usethis functionality. That avoids frustration of the peoplereceiving connection errors.I’ll open the web application again after a successful ping.(no kidding, this exists in real life!)Flaws:1. There can be no guarantee the service is down. The webapplication will sometimes be shut down erroneously.This can result in missed business.The conclusion drawn from the unsuccessful ping is invalid.
  • 12. Proactive service provisioning, by using ping“My service depends on anotherservice, so I will not make my serviceavailable if my service provider isnot available.”3Solution:Just call the service with the real request and make sure thatyou handle a connection error properly.Even in this way you can shut down the web application, forexample after p unsuccessful requests.Compared with the ping “solution,” there will be moresuccessful hits, which means more business.
  • 13. ConclusionDeath to ping services oroperations.
  • 14. ConclusionRather use proper errorhandling!