gRPC Swift 1.0.0-alpha.21
Pre-releaseThis release introduces interceptors and server performance improvements.
Interceptors are a new API layer which provides users with an entry point to the request and response streams, allowing cross cutting concerns such as logging or metrics to be implemented and cleanly shared across multiple RPCs. Note that using interceptors requires client and server code to be regenerated.
This release also includes significant changes to the internal server implementation to improve performance. Notably the implementation uses HTTP/2 concepts directly rather than translating to the simpler HTTP/1 types and back, as such the HTTP/1 concepts in the public API have been deprecated and will be removed in the future. Additionally, the generic constraints on the server call handlers have changed.
SemVer Major
- Add support for client and server interceptors. This is a breaking change as it required an alteration to the
GRPCChannel
protocol. (#986, #993, #1001, #1002, #1006, #1010, #1019, #1022, #1024, #1028, #1030, #1031, #1032, #1035, #1037) - Move server (de)serialization to the server call handler resulting in a change in the generic constraints on
_BaseCallHandler
,UnaryCallHandler
,ClientStreamingCallHandler
,ServerStreamingCallHandler
andBidirectionalStreamingCallHandler
(#1046) - Remove HTTP/1 types from the public server API and switch server processing to be done on HTTP/2 concepts to avoid the cost of translating between HTTP/1 and HTTP/2 types on HTTP/2 connections. gRPC Web (HTTP/1) remains supported by translating from HTTP/1 to HTTP/2. (#1017, #1041, #1047, #1048, #1050)
- Make 'GRPCStatus' a struct (#989)
SemVer Minor
- Add new API to allow responses to be sent from server contexts without allocating a promise (#1020)
- Enforce ALPN on the server and add new API to allow it to not be required. (#1055)
SemVer Patch
- Ensure that when responses are sent from streaming contexts that they are sent on the event loop. (#1054)
- Make the description of 'RPCTimedOut' static (#1009)
- Tolerate identity compression as no compression (#1016)
- Split path strings using UTF8 (#1027)
- Provide more specific errors messages for failing channels (#984)
- Tidy up some of the logic in the server call contexts (#1018)
- Use the server hostname override as the :authority, if present (#1033)
- Fix typo in 'requestDeserializer' (#1052)
- Reduce some excessive server logging. (#1011)
- Remove duplicated code. (#1013)
Other Changes
- Add support for watchOS to the podspecs (#998, patch credit to @daltonclaybrook)
- Fixed a typo in the protoc plugin name in README (#1021, patch credit to @chigichan24)
- Add a performance benchmark with unary and bidirectional streaming tests (#990, #1003, #1004, #1012, #1043, #1045)
- Pin the formatter version (#995)
- Stop checking in Package.resolved (#1008)
- Update CocoaPods to alpha.20 (#982)