From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 7D58A7FA87 for ; Wed, 18 May 2016 21:01:25 +0200 (CEST) IronPort-PHdr: 9a23:b6HjShVkuok97AZagWHTiLpfeBnV8LGtZVwlr6E/grcLSJyIuqrYZhCDt8tkgFKBZ4jH8fUM07OQ6PCxHzdYqs/b6DgrS99laVwssY0uhQsuAcqIWwXQDcXBSGgEJvlET0Jv5HqhMEJYS47UblzWpWCuv3ZJQk2sfTR8Kum9IIPOlcP/j7n0oM2CJV4Qz2PnOftbF1afk0b4joEum4xsK6I8mFPig0BjXKBo/15uPk+ZhB3m5829r9ZJ+iVUvO89pYYbCf2pN/dwcbsNFjU2Pmwd5MTzrQjHQBOT53BaVX8ZwTRSBA2Q3RjgWZG5lyr8relskH2LOMzwVrMlcTar6apwVAXlhTtBPDk8pjKEwvdshb5W9Ury7yd0xJTZNdmY Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=yminsky@janestreet.com; spf=Pass smtp.mailfrom=yminsky@janestreet.com; spf=None smtp.helo=postmaster@mxout3.mail.janestreet.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of yminsky@janestreet.com) identity=pra; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="yminsky@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of yminsky@janestreet.com designates 38.105.200.229 as permitted sender) identity=mailfrom; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="yminsky@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mxout3.mail.janestreet.com) identity=helo; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="postmaster@mxout3.mail.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DKAQAPuzxXduXIaSZehA1+Brt4IoVvAoE5BzsRAQEBAQEBAQERAQoWCVCCLYIWAQEEEhEdAQE3AQ8LCw0CAiYCAiISAQUBHBkIGogNAwukWYExPjGKVGeEQQEBBYx+AQEBAQEBBAEBAQEBAQEBFwMFEHGFJIRNhQuCNIJZmDCGAIgggWmHeoU3jgoSHoEPNoIlDRyBZ1KIBgEBAQ X-IPAS-Result: A0DKAQAPuzxXduXIaSZehA1+Brt4IoVvAoE5BzsRAQEBAQEBAQERAQoWCVCCLYIWAQEEEhEdAQE3AQ8LCw0CAiYCAiISAQUBHBkIGogNAwukWYExPjGKVGeEQQEBBYx+AQEBAQEBBAEBAQEBAQEBFwMFEHGFJIRNhQuCNIJZmDCGAIgggWmHeoU3jgoSHoEPNoIlDRyBZ1KIBgEBAQ X-IronPort-AV: E=Sophos;i="5.26,330,1459807200"; d="scan'208";a="218795841" Received: from mxout3.mail.janestreet.com ([38.105.200.229]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 May 2016 21:01:24 +0200 Received: from tot-qpr-mailcore1.delacy.com ([172.27.56.68] helo=tot-qpr-mailcore1) by mxout3.mail.janestreet.com with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from ) id 1b36iZ-0004Sb-DG for caml-list@inria.fr; Wed, 18 May 2016 15:01:15 -0400 X-JS-Flow: external Received: by tot-qpr-mailcore1 with JS-mailcore (0.1) (envelope-from ) id BXPLv5-AAAA1t-aC; 2016-05-18 15:01:13.834141-04:00 Received: from mail-qk0-f198.google.com ([209.85.220.198]) by mxgoog1.mail.janestreet.com with esmtps (UNKNOWN:AES128-GCM-SHA256:128) (Exim 4.72) (envelope-from ) id 1b36iX-0002y7-Oz for caml-list@inria.fr; Wed, 18 May 2016 15:01:13 -0400 Received: by mail-qk0-f198.google.com with SMTP id k5so116766682qkd.3 for ; Wed, 18 May 2016 12:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=U+uQUashX7MhMxAu162xfDBWuIZLnemlYdePWQsH4/o=; b=xRk3viVft+IH4eGzCqfrqG9EAsMxv/44DHtMpwFRqDEm4BYiWK99m1Lyg1p1zZPMmQ PqMTc43eyxc7h0EZV7scz/IgCQ77HExXKc/0FIFu4G/wtngVVLU/eEHOE3y1jHD5oatS EHIIKobqocyLh5og0DldHSFCKDMeLhncg6QWw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=U+uQUashX7MhMxAu162xfDBWuIZLnemlYdePWQsH4/o=; b=QC37nder8eDfScWHSg4pjnFD4mYsWFVGPuk6xmebHmrYdolMLjCe97wSvpqPJp8MzR SbUF85BZ5GLiIkmpkS8rRKivW3IUccIR/iJ9vGLX9zqEKQiCBLItJj6dvwYoWLg0J94G 7v9kHxoIRU7NGn/0D1CpifvdghwKawGDk8EyUehux+XL4BDb0wPTDMIY7Vyxd0u9q/jL fkl3UIHgieMgw2MBESjU3HVyZqj1y6OEidl/XSxNGWq3fHaLIPpCnxVjs+1PU0XenST1 xlt8LN9ShstwBq9vcXdsPSgLKtwdlPkPxiJhqj84oPz6ZKlaJcN5/Bahao1hzaRA+hWR vdSA== X-Gm-Message-State: AOPr4FVovHiH+hslUYOMjerps9MZ+OZV9GKAJ/g+EgxgDRBuFSF2us1zuP8uU2hlNnKBIUTzrDI45xoOjKl+CTAqWVZLf1yeY3czOfw6DDNEaSi3xxBu7YcSJmNbvHFK3A4gbjTkYfBwWyVxE7yUV4Xf4UmPJs+IRI2KP7iNg4k= X-Received: by 10.129.86.139 with SMTP id k133mr4810111ywb.96.1463598073448; Wed, 18 May 2016 12:01:13 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.86.139 with SMTP id k133mr4810091ywb.96.1463598073162; Wed, 18 May 2016 12:01:13 -0700 (PDT) Received: by 10.37.217.75 with HTTP; Wed, 18 May 2016 12:01:13 -0700 (PDT) In-Reply-To: <20160518142659.GB10232@pim.happyleptic.org> References: <20160518134349.GA10232@pim.happyleptic.org> <20160518142659.GB10232@pim.happyleptic.org> Date: Wed, 18 May 2016 15:01:13 -0400 Message-ID: From:Yaron Minsky To:rixed@happyleptic.org Cc:"caml-list@inria.fr" Content-Type: text/plain; charset=UTF-8 X-JS-Processed-by: mailcore Subject: Re: [Caml-list] RPC for OCaml? Yeah, we have some service-discovery stuff and the like that's internal, and probably not useful outside of our context. Async RPC is relatively independent of the transport; Async_rpc_kernel lets you sub in any transport you want, and we've used that flexibility to use it over websockets. y On Wed, May 18, 2016 at 10:26 AM, wrote: > -[ Wed, May 18, 2016 at 09:52:13AM -0400, Yaron Minsky ]---- >> Async-RPC is perhaps worth looking at, though I agree it doesn't give >> you much of what you want --- certainly, we don't to RPC over HTTP, we >> do it over bog-standard TCP, and the protocol is very much >> OCaml-specific, being based on bin-io. > > Indeed it's interesting. > That's only the lowest level part though (the actual communication between two > machines). I guess you have some higher layers doing load balancing, service > discovery, and so on, but those are private? > > I'm not actualy looking for RPC over HTTP, I was just mentionning HTTP2 because > that's a good middleground between efficient RPC and legacy infrastructures. Indeed, > I'd like an RPC library that's oblivious of the transport layer because there > can be some mandatory proxy/authentication scheme implemented at this layer > already and one may not have other choice than to implement them. > >> That said, it might be useful >> to look at for inspiration, in particular for how versioning is >> handled in Versioned_rpc. > > Versionning is indeed one of the concern I forgot to mention. > Although it > may be more important to you because of the serialization engine you use. Many > serialization formats allow for extensions which in practice aleviate the > issue; although it's also a form of manual runtime type checking that can > quickly become a source of bug and boilerplate ("moving data from one format to > another as a living" kind of feeling). My idea so far was to use whatever is > available in the serialization layer for minor additions (as for the transport > I'd like the RPC to be adaptable with any serializer, again for interfacing > with legacy), and for anything fancier just use plain variant types and let > clients and servers deal with them (GADT can be used to make sure we answer a > response-v2 to a query-v2, can't they?) or deploy entirely distinct servers and > solve this issue at the service-discovery layer. > > Having an explicit adapter such as versioned_rpc is a good idea. Maybe as part > of the adapter to the underlying serializer so that implementers are strongly > encouraged to code unserializer in such a way that the service itself deals > with only one version. > >> We do also have some kerberos support in >> there as well, though I'm not sure that's in the open source release. > > https://github.com/janestreet-alpha/krb5 ? > > > Will read all this and maybe come back with more questions if you don't mind.