用于谷歌应用程序引擎和桌面应用程序的数据库

时间:2022-12-30 07:33:50

I need some advice. I'm new to Java EE technologies. Anyway, I would like to make my first JAVA EE project. Imagine 2 client applications and server application.

我需要一些建议。我对Java EE技术不熟悉。无论如何,我想做我的第一个JAVA EE项目。假设有两个客户机应用程序和服务器应用程序。

1) Server. I picked up Google App Enginge technology to create server application. I would like to connect it to some easy database.

1)服务器。我使用了谷歌应用Enginge技术来创建服务器应用。我想把它连接到一个简单的数据库。

2) Client applications. I would like them to be desktop applications (or applications launched from the desktop) and these 2 apps also have to be connected to the same database as sever.

2)客户端应用程序。我希望它们是桌面应用程序(或从桌面启动的应用程序),这两个应用程序也必须与sever连接到同一个数据库。

There was no problem to create this in Java SE environment - I had two clients applications with sockets staff and server application with socket staff. All worked locally.

在Java SE环境中创建这个没有问题——我有两个带有套接字人员的客户端应用程序和带有套接字人员的服务器应用程序。所有在本地工作。

But now I want to have server and database on the Internet and I want to make it in more professional way.

但是现在我想在互联网上有服务器和数据库,我想用更专业的方式。

My problems are:

我的问题是:

  • How to create free database from GAE? Is datastore the best option or something else? What's important - the client desktop application will also use this database. I'm looking for the easiest solution.
  • 如何从GAE创建免费数据库?数据存储是最好的选择还是别的什么?重要的是,客户端桌面应用程序也将使用这个数据库。我在寻找最简单的解。
  • Maybe the solution is to create web client application instead of the desktop one - but make it look like it was desktop app (I would like to avoid using browser). I have no idea how to do this and if this is even possible.
  • 也许解决方案是创建web客户端应用程序而不是桌面应用程序——但要让它看起来像桌面应用程序(我希望避免使用浏览器)。我不知道怎么做,如果可能的话。

Any help will be really appreciated. I'm stuck because my knowledge is too little to start. I have ma GAE app and I don't know what should I choose next.

非常感谢您的帮助。我被困住了,因为我的知识太少了。我有ma GAE应用程序,我不知道接下来该选择什么。

Thank you in advance.

提前谢谢你。

1 个解决方案

#1


2  

If you want make desktop application, you need to build backend application first.

如果要创建桌面应用程序,需要首先构建后端应用程序。

check this out. You can use same concept with that. Build back end, and then create API to connect to your backend, and use that API in your desktop application.

看看这个。你可以用同样的概念。构建后端,然后创建API以连接到后端,并在桌面应用程序中使用该API。

Datastore is easiest way to store data. Check this out. Datastore have some limitation (such as didnt support join, many to many relationship, etc). Please consider wisely. Otherwise you can use Google Cloud SQL for your option, but AFAIK its not free.

数据存储是存储数据的最简单方法。看看这个。数据存储有一些限制(比如不支持连接、很多到很多关系等等)。请明智地考虑。否则,您可以使用谷歌云SQL作为您的选项,但这不是免费的。

#1


2  

If you want make desktop application, you need to build backend application first.

如果要创建桌面应用程序,需要首先构建后端应用程序。

check this out. You can use same concept with that. Build back end, and then create API to connect to your backend, and use that API in your desktop application.

看看这个。你可以用同样的概念。构建后端,然后创建API以连接到后端,并在桌面应用程序中使用该API。

Datastore is easiest way to store data. Check this out. Datastore have some limitation (such as didnt support join, many to many relationship, etc). Please consider wisely. Otherwise you can use Google Cloud SQL for your option, but AFAIK its not free.

数据存储是存储数据的最简单方法。看看这个。数据存储有一些限制(比如不支持连接、很多到很多关系等等)。请明智地考虑。否则,您可以使用谷歌云SQL作为您的选项,但这不是免费的。