SlideShare a Scribd company logo
Real-Time Weather Tracking,
    Big Data, and Camel
    Shane Kent, Ram Raju, and David Reiser
    May 16, 2012




                                             Photos: Corel, Photodisk; Photodisk; Photodisk; Comstock; DOT
1
Overview of the FAA’s SWIM Program

      System Wide Information Management
      http://www.swim.gov




2
Overview of the FAA’s ITWS Program

    Integrated Terminal Weather System




3
Our Role in SWIM & ITWS

    •   Conversion of a legacy system to a modern SOA-based system
        utilizing FuseSource.
    •   Real-time weather events distributed from sensor to external users in
        less than 1 second (average).
    •   Compressed data stream is approximately 1 Megabit per second,
        streaming constantly (approximately 9 Gigabytes per day).
    •   Data is processed and distributed by an ActiveMQ broker network.
    •   Very high throughput with ActiveMQ.
    •   All data is stored permanently.
    •   All data is accessible through HBase.




4
Integration Challenge # 1
    •   Persist streaming weather data from the incoming SWIM ITWS
        weather feed and store it in HBase Tables.
    •   Read the data from HBase Tables and display it on clients (for
        example Google Maps).
    •   Approach should be highly available, fault-tolerant, have low latency,
        and be scalable to meet fluctuating (seasonal) load.




5
Integration Solution # 1




     JMS                ActiveMQ
             STOMP                 THRIFT   HBase
     Topic                Thrift
                         Adapter            Tables




6
Integration Solution # 1 (continued)
    …
    my $stomp_in;
    eval {
    local $SIG{ ALRM} = sub { die "timed outn" };
    alarm( 10);
    $stomp_in = Net::Stomp->new( { hostname => $DATA_SRV_IP, port => '61613' } );
    $stomp_in->connect( { login => ‘*********', passcode => ‘**********' } );
    $stomp_in->subscribe({
                      destination => $DATA_TOPIC,
                            'ack' => 'client',
          'activemq.prefetchSize' => 1
      });
      };

    …
    my $frame;
    my $x;
    eval {
    local $SIG{ ALRM} = sub { die "no datan" };
    alarm( 10);
    $frame = $stomp_in->receive_frame;
    $x = $frame->body;
    alarm( 0);
    };

    …
    $COLUMN_FAMILY = $prod_type;
    $KEY = $gentime;
    my $col_start = 'itws-' . $gentime . '-' . $exptime . '-' . $tracon . '-' . $airport . '-' . $prod_type . '-' . $rectime . '-' . $srv_time . '.xml';

    my $mutation1 = Hbase::Mutation->new({ column => "$COLUMN_FAMILY:$col_start.airport", value => $airport });
    my $mutation2 = Hbase::Mutation->new({ column => "$COLUMN_FAMILY:$col_start.exptime", value => $exptime });
    my $mutation3 = Hbase::Mutation->new({ column => "$COLUMN_FAMILY:$col_start.content", value => $x });

    my $mutations = [ $mutation1, $mutation2, $mutation3 ];

    my $date = qx/date/;
    chomp($date);
    print LOG $date . "> Adding data to HBase... ";
    $client->mutateRow($TABLE, $KEY, $mutations);
    if ($? == 0) {
       print LOG "Success.n";
       print LOG "$client->mutateRow ($TABLE, $KEY, $mutations)n";
    }
    else { print LOG "ERROR!n" }

    …




7
Integration Challenge # 2

    •   Periodically (for example every 5 minutes) check current weather
        information (for example wind speed/direction) from an external
        weather feed (for example Yahoo Weather).
    •   Translate this data into compatible data formats.
    •   Store it in an HBase table so it can be accessed by clients.




8
Integration Solution # 2




    External                Camel
               Camel AHC              Camel AHC   HBase
      Wx       Endpoint    Stargate   Endpoint
     Feed                                         Tables
                           Adapter




