02 stock gwdemo

380 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
380
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

02 stock gwdemo

  1. 1. The ridiculously convoluted Business requirement«We need a gateway for aggregating stock quotes from3 separate parties.The quotes are to be sent to our backend tradingapplication as well as our website.Everything needs to be in near real-time.»PRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING
  2. 2. Reuters has agreed on sending an FTP file containing their stock quote updatesCSV format ORA,EUR,30,10,29,2012-05-05,11:00:00 GOOG,EUR,40,20,35,2012-05-05,11:00:00 ELX,EUR,50,30,44,2012-05-05,11:00:00PRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING
  3. 3. Nasdaq will call a webservice provided by us for each quote update Soap/XML format<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"> <Header/> <Body> <TransmitStockUpdate xmlns:ser="http://www.nasdaq.com/services/"> <Feed timestamp="2012-04-08:10.00.00" currency="SEK"symbol="ERIC"> <dailyLow>5</:dailyLow> <dailyHigh>40</dailyHigh> <current>20</current> </Feed> </TransmitStockUpdate> </Body></Envelope> PRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING
  4. 4. TickerTech has a public http service which can be queried to get the current quote figuresJSON formatWe need to poll (the other cases where push style) {"feeds":[ {"currency":"USD", "symbol":"IBM", "timestamp":"2001-12-31T12:00:00", "dailyLow":"70", "dailyHigh":"100", "current":"89"}, {"currency":"USD", "symbol":"HP", "timestamp":"2001-12-31T12:00:00", "dailyLow":"70", "dailyHigh":"100", "current":"89"} ]}PRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING
  5. 5. PRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING
  6. 6. What we just saw...Route declarations can be mixed and matched (XML, Java, Groovy)Endpoint abstraction is a really powerful conceptReuse your existing Maven/Gradle build processCamel does not help you with transformations But delegates beautifully to your choice of template or programming language PRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING
  7. 7. New requirement”We are receiving repeated quotes for each trigger to TickerTech, we only want updated quotes”Would have been a bit easier to implement if TickerTech had a service like ”/tickers?updatedSince=xyz”Instead we need to look for idempotence PRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING
  8. 8. RevisitedPRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING

×