This example implements a Swift client and Scala server with gRPC and Akka Streams.
- Proto definition: api/proto/passenger.proto
- Generated gRPC objects Scala: api/scala
- Generated gRPC objects Swift: api/swift
- Scala Server: server/
- Swift Client: client/
The endpoint definition is part of the passenger.proto file. The following endpoints are implemented:
- TripBook (request-response): Client sends a booking request at which the server response with a successfull booking response
- TrackVehicle (server-push): After client is sending an initial request, the server responds every second with the current vehicle location
- Echo (bi-directional-streaming): Once the client has send a ping message, the server response with a pong message. This can occur several time over one TCP channel.
This code is open source software licensed under the Apache 2.0 license.