Introducing Swift Service Discovery

It is my pleasure to announce a new open source project for the Swift Server ecosystem, Swift Service Discovery. Service Discovery is a Swift package designed to establish a standard API that can be implemented by various service discovery backends such as DNS-based, key-value store, etc.

swift.org/blog/swift-service-discovery/

Swift Service Discovery is a new open-source package for the Swift Server ecosystem, providing a standard API for service discovery backends like DNS or key-value stores, without implementing the functionality itself.

It defines concepts like Service Identity for unique service identification and Service Instance for associated locations, requiring developers to choose a backend like DNSBasedServiceDiscovery to query or subscribe to service instances.

The API includes lookup for fetching current instances and subscribe for receiving updates on instance changes, returning a CancellationToken to manage subscriptions. Backend implementations must conform to the ServiceDiscovery protocol, ensuring timely updates and proper cancellation handling.


Category:

Tag:

Year: