Greg,

Yes, exactly this is what I am trying to solve. Your steps 1 - 4 are my
intended mechanism.

 it's a matter for the API talking to Flask, as you must be able to tunnel
> some id or other that will allow you to do the lookup at step 3.

My python client uses AWS boto3 session which makes a call to
s3_client.getObject(). My java server implements this getObject(). I tried
doing a getSessionId() on this but seems like its failing. How can I tunnel
an id here? Do you mean something using UUID?

Best,
Aniruddha
========


On Sun, Jun 27, 2021 at 6:32 PM Greg Wilkins <gr...@webtide.com> wrote:

>
>
> I'm a bit confused by your diagrams and descriptions.  Perhaps a simple
> interaction diagram would help?
>
> If it is just Client ---GET--> Jetty --GET--> Flask, then I'm not seeing
> the problem.  Just async wait for the response from Flask.
>
> But one of your diagrams/descriptions suggests that the sequence is:
>
>    1. Jetty receives GET request from client
>    2. Jetty sends GET request to Flask which competes
>    3. Jetty receives POST request from  Flask, which needs to be matched
>    to original GET from client
>    4. Jetty sends response to original GET request
>
> Is this the case?   If so, then it's a matter for the API talking to
> Flask, as you must be able to tunnel some id or other that will allow you
> to do the lookup at step 3.
>
> Eitherway, a clearer description of the interaction and the issues you
> have would help.
>
>
>
>
>
>
>
>
> On Mon, 28 Jun 2021 at 11:00, Aniruddha Tekade via jetty-users <
> jetty-users@eclipse.org> wrote:
>
>> Yes, I can remove the flask server and use Jython instead to make this
>> run in the same Java server.
>> But since I am trying to reproduce what AWS does with S3 Object Lambda
>> <https://docs.aws.amazon.com/AmazonS3/latest/API/API_WriteGetObjectResponse.html>
>> -
>>
>> *WriteGetObjectResponse*
>>>
>>> <https://docs.aws.amazon.com/AmazonS3/latest/API/s3-api.pdf#API_WriteGetObjectResponse>Passes
>>> transformed objects to a GetObject operation when using Object Lambda
>>> Access Points. For information about Object Lambda Access Points, see 
>>> Transforming
>>> objects with Object Lambda Access Points
>>> <https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html>
>>>  in
>>> the *Amazon S3 User Guide*.
>>> This operation supports metadata that can be returned by GetObject
>>> <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html>,
>>> in addition to RequestRoute, RequestToken, StatusCode, ErrorCode, and
>>> ErrorMessage. The GetObject response metadata is supported so that the
>>> WriteGetObjectResponse caller, typically an AWS Lambda function, can
>>> provide the same metadata when it internally invokes GetObject. When
>>> WriteGetObjectResponse is called by a customer-owned Lambda function,
>>> the metadata returned to the end user GetObject call might differ from
>>> what Amazon S3 would normally return.
>>
>> I am trying to find a workaround/mechanism to get this to work.
>>
>> Best,
>> Aniruddha
>> ========
>>
>> ᐧ
>>
>> On Sun, Jun 27, 2021 at 5:52 PM Bill Ross <r...@cgl.ucsf.edu> wrote:
>>
>>> Speaking from general server dev going back to the 90's, but w/o Amazon
>>> or Flask, so may not apply:
>>>
>>>
>>>    - Jetty server now forwards the request to a Python Flask server
>>>    which has the lambda function by passing object data to it
>>>    - Lambda function code perform the transformation on the object and
>>>    POST it back to Jetty server (which is a different API called
>>>    writeGetObjectResponse)
>>>
>>> It seems the original GET should be waiting on a synchronous call to the
>>> Flask server (after the sync GET to HS/HSC), and respond by forwarding the
>>> response?
>>>
>>>
>>>
>>> --
>>> Phobrain.com
>>> _______________________________________________
>>> jetty-users mailing list
>>> jetty-users@eclipse.org
>>> To unsubscribe from this list, visit
>>> https://www.eclipse.org/mailman/listinfo/jetty-users
>>>
>> _______________________________________________
>> jetty-users mailing list
>> jetty-users@eclipse.org
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/jetty-users
>>
>
>
> --
> Greg Wilkins <gr...@webtide.com> CTO http://webtide.com
> _______________________________________________
> jetty-users mailing list
> jetty-users@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/jetty-users
>
ᐧ
_______________________________________________
jetty-users mailing list
jetty-users@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/jetty-users

Reply via email to