9
Integration Solution # 2 (continued)
     public class MyRouteBuilder extends RouteBuilder {
          @Override
          public void configure() throws Exception {
          from("timer:myTimerEvent?fixedRate=true&period=300000")
          .process(new WeatherProcessor())
          .to("ahc:get_wx")
          .convertBodyTo(String.class)
          .process(new HBaseWriter())
          .transform(simple("${in.headers.Last}"))
          .to("ahc:store_data");
          }
     }

     public class HBaseWriter implements Processor {

         public void process(Exchange exchange) throws Exception {
              SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhhmmss");
              String wxTime = sdf.format(new Date());
              exchange.getIn().setHeader(Exchange.HTTP_URI, "http://localhost:8080/yahoowx/"+wxTime+"/currentwx:NYC");
              exchange.getIn().setHeader(Exchange.HTTP_METHOD, ("POST"));
              exchange.getIn().setHeader(Exchange.CONTENT_TYPE, ("application/octet-stream"));
              String currentWx = exchange.getIn().getBody(String.class).replaceAll(""", "");
              exchange.getIn().setHeader("Last", currentWx);
         }
     }



     public class WeatherProcessor implements Processor {

         @Override
         public void process(Exchange exchange) throws Exception {
              exchange.getIn().setHeader(Exchange.HTTP_URI, "http://weather.yahooapis.com/forecastjson?jsoncallback=?&w=2459115");
         }
     }




10
Integration Challenge # 3

     •   Read incoming compressed data from our JMS Topics.
     •   Unzip the XML data.
     •   Store the streaming data into the HDFS file system so we can
         access it for MapReduce (with Hadoop) or from HBase.
     •   Keep a log of incoming data.




11
Integration Solution # 3




      JMS     Camel JMS   Camel
                                    Camel HDFS   HDFS
      Topic   Endpoint     HDFS     Endpoint
                          Adapter                Files




12
Integration Solution # 3

     public class ServerRoutes extends RouteBuilder {

     @Override
      public void configure() throws Exception {

      from("jms:topic:FOO.ZIP.OUT")
          .unmarshal().zip()
          .to("hdfs://ip-address/output?splitStrategy=MESSAGES:1&replication=3")
          .to("log:camel");
      }
     }




13
Summary



               Camel Rocks!
     •And so do other open source projects like ActiveMQ, ServiceMix,
     HBase, Hadoop …




14
Benefits of Using Opensource Software

     • High quality software.
     • When combined with topnotch support, creates an ideal
       programming environment.
     • Enables a “Configure, don’t code” approach.




15
Open Source Software We’re Using

     •   Apache Camel
     •   Apache ActiveMQ
     •   Apache Servicemix
     •   Apache CXF
     •   Apache Hadoop
     •   Apache HBase
     •   Apache ZooKeeper
     •   Apache Maven




16
Data Quality Assurance

     How we ensured that the legacy data translation produced correct
     results …




17
Google Maps Display of a Busy Weather Day at Miami




18
View From the Tower at JFK International Airport




19
Planes Taxiing at JFK




20
Future Concepts




21
Future Concepts (continued)




22
Google Earth API Demo




23
Very recent developments:

     If you or your organization would like to become a
        consumer of the real-time SWIM-ITWS SOA data,
        please contact:

     Tony Colon – ITWS SWIM Segment-One Capability
       (ISSC) Program Manager:
      tony.colon@dot.gov
      (617) 494-2647




24
Questions?

     Thank you.




25

More Related Content

PDF
INFLUXQL & TICKSCRIPT
PDF
ClickHouse Monitoring 101: What to monitor and how
PDF
Clickhouse Capacity Planning for OLAP Workloads, Mik Kocikowski of CloudFlare
PDF
Monitoring InfluxEnterprise
PDF
hadoop
PDF
Hazelcast
PDF
Creating Beautiful Dashboards with Grafana and ClickHouse
PDF
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
INFLUXQL & TICKSCRIPT
ClickHouse Monitoring 101: What to monitor and how
Clickhouse Capacity Planning for OLAP Workloads, Mik Kocikowski of CloudFlare
Monitoring InfluxEnterprise
hadoop
Hazelcast
Creating Beautiful Dashboards with Grafana and ClickHouse
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)

What's hot (20)

PPTX
PDF
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10
PDF
Monitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
PDF
ClickHouse Deep Dive, by Aleksei Milovidov
PPTX
Monitoring MySQL with OpenTSDB
PDF
Altinity Cluster Manager: ClickHouse Management for Kubernetes and Cloud
PDF
Backing up Wikipedia Databases
PDF
Big Data and Beautiful Video: How ClickHouse enables Mux to Deliver Content a...
PDF
Webinar slides: Adding Fast Analytics to MySQL Applications with Clickhouse
PDF
Dangerous on ClickHouse in 30 minutes, by Robert Hodges, Altinity CEO
PDF
Sessionization with Spark streaming
PDF
Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...
PDF
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
PPTX
HBaseCon 2013: OpenTSDB at Box
PDF
Mux loves Clickhouse. By Adam Brown, Mux founder
PDF
Compliance as Code with terraform-compliance
PDF
Our Story With ClickHouse at seo.do
PDF
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
PDF
Advanced Postgres Monitoring
Polyglot ClickHouse -- ClickHouse SF Meetup Sept 10
Monitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
ClickHouse Deep Dive, by Aleksei Milovidov
Monitoring MySQL with OpenTSDB
Altinity Cluster Manager: ClickHouse Management for Kubernetes and Cloud
Backing up Wikipedia Databases
Big Data and Beautiful Video: How ClickHouse enables Mux to Deliver Content a...
Webinar slides: Adding Fast Analytics to MySQL Applications with Clickhouse
Dangerous on ClickHouse in 30 minutes, by Robert Hodges, Altinity CEO
Sessionization with Spark streaming
Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
HBaseCon 2013: OpenTSDB at Box
Mux loves Clickhouse. By Adam Brown, Mux founder
Compliance as Code with terraform-compliance
Our Story With ClickHouse at seo.do
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
Advanced Postgres Monitoring
Ad

Viewers also liked (16)

PPT
Money market3ce Ch02
PPT
Econ315 Money and Banking: Learning Unit #03: Financial System and Asymmetric...
PPT
camel model
PPT
Implementing WebServices with Camel and CXF in ServiceMix
PPTX
Difference between cooperative bank and commercial bank
ODP
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
PPTX
Function of commercial banks in bangladesh
PPT
Functions of commercial banks
PPT
Financial intermediation
PPTX
International Monetary Fund (IMF)
PPS
Yarn Manufacturing
PPTX
Role and function of imf
PPTX
Risk types
PPT
International Monetary Fund
PDF
Small is beautiful. Your credit union can remain small and successful.
Money market3ce Ch02
Econ315 Money and Banking: Learning Unit #03: Financial System and Asymmetric...
camel model
Implementing WebServices with Camel and CXF in ServiceMix
Difference between cooperative bank and commercial bank
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
Function of commercial banks in bangladesh
Functions of commercial banks
Financial intermediation
International Monetary Fund (IMF)
Yarn Manufacturing
Role and function of imf
Risk types
International Monetary Fund
Small is beautiful. Your credit union can remain small and successful.
Ad

Similar to Camel one v3-6 (20)

PPTX
Hazelcast and MongoDB at Cloud CMS
PDF
How lagom helps to build real world microservice systems
PDF
Microservices Manchester: How Lagom Helps to Build Real World Microservice Sy...
PPT
Spring and Cloud Foundry; a Marriage Made in Heaven
PDF
Codepot - Pig i Hive: szybkie wprowadzenie / Pig and Hive crash course
PDF
Store and Process Big Data with Hadoop and Cassandra
PPTX
Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...
PDF
R the unsung hero of Big Data
PPT
TopicMapReduceComet log analysis by using splunk
PDF
Performance measurement and tuning
 
PDF
Monitoring VoIP Systems
PDF
OSMC 2014: Monitoring VoIP Systems | Sebastian Damm
PPTX
PHP Continuous Data Processing
PPTX
CloudStack Meetup London - Primary Storage Presentation by SolidFire
PPTX
Solid fire cloudstack storage overview - CloudStack European User Group
KEY
Aimaf
PDF
Cascading Through Hadoop for the Boulder JUG
POTX
Apache Spark Streaming: Architecture and Fault Tolerance
PPTX
Ingesting streaming data for analysis in apache ignite (stream sets theme)
PDF
Log everything! @DC13
Hazelcast and MongoDB at Cloud CMS
How lagom helps to build real world microservice systems
Microservices Manchester: How Lagom Helps to Build Real World Microservice Sy...
Spring and Cloud Foundry; a Marriage Made in Heaven
Codepot - Pig i Hive: szybkie wprowadzenie / Pig and Hive crash course
Store and Process Big Data with Hadoop and Cassandra
Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...
R the unsung hero of Big Data
TopicMapReduceComet log analysis by using splunk
Performance measurement and tuning
 
Monitoring VoIP Systems
OSMC 2014: Monitoring VoIP Systems | Sebastian Damm
PHP Continuous Data Processing
CloudStack Meetup London - Primary Storage Presentation by SolidFire
Solid fire cloudstack storage overview - CloudStack European User Group
Aimaf
Cascading Through Hadoop for the Boulder JUG
Apache Spark Streaming: Architecture and Fault Tolerance
Ingesting streaming data for analysis in apache ignite (stream sets theme)
Log everything! @DC13

Recently uploaded (20)

PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PPTX
The various Industrial Revolutions .pptx
PDF
project resource management chapter-09.pdf
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
August Patch Tuesday
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
O2C Customer Invoices to Receipt V15A.pptx
Hindi spoken digit analysis for native and non-native speakers
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
Getting started with AI Agents and Multi-Agent Systems
A comparative study of natural language inference in Swahili using monolingua...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Final SEM Unit 1 for mit wpu at pune .pptx
The various Industrial Revolutions .pptx
project resource management chapter-09.pdf
A contest of sentiment analysis: k-nearest neighbor versus neural network
NewMind AI Weekly Chronicles – August ’25 Week III
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Chapter 5: Probability Theory and Statistics
cloud_computing_Infrastucture_as_cloud_p
Group 1 Presentation -Planning and Decision Making .pptx
August Patch Tuesday
A novel scalable deep ensemble learning framework for big data classification...
Zenith AI: Advanced Artificial Intelligence
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf

Camel one v3-6

  • 1. Real-Time Weather Tracking, Big Data, and Camel Shane Kent, Ram Raju, and David Reiser May 16, 2012 Photos: Corel, Photodisk; Photodisk; Photodisk; Comstock; DOT 1
  • 2. Overview of the FAA’s SWIM Program System Wide Information Management http://www.swim.gov 2
  • 3. Overview of the FAA’s ITWS Program Integrated Terminal Weather System 3
  • 4. Our Role in SWIM & ITWS • Conversion of a legacy system to a modern SOA-based system utilizing FuseSource. • Real-time weather events distributed from sensor to external users in less than 1 second (average). • Compressed data stream is approximately 1 Megabit per second, streaming constantly (approximately 9 Gigabytes per day). • Data is processed and distributed by an ActiveMQ broker network. • Very high throughput with ActiveMQ. • All data is stored permanently. • All data is accessible through HBase. 4
  • 5. Integration Challenge # 1 • Persist streaming weather data from the incoming SWIM ITWS weather feed and store it in HBase Tables. • Read the data from HBase Tables and display it on clients (for example Google Maps). • Approach should be highly available, fault-tolerant, have low latency, and be scalable to meet fluctuating (seasonal) load. 5
  • 6. Integration Solution # 1 JMS ActiveMQ STOMP THRIFT HBase Topic Thrift Adapter Tables 6
  • 7. Integration Solution # 1 (continued) … my $stomp_in; eval { local $SIG{ ALRM} = sub { die "timed outn" }; alarm( 10); $stomp_in = Net::Stomp->new( { hostname => $DATA_SRV_IP, port => '61613' } ); $stomp_in->connect( { login => ‘*********', passcode => ‘**********' } ); $stomp_in->subscribe({ destination => $DATA_TOPIC, 'ack' => 'client', 'activemq.prefetchSize' => 1 }); }; … my $frame; my $x; eval { local $SIG{ ALRM} = sub { die "no datan" }; alarm( 10); $frame = $stomp_in->receive_frame; $x = $frame->body; alarm( 0); }; … $COLUMN_FAMILY = $prod_type; $KEY = $gentime; my $col_start = 'itws-' . $gentime . '-' . $exptime . '-' . $tracon . '-' . $airport . '-' . $prod_type . '-' . $rectime . '-' . $srv_time . '.xml'; my $mutation1 = Hbase::Mutation->new({ column => "$COLUMN_FAMILY:$col_start.airport", value => $airport }); my $mutation2 = Hbase::Mutation->new({ column => "$COLUMN_FAMILY:$col_start.exptime", value => $exptime }); my $mutation3 = Hbase::Mutation->new({ column => "$COLUMN_FAMILY:$col_start.content", value => $x }); my $mutations = [ $mutation1, $mutation2, $mutation3 ]; my $date = qx/date/; chomp($date); print LOG $date . "> Adding data to HBase... "; $client->mutateRow($TABLE, $KEY, $mutations); if ($? == 0) { print LOG "Success.n"; print LOG "$client->mutateRow ($TABLE, $KEY, $mutations)n"; } else { print LOG "ERROR!n" } … 7
  • 8. Integration Challenge # 2 • Periodically (for example every 5 minutes) check current weather information (for example wind speed/direction) from an external weather feed (for example Yahoo Weather). • Translate this data into compatible data formats. • Store it in an HBase table so it can be accessed by clients. 8
  • 9. Integration Solution # 2 External Camel Camel AHC Camel AHC HBase Wx Endpoint Stargate Endpoint Feed Tables Adapter 9
  • 10. Integration Solution # 2 (continued) public class MyRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { from("timer:myTimerEvent?fixedRate=true&period=300000") .process(new WeatherProcessor()) .to("ahc:get_wx") .convertBodyTo(String.class) .process(new HBaseWriter()) .transform(simple("${in.headers.Last}")) .to("ahc:store_data"); } } public class HBaseWriter implements Processor { public void process(Exchange exchange) throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhhmmss"); String wxTime = sdf.format(new Date()); exchange.getIn().setHeader(Exchange.HTTP_URI, "http://localhost:8080/yahoowx/"+wxTime+"/currentwx:NYC"); exchange.getIn().setHeader(Exchange.HTTP_METHOD, ("POST")); exchange.getIn().setHeader(Exchange.CONTENT_TYPE, ("application/octet-stream")); String currentWx = exchange.getIn().getBody(String.class).replaceAll(""", ""); exchange.getIn().setHeader("Last", currentWx); } } public class WeatherProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { exchange.getIn().setHeader(Exchange.HTTP_URI, "http://weather.yahooapis.com/forecastjson?jsoncallback=?&w=2459115"); } } 10
  • 11. Integration Challenge # 3 • Read incoming compressed data from our JMS Topics. • Unzip the XML data. • Store the streaming data into the HDFS file system so we can access it for MapReduce (with Hadoop) or from HBase. • Keep a log of incoming data. 11
  • 12. Integration Solution # 3 JMS Camel JMS Camel Camel HDFS HDFS Topic Endpoint HDFS Endpoint Adapter Files 12
  • 13. Integration Solution # 3 public class ServerRoutes extends RouteBuilder { @Override public void configure() throws Exception { from("jms:topic:FOO.ZIP.OUT") .unmarshal().zip() .to("hdfs://ip-address/output?splitStrategy=MESSAGES:1&replication=3") .to("log:camel"); } } 13
  • 14. Summary Camel Rocks! •And so do other open source projects like ActiveMQ, ServiceMix, HBase, Hadoop … 14
  • 15. Benefits of Using Opensource Software • High quality software. • When combined with topnotch support, creates an ideal programming environment. • Enables a “Configure, don’t code” approach. 15
  • 16. Open Source Software We’re Using • Apache Camel • Apache ActiveMQ • Apache Servicemix • Apache CXF • Apache Hadoop • Apache HBase • Apache ZooKeeper • Apache Maven 16
  • 17. Data Quality Assurance How we ensured that the legacy data translation produced correct results … 17
  • 18. Google Maps Display of a Busy Weather Day at Miami 18
  • 19. View From the Tower at JFK International Airport 19
  • 23. Google Earth API Demo 23
  • 24. Very recent developments: If you or your organization would like to become a consumer of the real-time SWIM-ITWS SOA data, please contact: Tony Colon – ITWS SWIM Segment-One Capability (ISSC) Program Manager: tony.colon@dot.gov (617) 494-2647 24
  • 25. Questions? Thank you. 25