Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates from xen-api-libs/rpc-light #12

Merged
merged 6 commits into from
Oct 28, 2012
Merged

Conversation

djs55
Copy link
Member

@djs55 djs55 commented Oct 23, 2012

Lots of stuff including

  1. functorising the Client module
  2. xmlrpc marshalling improvements
  3. exception marshalling improvements

David Scott added 6 commits October 23, 2012 15:24
This avoids having to pass in an "rpc" argument on every call; instead
one can write

  let module M = Client(struct let rpc = ... end) in
  M.just_do_it ()

Patch originally written by: Rob Hoes <rob.hoes@citrix.com>

Patch ported from xen-org/xen-api-libs c/s 66476cba733fde295aa433092632556111cfa4a5
Define your exceptions at the top level in your idl file, then raise
them in the server and they'll be reraised in the client.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Add the line:

let version="<version>"

to your interface definition file, and this will autogenerate
a 'get_version' RPC call to the client and server. This will
_not_ be present in the server functor signature. The idea
is that the client calls this immediately and asserts that
the result is identical to its own binding of 'version'. If
this fails, the client can then try to find the correct server
version on a different URI.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
The normal workaround for this is to marshal as a string instead.
Note the unmarshalling functions already handle this case.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
This allows clients to avoid buffering large intermediate strings.
samoht added a commit that referenced this pull request Oct 28, 2012
Updates from xen-api-libs/rpc-light
@samoht samoht merged commit 587c8a6 into mirage:master Oct 28, 2012
@samoht
Copy link
Member

samoht commented Oct 28, 2012

thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants