简体   繁体   English

在WCF和Silverlight中使用protobuf-net

[英]Using protobuf-net with WCF and Silverlight

We've tried all sorts of things but Protobuf seems to be the most lightweight and fastest. 我们已经尝试过各种方法,但是Protobuf似乎是最轻巧,最快的。 Now our problem is that we're using Silverlight as a client which does not make it easy to swap out the defaultserializers for WCF. 现在我们的问题是,我们将Silverlight用作客户端,这并不容易将WCF的默认序列化器换出。

Is there any improvement in this area with protobuf-net? 使用protobuf-net在这方面有什么改进吗?

Or are there any other suggestions in how we could speed up our webservice? 或者,关于如何加快Web服务的速度还有其他建议吗?

I like the WDSL which WCF generates on the client side so I'd like to stick with that. 我喜欢WCF在客户端生成的WDSL,所以我要坚持下去。 However manually doing requests is fine aswell, eventhough it would take a considerable amount of time to swap out our old service. 但是,手动进行请求也很好,即使换出我们的旧服务也需要花费大量时间。

We basically ended up passing data as Byte[] arrays and manually handling the serialization/deserialization. 我们基本上最终将数据作为Byte[]数组传递,并手动处理了序列化/反序列化。 There is a bit of additional work to do it this way, but in the end, it gave us better flexibility (especially with a few problem objects that Protobuf didn't really want to serialize). 这样做还有很多其他工作,但是最终,它为我们提供了更好的灵活性(尤其是Protobuf确实不想序列化的一些问题对象)。

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

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