<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> 
        <base href="https://issues.jboss.org"> 
        <title>Message Title</title> 
    </head> 
    <body class="jira" style="color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.429"> 
        <table id="background-table" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #f5f5f5; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt" bgcolor="#f5f5f5"> 
            <!-- header here --> 
            <tbody>
                <tr> 
                    <td id="header-pattern-container" style="padding: 0px; border-collapse: collapse; padding: 10px 20px"> 
                        <table id="header-pattern" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                            <tbody>
                                <tr> 
                                    <td id="header-avatar-image-container" valign="top" style="padding: 0px; border-collapse: collapse; vertical-align: top; width: 32px; padding-right: 8px" width="32"> <img id="header-avatar-image" class="image_fix" src="https://static.jboss.org/developer/gravatar/84386cc35cecf75d5eed5c9142e5f154?d=mm&amp;s=48" height="32" width="32" border="0" style="border-radius: 3px; vertical-align: top"> </td> 
                                    <td id="header-text-container" valign="middle" style="padding: 0px; border-collapse: collapse; vertical-align: middle; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> <a class="user-hover" rel="davidmartin" id="email_davidmartin" href="https://issues.jboss.org/secure/ViewProfile.jspa?name=davidmartin" style="color:#3b73af;; color: #3b73af; text-decoration: none">David Martin</a> <strong>edited a comment</strong> on <a href="https://issues.jboss.org/browse/AEROGEAR-2683" style="color: #3b73af; text-decoration: none"><img src="cid:jira-generated-image-avatar-34543b73-2d4a-437e-af0d-06bad03053c3" height="16" width="16" border="0" align="absmiddle" alt="Task"> AEROGEAR-2683</a> </td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
                <tr> 
                    <td id="email-content-container" style="padding: 0px; border-collapse: collapse; padding: 0 20px"> 
                        <table id="email-content-table" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0; border-collapse: separate"> 
                            <tbody>
                                <tr> 
                                    <!-- there needs to be content in the cell for it to render in some clients --> 
                                    <td class="email-content-rounded-top mobile-expand" style="padding: 0px; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 15px; background-color: #ffffff; border-left: 1px solid #cccccc; border-top: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom: 0; border-top-right-radius: 5px; border-top-left-radius: 5px; height: 10px; line-height: 10px; padding: 0 15px 0 16px; mso-line-height-rule: exactly" height="10" bgcolor="#ffffff">&nbsp;</td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand " style="padding: 0px; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff"> 
                                        <table class="page-title-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                            <tbody>
                                                <tr> 
                                                    <td style="vertical-align: top;; padding: 0px; border-collapse: collapse; padding-right: 5px; font-size: 20px; line-height: 30px; mso-line-height-rule: exactly" class="page-title-pattern-header-container"> <span class="page-title-pattern-header" style="font-family: Arial, sans-serif; padding: 0; font-size: 20px; line-height: 30px; mso-text-raise: 2px; mso-line-height-rule: exactly; vertical-align: middle"> <a href="https://issues.jboss.org/browse/AEROGEAR-2683" style="color: #3b73af; text-decoration: none">Re: investigate and evaluate Amazon AppSync</a> </span> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td id="text-paragraph-pattern-top" class="email-content-main mobile-expand  comment-top-special-margin comment-top-pattern" style="padding: 0px; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff; border-bottom: none; padding-bottom: 0" bgcolor="#ffffff"> 
                                        <table class="text-paragraph-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
                                            <tbody>
                                                <tr> 
                                                    <td class="text-paragraph-pattern-container mobile-resize-text " style="padding: 0px; border-collapse: collapse; padding: 0 0 10px 0; padding-top: 10px"> <span class="diffaddedchars" style="background-color:#ddfade;">h1</span> <span class="diffcontext">.</span> <span class="diffremovedchars" style="background-color:#ffe7e7;text-decoration:line-through;">h2</span> <span class="diffcontext"> Platforms<br><br>* Native Mobile (iOS, Android, React Native)<br>* Web Apps (JavaScript)<br><br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">h1</span> <span class="diffcontext">.</span> <span class="diffremovedchars" style="background-color:#ffe7e7;text-decoration:line-through;">h2</span> <span class="diffcontext"> Features &amp; API<br><br>* specify data requirements with code statements (graphql), using the console editor<br>* only needed data is fetched<br>* auto update data in app in realtime<br>* data can be added &amp; updated locally while offline<br>* updates data for offline uses as soon as reconnect<br>* integration with Amazon Cognito &amp; AWS IAM for setting fine grained permissions on graphql operations<br>** OIDC token based<br>** authz based on fields e.g. only author can update<br>* data stored in DynamoDB<br>* AWS Lambda functions can be triggered<br>* Run elasticsearch queries on the data<br>* auto resolve conflicts (default rules &amp; define own business logic via Lambda)<br>* API Key, IAM, Cognito &amp; OpenID Connect https://docs.aws.amazon.com/appsync/latest/devguide/security.html<br>* logs can be viewed in the web consoel &amp; written to CloudWatch https://docs.aws.amazon.com/appsync/latest/devguide/monitoring.html#cwl<br>* default metrics for Latency, 4XX &amp; 5XX errors https://docs.aws.amazon.com/appsync/latest/devguide/monitoring.html#cw-metrics<br><br></span> <span class="diffaddedchars" style="background-color:#ddfade;">h1</span> <span class="diffcontext">.</span> <span class="diffremovedchars" style="background-color:#ffe7e7;text-decoration:line-through;">h2</span> <span class="diffcontext"> GraphQL &amp; Querying<br><br>* not a graph DB<br>* db could be anything e.g. mongodb, mysql, dynamodb<br>* client sends its request 1 time, parses it and fetches/returns the data to the client in 1 round trip<br>* model the data and app state of what you need to arrive at<br>* define a schema defintion language (SDL) e.g.<br>* benefits<br>** Type introspection https://en.wikipedia.org/wiki/Type_introspection<br>*** ability of a program to examine the type or properties of an object at runtime<br>*** A.instance_of?, a.class, A &gt; B, B &lt;= B<br>** rapid prototyping<br>** co-location of data requirements &amp; app views (impl isn't encoded in the server)<br>** data behaviour control (batching, request/response &amp; real-time)<br>** bandwidth optimisation<br>* integrates with apollographql client (plugins for platforms)<br>** JS for mobile web &amp; hybrid (react native/ionic)<br>** offline support (automatically persisted data for queries)<br>** read &amp; write to local disk (dep on platform), fetch to server happens async (no latency from App pov) (Optimistic UI)<br>** can add a callback for the fetch<br>* Event driven (handshake auth) for graphQL subscriptions<br>* auto websocket negotiation<br>* aws-amplify https://github.com/aws/aws-amplify<br>** js lib for frontend &amp; mobile dev (for JS frameworks &amp; React + React Native)<br>** Authentication (OOB uses cognito)<br>** Analytics <br>** API<br>** Storage<br>** Cache<br>* example schema available when creating an API via the console<br>* aws_subscibe to trigger notification to clients<br>* starter apps e.g<br>** git clone https://github.com/aws-samples/aws-mobile-appsync-events-starter-android<br>** download AppSync.json file<br>** download graphql schema (.json or .graphql)<br>* Get an API URL &amp; API Key (7 days valid, can be extended to 365 days)<br>* subscriptions listen for changes to a specific resource<br>* Java src is generated based on schema &amp; events.graphql, allowing code completion when querying, mutating or subscribing<br>* uses MQTT over websocket<br>* each subscription has its own client (MqttSubscriptionClient)<br><br>User defined type. (types of Mutation (change) Subscription (subscribe to data))<br>{noformat}<br>type Query {<br>&nbsp;&nbsp;getTodos: [Todo]<br>}<br><br>type Todo {<br>&nbsp;&nbsp;id: ID!<br>&nbsp;&nbsp;name: String<br>&nbsp;&nbsp;description: String<br>&nbsp;&nbsp;priority: Int<br>&nbsp;&nbsp;duedate: String<br>}<br>{</span> <span class="diffremovedchars" style="background-color:#ffe7e7;text-decoration:line-through;">/</span> <span class="diffcontext">noformat}<br><br>Query sent over network (client requests the shape of the data it wants)<br>{noformat}<br>query {<br>&nbsp;&nbsp;getTodos {<br>&nbsp;&nbsp;&nbsp;&nbsp;id<br>&nbsp;&nbsp;&nbsp;&nbsp;name<br>&nbsp;&nbsp;&nbsp;&nbsp;priority<br>&nbsp;&nbsp;}<br>}<br>{</span> <span class="diffremovedchars" style="background-color:#ffe7e7;text-decoration:line-through;">/</span> <span class="diffcontext">noformat}<br><br>Only requested data is returned:<br>{noformat}<br>{<br>&nbsp;&nbsp;"id": "1",<br>&nbsp;&nbsp;"name": "Get Milk",<br>&nbsp;&nbsp;"priority": "1"<br>},<br>{<br>&nbsp;&nbsp;"id": "2",<br>&nbsp;&nbsp;"name": "Go to gym",<br>&nbsp;&nbsp;"priority": "5"<br>},...<br>{</span> <span class="diffremovedchars" style="background-color:#ffe7e7;text-decoration:line-through;">/</span> <span class="diffcontext">noformat}<br><br>Example client init<br>{noformat}<br>const client = new AWSAppSyncClient({<br>&nbsp;&nbsp;url: awsconfig.ENDPOINT,<br>&nbsp;&nbsp;region: AWS.config.region,<br>&nbsp;&nbsp;auth: {<br>&nbsp;&nbsp;&nbsp;&nbsp;type: AUTH_TYPE.AWS_IAM,<br>&nbsp;&nbsp;&nbsp;&nbsp;credentials: Auth.currentCredentials()<br>&nbsp;&nbsp;}<br>});<br><br>const WithProvider = () =&gt; (<br>&nbsp;&nbsp;&lt;ApolloProvider client={client}&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;Rehydrated&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;AppWithData /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Rehydrated&gt;<br>&nbsp;&nbsp;&lt;/ApolloProvider&gt;<br>);<br>{</span> <span class="diffremovedchars" style="background-color:#ffe7e7;text-decoration:line-through;">/</span> <span class="diffcontext">noformat}<br><br>Example Optimistic UI<br>{noformat}<br>options: {<br>&nbsp;&nbsp;fetchPolicy: 'cache-and-network' // rather than just network to allow cache first read/write<br>},<br>props: (props) =&gt; ({<br>&nbsp;&nbsp;onAdd: post =&gt; props.mutate({<br>&nbsp;&nbsp;&nbsp;&nbsp;optimisticResponse: () =&gt; ({<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addPost: { __typename: 'Post', content: 'New data!', version: 1, ...post}<br>&nbsp;&nbsp;&nbsp;&nbsp;}),<br>&nbsp;&nbsp;})<br>}),<br>update: (dataProxy, {data: {addPost}}) =&gt; {<br>&nbsp;&nbsp;const data = dataProxy.readQuery({AllPostsQuery});<br>&nbsp;&nbsp;data.posts.push(addPost);<br>&nbsp;&nbsp;dataProxy.writeQuery({AllPostsQuery, data});<br>}<br>{</span> <span class="diffremovedchars" style="background-color:#ffe7e7;text-decoration:line-through;">/</span> <span class="diffcontext">noformat}<br><br><br></span> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand " style="padding: 0px; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff"> 
                                        <table id="actions-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> 
                                            <tbody>
                                                <tr> 
                                                    <td id="actions-pattern-container" valign="middle" style="padding: 0px; border-collapse: collapse; padding: 10px 0 10px 24px; vertical-align: middle; padding-left: 0"> 
                                                        <table align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                                            <tbody>
                                                                <tr> 
                                                                    <td class="actions-pattern-action-icon-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 0; vertical-align: middle"> <a href="https://issues.jboss.org/browse/AEROGEAR-2683#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none"> <img class="actions-pattern-action-icon-image" src="cid:jira-generated-image-static-comment-icon-fa7694dc-02ef-49c7-b9f0-a92dd4830be3" alt="Add Comment" title="Add Comment" height="16" width="16" border="0" style="vertical-align: middle"> </a> </td> 
                                                                    <td class="actions-pattern-action-text-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; padding-left: 5px"> <a href="https://issues.jboss.org/browse/AEROGEAR-2683#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none">Add Comment</a> </td> 
                                                                </tr> 
                                                            </tbody>
                                                        </table> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <!-- there needs to be content in the cell for it to render in some clients --> 
                                <tr> 
                                    <td class="email-content-rounded-bottom mobile-expand" style="padding: 0px; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 5px; line-height: 5px; background-color: #ffffff; border-top: 0; border-left: 1px solid #cccccc; border-bottom: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; mso-line-height-rule: exactly" height="5" bgcolor="#ffffff">&nbsp;</td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
                <tr> 
                    <td id="footer-pattern" style="padding: 0px; border-collapse: collapse; padding: 12px 20px"> 
                        <table id="footer-pattern-container" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                            <tbody>
                                <tr> 
                                    <td id="footer-pattern-text" class="mobile-resize-text" width="100%" style="padding: 0px; border-collapse: collapse; color: #999999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> This message was sent by Atlassian JIRA <span id="footer-build-information">(v7.5.0#75005-<span title="fd8c849d4e278dd8bbaccc61e707a716ad697024" data-commit-id="fd8c849d4e278dd8bbaccc61e707a716ad697024}">sha1:fd8c849</span>)</span> </td> 
                                    <td id="footer-pattern-logo-desktop-container" valign="top" style="padding: 0px; border-collapse: collapse; padding-left: 20px; vertical-align: top"> 
                                        <table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                            <tbody>
                                                <tr> 
                                                    <td id="footer-pattern-logo-desktop-padding" style="padding: 0px; border-collapse: collapse; padding-top: 3px"> <img id="footer-pattern-logo-desktop" src="cid:jira-generated-image-static-footer-desktop-logo-3de87b99-07ef-4144-a48f-b30699e2dfc1" alt="Atlassian logo" title="Atlassian logo" width="169" height="36" class="image_fix"> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
            </tbody>
        </table>   
    </body>
</html>