{"id":27958055,"url":"https://github.com/ericsson/paf","last_synced_at":"2025-05-07T18:16:09.465Z","repository":{"id":52218773,"uuid":"274087258","full_name":"Ericsson/paf","owner":"Ericsson","description":"Pathfinder service discovery server","archived":false,"fork":false,"pushed_at":"2024-12-05T18:43:40.000Z","size":282,"stargazers_count":9,"open_issues_count":17,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-07T18:16:00.945Z","etag":null,"topics":["service-discovery"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ericsson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-22T08:53:33.000Z","updated_at":"2024-12-05T18:43:44.000Z","dependencies_parsed_at":"2023-01-22T15:15:54.600Z","dependency_job_id":"a0575f93-ae4f-4081-aa99-46777ba57283","html_url":"https://github.com/Ericsson/paf","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ericsson%2Fpaf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ericsson%2Fpaf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ericsson%2Fpaf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ericsson%2Fpaf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ericsson","download_url":"https://codeload.github.com/Ericsson/paf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931507,"owners_count":21827112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["service-discovery"],"created_at":"2025-05-07T18:16:08.895Z","updated_at":"2025-05-07T18:16:09.451Z","avatar_url":"https://github.com/Ericsson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pathfinder\n\n## Introduction\n\nPathfinder is a light-weight service discovery system for embedded or\ncloud use.\n\nThis repository contains the server-side implementation of the\nPathfinder Protocol\n[version 2](https://github.com/Ericsson/paf/blob/master/doc/protocol/PROTOCOLv2.md)\nand\n[version 3](https://github.com/Ericsson/paf/blob/master/doc/protocol/PROTOCOLv3.md).\n\n## Overview\n\nIn a distributed system, such as a Radio Access Network (RAN) or a\nlarge micro service-based web application, a process in need of a\nparticular service (often known as a consumer) must somehow be wired\nup to a server process able to service its requests (often known as a\nproducer).\n\nThis can be done in several ways, such as manual configuration,\norchestration or service discovery.\n\nPathfinder implements client-side service discovery. In this model,\nthe producer registers its services (usually in the form of a name and\na set of properties, including an address) in some sort of\ndirectory. Consumers will query this service directory, discriminating\namong the matches to find the most suitable producer to connect to.\n\nPathfinder is split into two parts. The `libpaf` client library is\nused by the service consumer and producer processes. This client\nlibrary communicates with zero or more Pathfinder `pafd` servers.\n\nA service discovery implementation that might easily come to mind is\nto store services in a centralized or distributed database. Unlike\nsuch a design, Pathfinder doesn't keep the authoritative state in a\ndatabase in the traditional sense, but rather it's distributed among\nthe `libpaf` instances of the consumer and producer processes. One\nreason to keep the authorative service state in or close to the\nproducer process, and the subscription state in or close to the\nconsumer process, is that in case that a client process terminates,\nits service discovery-related state is no longer of any use.\n\nA Pathfinder server is acting like domain-specific communication hub,\nkeeping a copy of all known services and subscriptions. A server may\nnot always have the most-recent copy of every service record, but will\neventually be consistent. A subscription is a query, where the\nconsumer expresses a wish to be notified of the appearance,\nmodification, or disappearance of services matching a certain search\ncriteria (filter).\n\nIn a Pathfinder server, there is no need to store the state in\nnon-volatile storage, since in the case of a server crash or a\nrestart, its state is reproduced as the various consumers and\nproducers reconnect to the new server instance.\n\nBoth the Pathfinder server and the client shared library are memory\nand CPU resource efficient and designed specifically to allow embedded\nuse (as well as use in the cloud).\n\nPathfinder has a single concern - service discovery - and no other\nfunctionality. It does imply or impose any consumer-producer\ncommunication method, but allows anything such as REST/HTTPS, nng,\ngRPC, XCM, a message bus, carrier pigeons, or a combination thereof,\nto be used between the producers and the consumers.\n\nPathfinder relies on TCP keepalive to track liveness. In case the\nproducer process dies, the servers will notice and mark the service as\nan orphan. Such tentatively unavailable services will be removed when\ntheir time-to-live (TTL) expires, unless the client reconnects, and\nreclaims the service.\n\nPathfinder supports tens of thousands of clients, services and\nsubscriptions. It has a push model of subscriptions and a server-side\nimplementation of the subscription matching (i.e. filter evaluation),\nmaking away for any need for polling. When service discovery is idle\n(i.e. no subscriptions or services coming or going), no CPU resources\nare used, with the exception of TCP keepalive processing in the\nkernel.\n\nPathfinder supports high availability and uses an active-active model,\nallowing service discovery to still function in the face of networking\noutages, server hardware and certain software failures.\n\n## Installation\n\nThe Pathfinder server and related tools are implemented in Python.\n\nPython version 3.8 or later is required. In case a server\nconfiguration file is used, and also for running the test cases, the\n`yaml` module is needed.\n\nPathfinder depends on [Extensible Connection-oriented Messaging\n(XCM)](https://github.com/Ericsson/xcm) in\nthe form of the `libxcm` shared library. The minimum XCM API/ABI\nversion is 0.15 (found in XCM v1.1.0).\n\nIn case `pafc` or `paf.client` are used in combination with per-server\nTLS certificate file configuration or if TLS credentials are\nconfigured in the `pafd` configuration file, XCM API/ABI 0.16 (XCM\nv1.2.0) or later is required.\n\nFor certificate recovation list (CRL) functionality to be available,\nthe Pathfinder server must be run with XCM API/ABI 0.24 or later (XCM\nv1.9.0).\n\nThe Pathfinder server build uses Python setuptools.\n\nTo build, run:\n```\nmake\n```\n\nTo install, run:\n```\nmake install PREFIX=\u003cprefix\u003e\n```\n\nIssuing the appropriate `setup.py` commands directly also works. The\nMakefile is just a simple wrapper.\n\n## Test Suite\n\nThe unit and component-level test suites depends on the py.test-3\nframework.\n\n`flake8` is used to verify coding style for all Python files, and\nneeds to be installed.\n\nTo run the test suite, issue:\n```\nmake check\n```\n\n## Running the Server\n\nOne or more Pathfinder server (daemon) processes are run for each\nservice discovery domain. One server instance may serve one or more\ndomains, which translate to one or more server sockets (per server).\n\nTo start the server and bind it to a local UNIX domain socket address,\nrun:\n```\npafd ux:test\n```\n\nBy including the paf repo directory in `PYTHONPATH`, the server and\nthe other programs may be run without any installation.\n\n```\ncd \u003crepodir\u003e\nexport PYTHONPATH=$PYTHONPATH:$PWD\n./app/pafd ux:test \u0026\n./app/pafc ux:test\n```\n\n## Command-line Interface\n\nPathfinder has an interactive command-line interface for\ndebugging. The following command will instantiate a Pathfinder client\nand connect it to a server.\n```\n./app/pafc ux:test\n```\n\nBy using the CLI, the user may publish services, subscribe to services\nand list connected clients, subscriptions and services.\n\n## Python Client API\n\nPathfinder includes an API `paf.client` for Python-based clients, which\nis used by the server test suite and the command-line interface.\n\nWhile this is a production-quality client implementation, it's not\nmeant to be the primariy API for consumer and producers. Applications\nwould instead use the `libpaf` client library, available in a separate\nrepository. It also has a Python interface.\n\nCompared to `libpaf` and `\u003cpaf.h\u003e`, the `paf.client` Python API is\nmore low-level and maps closely to the Pathfinder wire protocol.\n\n## Documentation\n\nThe [Pathfinder application protocol\nspecification](https://github.com/Ericsson/paf/blob/master/doc/PROTOCOL.md),\nin particular the data model section, includes a lot of useful\ninformation on how a Pathfinder service discovery system works.\n\n### Manual pages\n\n* [pafd](https://ericsson.github.io/paf/man/pafd.8.html)\n* [pafc](https://ericsson.github.io/paf/man/pafc.1.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericsson%2Fpaf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericsson%2Fpaf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericsson%2Fpaf/lists"}