Yes, I have proceeded in that way. Now there is a query parameter to
specify whether the results needs to be received in sync or async. Async
mode is similar to what we previously had. Sync mode will return the
results after waiting for hyracks job to complete.
Thanks and Regards,
BSc. Management and Information Technology (IT Sp.)
University of Kelaniya, Sri Lanka
On Tue, Aug 8, 2017 at 3:20 AM, Preston Carman <prest...@apache.org> wrote:
> I think a few offline discussion have clarified the issue with timing.
> As we move forward, I think timing is important. As you have
> highlighted, different types of timing values are available with
> synchronous and asynchronous requests.
> query request - returns compile time
> result request - return query execution time
> query request - returns compile time and query execution time
> It seems you are going ahead with adding a synchronous option for the
> REST service. As for asynchronous result request, AsterixDB does have
> a solution for this request. I believe Ian has shown you where to
> On Thu, Aug 3, 2017 at 11:21 AM, Erandi Ganepola
> <erandiganep...@gmail.com> wrote:
> > Hi all,
> > As per the REST API specification , REST API operates in 2 steps.
> > 1. Users will be sending a request which contains the query to be
> > Then the REST API will compile the query and submit to hyracks to be
> > executed. Once submitted, REST API returns a response containing
> > compilations time, Abstract Syntax Tree, Runtime Plan and etc to the user
> > along with a result ID which will later be used to fetch results by the
> > user.
> > 2. User sends a request to the REST API with the *result ID *previously
> > received and the REST API will internally read the results from hyracks
> > corresponding to that result ID. Then return the results to the user.
> > Since there is no link between the time at which user submits the query
> > the time at which the user reads results, we cannot measure the *time for
> > the query execution*. Previously, this measurement was done by vxquery
> > waiting for hyracks to complete query execution and fetch results.
> > When it comes to AsterixDB, they are using synchronous requests (submit
> > query and wait) in the REST API (Yes, they have an asynchronous version,
> > which doesn't measure execution time correctly since it is using an
> > executor service . see the ASYNC execution path under it). As per my
> > understanding, what I have mentioned above are correct.
> > Am I missing something? If not, what are your thoughts on this scenario?
> > How can we tackle this?
> >  https://cwiki.apache.org/confluence/display/VXQUERY/
> > SwaggerIO+Configuration
> >  https://github.com/apache/asterixdb/blob/master/
> > asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/
> > QueryServiceServlet.java
> > Thanks and Regards,
> > *Erandi Ganepola*
> > Undergraduate
> > BSc. Management and Information Technology (IT Sp.)
> > University of Kelaniya, Sri Lanka
> > <https://www.linkedin.com/in/erandiganepola/>
> > <https://github.com/erandiganepola> <https://twitter.com/