Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Driver RPC Interface Specification #2719

Open
prologic opened this issue Jan 1, 2016 · 7 comments
Open

Driver RPC Interface Specification #2719

prologic opened this issue Jan 1, 2016 · 7 comments

Comments

@prologic
Copy link

prologic commented Jan 1, 2016

Is there a document/pr/issue that describes the RPC Interface for driver plugins? I found a few related issues #1626 and #1902 but I'm struggling to find something more "concrete; there isn't anything in docs that I can see?

@nathanleclaire
Copy link
Contributor

Hey @prologic. No formal specification so far (unfortunately :( ) but essentially the idea is you need to implement the Driver interface and then call plugin.RegisterDriver() for your Driver in your plugin binary's main method. Have you looked at some of the linked 3rd party plugins?

@prologic
Copy link
Author

prologic commented Jan 5, 2016

@nathanleclaire Thanks for responding! I've looked at various 3rd-party (not packaged with docker-machine) however I was under the impression from various issues and pull-requests that the way docker-machine driver plugins worked was language agnostic? (or at least meant to be?)

Is this not the case?

@nathanleclaire
Copy link
Contributor

@prologic No, it's pretty tightly coupled to Golang net/rpc.

@prologic
Copy link
Author

prologic commented Jan 5, 2016

But it's an RPC and talks over a socket no? :) What am I missing :P

@nathanleclaire
Copy link
Contributor

@prologic It's built using https://golang.org/pkg/net/rpc/ and the transport codec is gob, which is the native Go blob encoding format. It might be possible to communicate using gob in other languages (see https://groups.google.com/forum/#!topic/golang-nuts/xtXh0yWOens for instance), but it might be more trouble than its worth.

In order to be truly language-agnostic we'd have to use something like JSON-RPC or protobufs which is designed for that specifically. It's definitely something I'm taking into consideration for the future, but would require a version bump on the plugin API (it wouldn't be backwards or forwards compatible).

@prologic
Copy link
Author

prologic commented Jan 5, 2016

FWIW; I want to write a driver for Proxmox VE and re-use existing libraries that already know how to talk to the Proxmox VE API9s); e.g: proxmoxer or pyproxmox

@prologic
Copy link
Author

Bump!

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

No branches or pull requests

3 participants