flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-9343) Add Async Example with External Rest API call
Date Mon, 28 May 2018 00:17:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-9343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16492196#comment-16492196
] 

ASF GitHub Bot commented on FLINK-9343:
---------------------------------------

Github user medcv commented on the issue:

    https://github.com/apache/flink/pull/5996
  
    @StephanEwen I updated the code and used `ExecutionContext.global` which makes use of
threadpool. 
    
    I tested it and results showed that the code sent off multiple requests concurrently (parallelism
= 1). 
    
    Bellow result shows that waiting time was overlaying with sending other requests and receiving
responses
    Output format: `(Quote Number, {Quote API response})` which `Quote Number` was sequential
input. 
    
    <img width="1397" alt="screen shot 2018-05-27 at 7 26 40 pm" src="https://user-images.githubusercontent.com/9163132/40592122-6ea8ef5a-61e9-11e8-99d5-2deeffa3d9be.png">
    
    Bellow result is when I called the external api within streaming API which shows the call
is blocked until request got resolved 
    
    <img width="1401" alt="screen shot 2018-05-27 at 8 04 37 pm" src="https://user-images.githubusercontent.com/9163132/40592123-70b03d62-61e9-11e8-9068-eef2a102f19b.png">
    



> Add Async Example with External Rest API call
> ---------------------------------------------
>
>                 Key: FLINK-9343
>                 URL: https://issues.apache.org/jira/browse/FLINK-9343
>             Project: Flink
>          Issue Type: Improvement
>          Components: Examples
>    Affects Versions: 1.4.0, 1.4.1, 1.4.2
>            Reporter: Yazdan Shirvany
>            Assignee: Yazdan Shirvany
>            Priority: Minor
>
> Async I/O is a good way to call External resources such as REST API and enrich the
stream with external data.
> Adding example to simulate Async GET api call on an input stream.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message