title: Split up servicer gRPC python
body: <p>Building my first gRPC server application. I don't know if this is a common problem, but my rpc servicer is getting quite large.</p>
  
  <p>With servicer I mean the class that inherit from the generated <code>xxx_pb2_grpc.xxxServicer</code> (in python at least).</p>
  
  <p>At the moment it has 19 RPC calls. So my class which implements these calls is getting quite large. Is there any way of splitting the Servicer into logical segments, considering that some RPC calls are for music playback, some are for data management and some for communicating with a downloader (and more to come probably).</p>
  
  <p>I could make multiple <code>service</code> types in proto file however <code>xxx_pb2_grpc.add_xxxServicer_to_server</code> only accepts a single servicer!</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>EDIT: FEB 3, 18</strong></p>
  
  <p>I've split up the services in the following manor:</p>
  
  <pre><code>service MusicPlayback {
      ... # rpc calls
  }
  
  service DataManager {
      ... # rpc calls
  }
  
  service MediaDownloader {
      ... # rpc calls
  }
  </code></pre>
  
  <p>Then with the python code generated, I've setup the server like this:</p>
  
  <pre><code># Setup gRPC Server
  self._gserver = grpc.server(futures.ThreadPoolExecutor(max_workers=self._connection_count))
  rpc.add_MusicPlaybackServicer_to_server(self._mplayer, self._gserver)
  rpc.add_DataManagerServicer_to_server(self._data_manager, self._gserver)
  rpc.add_MediaDownloaderServicer_to_server(self._media_downloader, self._gserver)
  self._gserver.add_insecure_port('[::]:' + str(self._port))
  </code></pre>