2

We've tried all sorts of things but Protobuf seems to be the most lightweight and fastest. 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.

Is there any improvement in this area with protobuf-net?

Or are there any other suggestions in how we could speed up our webservice?

I like the WDSL which WCF generates on the client side so I'd like to stick with that. However manually doing requests is fine aswell, eventhough it would take a considerable amount of time to swap out our old service.

1
  • 1
    The "send a Stream or byte[]" is the only thing I can suggest, I'm afraid. Commented Jan 16, 2013 at 19:52

1 Answer 1

1

We basically ended up passing data as Byte[] arrays and manually handling the serialization/deserialization. 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).

Sign up to request clarification or add additional context in comments.

3 Comments

Which serialization does WCF use then? Did you change the binding to something else? At the moment we're using basicHttpBinding with the default XMLserializer.
We use a basicHttpBinding using binary serialization, and then just use a return type of byte[] for the service methods. That allows us to serialize the return objects before returning them, and deserialize them once they are on the client in byte array form. We use a shared library that contains the types you are working with so that both sides can serialize and deserialize as necessary.
Nice, we'll try that and see if it goes faster! Thanks for the explanation!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.