简体   繁体   English

Google Cloud Endpoint效能

[英]Google Cloud Endpoint performance

What is the performance of Google Cloud Endpoints? Google Cloud Endpoints的性能如何? In my case a large blob is being transferred. 就我而言,一个大的斑点正在转移。 Size is anywhere from 1MB to 8MB. 大小从1MB到8MB不等。 It seems to take about 5 to 10 minutes with my broadband speed being about 1Mb upload. 我的宽带速度大约为1Mb上传,这似乎需要5到10分钟。

Note this is being done from a Java client calling an endpoint. 请注意,这是通过Java客户端调用端点来完成的。 The object being transferred looks like this: 传输的对象如下所示:

public class Item
{
   String type;
   byte[] data;
}

On the java client side, the code looks like this: 在Java客户端,代码如下所示:

Item item = new Item( type, s );
MyItem.Builder builder = new MyItem.Builder( new NetHttpTransport(), new GsonFactory(), null );
service = builder.build();

PutItem putItem = service.putItem( item );
putItem.execute();

Why does it take so long to send one of these up to an endpoint? 为什么要花这么长时间将其中一个发送到端点? Is it the JSON parsing that is slowing it down? 是JSON解析使它变慢了吗? Any ideas on how to speed this up? 关于如何加快速度的任何想法?

Endpoints is just a wrapper around HTTP requests made to Java servlets (you mention java on client, so I'll make the assumption of java on the server). 端点只是对Java Servlet发出的HTTP请求的包装(您在客户端提到Java,因此我将在服务器上假设Java)。

This will introduce a very small, fixed, overhead, but the transfer speed of a large blob should be no different whether you are using endpoints or not. 这将引入非常小的固定开销,但是无论您是否使用端点,大Blob的传输速度都应该没有什么不同。

As noted by Gilberto, you should probably consider using Google Cloud Storage (GCS api is slowly replacing the blobstore API). 正如Gilberto指出的那样,您可能应该考虑使用Google Cloud Storage(GCS api正在逐渐取代blobstore API)。 You can use it to upload directly to storage and remove the burden on your GAE app. 您可以使用它直接上载到存储,并减轻GAE应用程序的负担。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM