[RFC] async source3/rpc_server
Volker Lendecke
Volker.Lendecke at SerNet.DE
Tue Apr 24 11:57:57 MDT 2012
On Tue, Apr 24, 2012 at 03:37:59PM +0200, David Disseldorp wrote:
> In order to properly implement a File Server Remote Shadow-copy Protocol
> (MS-FSRVP) RPC server, snapshot/shadow-copy operations should be handled
> asynchronously from PDU processing through to VFS request dispatch.
>
> Working towards this, I've made a some small changes to carry two types
> of RPC server command arrays (synchronous and asynchronous) under
> api_struct. See pull request at the bottom of this mail.
>
> IDLs are flagged sync or async at build time, with sync builds compiling
> into the existing interface via Pidl/Samba3/ServerNDR.pm:
> struct api_struct_sync {
> const char *name;
> uint8 opnum;
> bool (*fn) (struct pipes_struct *);
> };
>
> Async builds will compile into send/recv hooks with a new
> --samba3-ndr-server-async pidl option:
> struct api_struct_async {
> const char *name;
> uint8 opnum;
> struct tevent_req *(*fn_send)(TALLOC_CTX *,
> struct tevent_context *,
> struct pipes_struct *);
> NTSTATUS (*fn_recv)(struct tevent_req *);
> };
>
> Existing synchronous server IDL will remain so for the time being.
> The same code path will be shared between sync and async backends
> up to the point of gen_ndr srv dispatch. i.e. api_rpcTNP for
> rpc_server/srv_pipe.c.
>
> Does this approach sound sane?
Yes, that looks sane to me. As fallbacks, can we
autogenerate sync/async wrappers? I have not yet fully
thought out the complete picture, but I could imagine that
we make the normal RPC server infrastructure completely
async and then for the sync backends autogenerate fake async
wrappers calling into the sync functions.
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical
mailing list