简体   繁体   English

将Google App Engine与Javascript客户端连接

[英]Connecting Google App Engine with Javascript client

I have a diagram editor application (client), which is written in javascript. 我有一个用JavaScript编写的图表编辑器应用程序(客户端)。 I need to take the model of the diagrams (can be transformed to text), and synchronise it with my GAE Java application which will be my backend. 我需要获取图表模型(可以转换为文本),并将其与我的GAE Java应用程序(将其作为后端)进行同步。 The application will then store this model on cloud, or send it to other clients. 然后,应用程序将将此模型存储在云中,或将其发送给其他客户端。 (as a result many people work on same diagrams) (因此,许多人使用相同的图)

This is a totally new field to me, and even though I completed some of the tutorials google provides, and gone through documentation, I am not sure how the connection will be done (tutorials used JSP). 对我来说,这是一个全新的领域,即使我完成了google提供的一些教程并浏览了文档,但我不确定如何完成连接(教程使用JSP)。

What is the most straight- forward approach into connecting a Java application (GAE) with a JS client ? 将Java应用程序(GAE)与JS客户端连接的最直接的方法是什么?

ps: I have read about ajax, but I dont know if its the right solution for this, or if there is a better one. ps:我已经读过有关ajax的文章,但是我不知道它是否适合此解决方案,或者是否有更好的解决方案。

What is the most straight- forward approach into connecting a Java application (GAE) with a JS client ? 将Java应用程序(GAE)与JS客户端连接的最直接的方法是什么?

Through an API built on HTTP. 通过基于HTTP的API。 Your JAVA web app can expose certain endpoints. 您的JAVA Web应用程序可以公开某些终结点。 You can then use Javascript to make http requests, (through AJAX) to your java web api). 然后,您可以使用Javascript(通过AJAX)向Java Web API发出http请求)。 This is currently the defacto way of communicating from front end with javascript to any backend service. 当前,这是从前端使用javascript到任何后端服务进行通信的事实上的方法。

There will be some trickiness to supporting real time collaboration between clients. 支持客户端之间的实时协作将有些棘手。

Additionally, there has been increasing support for websockets , which allows you to open a persistant connection between your client and your server, i don't know if java on GAE supports it though... 此外,对websockets的支持越来越多,这使您可以在客户端和服务器之间打开持久连接,但我不知道GAE上的Java是否支持它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 需要帮助进行翻新连接到Google App Engine - Need Help Connecting to Google App Engine With Retrofit 从Java客户端连接到App Engine上受管理员保护的网络服务 - Connecting to Admin secured webservice on App Engine from Java client Google App Engine套接字是否支持iOS作为客户端? - Is Google App Engine sockets support iOS as client? Android客户端和Google App Engine API - Android Client and Google App Engine APIs 客户端上的Google App Engine类 - Google App Engine class on client side 如何在Google App Engine上创建RESTful客户端? - How to create a RESTful client on Google App Engine? 为什么JDBC连接URL未连接到Google App Engine的数据库? - Why is the JDBC Connection URL not connecting to the Google App Engine's Database? 在本地并通过App Engine Flex连接到Google Cloud SQL(PostgreSQL) - Connecting to Google Cloud SQL (PostgreSQL) locally and through App Engine Flex 连接到Google Compute Engine代理服务器时,“ Google App Engine不支持使用代理”错误 - 'Google App Engine does not support the use of proxies' error when connecting to Google Compute Engine proxy server 与App Engine相连的Android项目:除了android API外,Google-Eclipse插件还会为iOS和JavaScript生成客户端端点吗? - App-Engine Connected Android Project: Does Google-Eclipse Plugin generate Client Endpoints for iOS and JavaScript in addition to the android api
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM