大数据服务(Astoria)有效载荷:如何提高性能?

时间:2022-08-05 03:54:08

I have a silverlight client accessing data through ado.net data services. One of my queries has a number of expand clauses, and gets back quite a number of entries. The xml response is enormous, and I'm looking for ways to make this more efficient.

我有一个silverlight客户端通过ado.net数据服务访问数据。我的一个查询有许多扩展子句,并且可以获得相当多的条目。 xml响应是巨大的,我正在寻找提高效率的方法。

I have tried:

我试过了:

  • Paging (not an option for this behaviour)
  • 分页(不是此行为的选项)

  • Http compression (some client pcs are running IE6)
  • Http压缩(一些客户端PC正在运行IE6)

  • Doing the expands as separate queries and joining the entities later (this improved things a little)
  • 将扩展作为单独的查询并稍后加入实体(这改进了一些事情)

Is it possible to use JSON as a transport format with the silverlight client? I haven't found anything about this on the web...

是否可以使用JSON作为Silverlight客户端的传输格式?我还没有在网上找到任何关于此的内容......

2 个解决方案

#1


You can see the demonstration of using JSON in silverlight in the below link

您可以在下面的链接中看到在silverlight中使用JSON的演示

http://timheuer.com/blog/archive/2008/05/06/use-json-data-in-silverlight.aspx

I am not sure how much performance gain is achieved by using JSON. I definitely remember that ado.net services does JSON.

我不确定使用JSON可以获得多少性能提升。我绝对记得ado.net服务做JSON。

#2


Well. I got a chance to talk to Tim Heuer about this, who awesomely went and asked Pablo Castro for me. Thanks Tim!

好。我有机会和蒂姆·豪雅谈起这件事,他非常棒地向我询问了帕布罗·卡斯特罗。谢谢蒂姆!

JSON can't be used by the Silverlight client, but Silverlight 3 will be using binary xml by default to talk to web services. Rawr.

Silverlight客户端无法使用JSON,但默认情况下Silverlight 3将使用二进制xml与Web服务进行通信。 RAWR。

One other thing i worked out for myself was that using expand can sometimes result in a lot more data than performing multiple requests. If you batch a few queries together and then hand-stitch the objects together, you can save quite a bit of xml.

我为自己解决的另一件事是,使用expand有时会导致比执行多个请求更多的数据。如果将一些查询一起批处理,然后将对象手工缝合在一起,则可以节省相当多的xml。

#1


You can see the demonstration of using JSON in silverlight in the below link

您可以在下面的链接中看到在silverlight中使用JSON的演示

http://timheuer.com/blog/archive/2008/05/06/use-json-data-in-silverlight.aspx

I am not sure how much performance gain is achieved by using JSON. I definitely remember that ado.net services does JSON.

我不确定使用JSON可以获得多少性能提升。我绝对记得ado.net服务做JSON。

#2


Well. I got a chance to talk to Tim Heuer about this, who awesomely went and asked Pablo Castro for me. Thanks Tim!

好。我有机会和蒂姆·豪雅谈起这件事,他非常棒地向我询问了帕布罗·卡斯特罗。谢谢蒂姆!

JSON can't be used by the Silverlight client, but Silverlight 3 will be using binary xml by default to talk to web services. Rawr.

Silverlight客户端无法使用JSON,但默认情况下Silverlight 3将使用二进制xml与Web服务进行通信。 RAWR。

One other thing i worked out for myself was that using expand can sometimes result in a lot more data than performing multiple requests. If you batch a few queries together and then hand-stitch the objects together, you can save quite a bit of xml.

我为自己解决的另一件事是,使用expand有时会导致比执行多个请求更多的数据。如果将一些查询一起批处理,然后将对象手工缝合在一起,则可以节省相当多的xml。