Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C17F3200A5B for ; Wed, 25 May 2016 12:21:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BBBB6160A18; Wed, 25 May 2016 10:21:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DC070160A17 for ; Wed, 25 May 2016 12:21:46 +0200 (CEST) Received: (qmail 52234 invoked by uid 500); 25 May 2016 10:21:46 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flink.apache.org Delivered-To: mailing list user@flink.apache.org Received: (qmail 52224 invoked by uid 99); 25 May 2016 10:21:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 May 2016 10:21:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 963A41A03D6 for ; Wed, 25 May 2016 10:21:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 7x6Kkyhm1S3U for ; Wed, 25 May 2016 10:21:43 +0000 (UTC) Received: from mail-it0-f43.google.com (mail-it0-f43.google.com [209.85.214.43]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id DCD1D5F46D for ; Wed, 25 May 2016 10:21:42 +0000 (UTC) Received: by mail-it0-f43.google.com with SMTP id z189so60804796itg.0 for ; Wed, 25 May 2016 03:21:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=c9BSAU4RunIK+EDM+CoIk1Vakovyj2G45Q8TlDuj8r0=; b=bU1wHjzH7x6VbPu+BkGjhBq2QZHeEQoIamY+IqmFKd5N8mhBWV5FDk+NCyK03la6Ht aFWg301BIHDpw9XvLC5ERy0lgksbspJtLZLkTf2kAivxUcfb7ZTh1mejjdRGo/kt9JCU wMJ9axf3Gf/Dt9rnJAuukUMDi6Sj8oSM6JHlN/nHqGruO8L8Z9fLck0131k1kQCXsOA7 xlxxSqyTxuMh7vOq3SAHvKLil8tPCdCJpYCjw3/wKPS1yqBkvO8VAa0+MnptUicKXyXD sellNN2lfsJTTK3dCMv/LX0q1ydqpSgVfKFj4ueD3Vqq6Bemsl+/z2UZmsLGNpSTMWV4 GfUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=c9BSAU4RunIK+EDM+CoIk1Vakovyj2G45Q8TlDuj8r0=; b=JaAATWucFyoIqzNux6H1rUgyFst9Slyil/2ug0W4X2pvSNixskVOiB2lwhqKmGGNmf E5NYWwtbqZvUjbU93t47jqrdp/BYLXvJ5fvsC/VE75/eKy3r6bOk0xRRfj1m0WYROzN1 4Q0weSYHboQDZ9K5A4Do5P1tpCPmh7oF1ZxV10CxEAIIgQtQ60u3zuhsCRIs/2gZKTV1 vLWrflWvxq967hzLQdCVlAfUxUmLlkh0R5yIVYo+qdxTKyUw9DoMkbRBaz32KsRZOH0s TNFcwD61+dqtde5zYvkJcWXntWMNMdAiUnEF/8rxvRicyPD7AmAUsQahlfeP3GPY8860 PCow== X-Gm-Message-State: AOPr4FVf3BK144nVhxOSpFeTsAY/NYculaVwERZwJi6wbHBo7xoBua0Wc44a+LzuXGc5tKcPjoToshUdnJwSpA== MIME-Version: 1.0 X-Received: by 10.36.82.72 with SMTP id d69mr21996807itb.3.1464171701848; Wed, 25 May 2016 03:21:41 -0700 (PDT) Received: by 10.50.74.170 with HTTP; Wed, 25 May 2016 03:21:41 -0700 (PDT) In-Reply-To: References: Date: Wed, 25 May 2016 06:21:41 -0400 Message-ID: Subject: Re: Non blocking operation in Apache flink From: Maatary Okouya To: user@flink.apache.org Content-Type: multipart/alternative; boundary=001a1143dfb42dd4d00533a80afe archived-at: Wed, 25 May 2016 10:21:47 -0000 --001a1143dfb42dd4d00533a80afe Content-Type: text/plain; charset=UTF-8 Maybe the following can illustrate better what i mean http://doc.akka.io/docs/akka/2.4.6/scala/stream/stream-integrations.html#Integrating_with_External_Services On Wed, May 25, 2016 at 5:16 AM, Aljoscha Krettek wrote: > Hi, > there is no functionality to have asynchronous calls in user functions in > Flink. > > The asynchronous action feature in Spark is also not meant for such > things, it is targeted at programs that need to pull all data to the > application master. In Flink this is not necessary because you can specify > a whole plan of operations before executing them. > > Cheers, > Aljoscha > > On Tue, 24 May 2016 at 20:43 Maatary Okouya > wrote: > >> I'm looking for a way to avoid thread starvation in my tasks, by >> returning future but i don't see how is that possible. >> >> Hence i would like to know, how flink handle the case where in your job >> you have to perform network calls (I use akka http or spray) or any IO >> operation and use the result of it. >> >> In sparks i see asynchronous action and so on. I don't see any equivalent >> in apache flink. How does it works ? is it supported, or the network call >> and any io operation have to be synchronous ? >> >> any help, indication, reads and so on would be appreciated >> > --001a1143dfb42dd4d00533a80afe Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On= Wed, May 25, 2016 at 5:16 AM, Aljoscha Krettek <aljoscha@apache.org= > wrote:
Hi,there is no functionality to have asynchronous calls in user functions i= n Flink.=C2=A0

The asynchronous action feature in = Spark is also not meant for such things, it is targeted at programs that ne= ed to pull all data to the application master. In Flink this is not necessa= ry because you can specify a whole plan of operations before executing them= .=C2=A0

Cheers,
Aljoscha

On Tue, 24 May 2016 at 20:43 Maatary Okouya <maatariokouya@gmail.com> = wrote:

I'm looking for a way to avoid thread starvation= in my tasks, by returning future but i don't see how is that possible.=

Hence i would like to know, how flink= handle the case where in your job you have to perform network calls (I use= akka http or spray) or any IO operation and use the result of it.

In sparks i see asynchronous action and so on.= I don't see any equivalent in apache flink. How does it works ? is it = supported, or the network call and any io operation have to be synchronous = ?

any help, indication, reads and so o= n would be appreciated


--001a1143dfb42dd4d00533a80afe--