https://github.com/argoeu/argo-ams-library

A simple library for interacting with the ARGO Messaging Service

https://github.com/argoeu/argo-ams-library

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 10 committers (10.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.3%) to scientific vocabulary

Keywords

ams argo-messaging
Last synced: 9 months ago · JSON representation

Repository

A simple library for interacting with the ARGO Messaging Service

Basic Info
  • Host: GitHub
  • Owner: ARGOeu
  • License: apache-2.0
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 414 KB
Statistics
  • Stars: 2
  • Watchers: 12
  • Forks: 13
  • Open Issues: 1
  • Releases: 19
Topics
ams argo-messaging
Created over 9 years ago · Last pushed 12 months ago
Metadata Files
Readme Changelog License

README.md

argo-ams-library

Jenkins Build Status

A simple python library for interacting with the ARGO Messaging Service.

The Messaging Services is implemented as a Publish/Subscribe Service. Instead of focusing on a single Messaging API specification for handling the logic of publishing/subscribing to the broker network the API focuses on creating nodes of Publishers and Subscribers as a Service.

In the Publish/Subscribe paradigm, Publishers are users/systems that can send messages to named-channels called Topics. Subscribers are users/systems that create Subscriptions to specific topics and receive messages.

You may find more information about the ARGO Messaging Service documentation

Library installation

Library is tested and should work with Python versions 3.6, 3.8, 3.9, 3.10, 3.11 running on Rocky 8 and Rocky 9 releases.

RPM packages are prepared for Rocky releases and you may find it and download it from ARGO Repository. PyPI packages are prepared as well.

RPM production packages:

  • http://rpm-repo.argo.grnet.gr/ARGO/prod/rocky8/
  • http://rpm-repo.argo.grnet.gr/ARGO/prod/rocky9/

RPM devel packages:

  • http://rpm-repo.argo.grnet.gr/ARGO/devel/rocky8/
  • http://rpm-repo.argo.grnet.gr/ARGO/devel/rocky9/

PyPI package:

https://pypi.org/project/argo-ams-library/

Authentication

The AMS library uses a valid AMS token to execute requests against the AMS cluster. This token can be provided with 2 ways:

  • Obtain a valid ams token and then use it when initializing the ams object. python from argo_ams_library import ArgoMessagingService ams = ArgoMessagingService(endpoint="ams_endpoint", project="ams_project", token="your_ams_token")

  • Use a valid certificate python from argo_ams_library import ArgoMessagingService ams = ArgoMessagingService(endpoint="ams_endpoint", project="ams_project", cert="/path/to/cert", key="/path/to/cert/key") The library will use the provided certificate to access the corresponding ams token through the ARGO Authentication Service and then set the ams object's token field with the retrieved token.

Examples

In the folder examples, you may find examples of using the library:

  • for publishing messages (examples/publish.py)
  • for consuming messages in pull mode (examples/consume-pull.py)
  • retry feature for publish/consume methods (examples/retry.py)

Publish messages

This example explains how to publish messages in a topic with the use of the library. Topics are resources that can hold messages. Publishers (users/systems) can create topics on demand and name them (Usually with names that make sense and express the class of messages delivered in the topic). A topic name must be scoped to a project.

You may find more information about Topics in the ARGO Messaging Service documentation

publish.py --host=[the FQDN of AMS Service] --token=[the user token] --project=[the name of your project registered in AMS Service] --topic=[the topic to publish your messages]

Consume messages in pull mode

This example explains how to consume messages from a predefined subscription with the use of the library. A subscription is a named resource representing the stream of messages from a single, specific topic, to be delivered to the subscribing application. A subscription name must be scoped to a project. In pull delivery, your subscriber application initiates requests to the Pub/Sub server to retrieve messages. When you create a subscription, the system establishes a sync point. That is, your subscriber is guaranteed to receive any message published after this point. Messages published before the sync point may not be delivered.

You may find more information about Subscriptions in the ARGO Messaging Service documentation

``` consume-pull.py --host=[the FQDN of AMS Service] --token=[the user token] --project=[the name of your project registered in AMS Service] --topic=[the topic from where the messages are delivered ] --subscription=[the subscription name to pull the messages] --nummsgs=[the num of messages to consume]

```

Retry

Library has self-implemented HTTP request retry ability to seamlesssly interact with the ARGO Messaging service. Specifically, requests will be retried in case of: * timeouts from AMS (HTTP 408) or load balancer (HTTP 408 and 504) * load balancer HTTP 502, 503 * connection related problems in the lower network layers

It has two modes: static sleep and backoff. Examples are given in the in examples/retry.py.

Owner

  • Name: ARGOeu
  • Login: ARGOeu
  • Kind: organization

Α team working with the latest technologies about accounting, monitoring, messaging and eSeal Capabilities

GitHub Events

Total
  • Release event: 2
  • Delete event: 1
  • Push event: 7
  • Pull request event: 11
  • Create event: 3
Last Year
  • Release event: 2
  • Delete event: 1
  • Push event: 7
  • Pull request event: 11
  • Create event: 3

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 346
  • Total Committers: 10
  • Avg Commits per committer: 34.6
  • Development Distribution Score (DDS): 0.303
Top Committers
Name Email Commits
Daniel Vrcic d****c@g****m 241
Themis Zamani t****i@g****m 47
agelostsal a****l@g****m 27
Kostas Evangelou k****l@a****r 10
Kostas Koumantaros k****s@u****m 6
Adrian Coveney a****y@s****k 6
Konstantinos Kagkelidis k****s@g****m 6
Adrian Coveney t****y@u****m 1
Hrvoje Sute s****e@g****m 1
Enol Fernández e****z@e****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: almost 2 years ago

All Time
  • Total issues: 9
  • Total pull requests: 103
  • Average time to close issues: 5 months
  • Average time to close pull requests: 5 days
  • Total issue authors: 4
  • Total pull request authors: 9
  • Average comments per issue: 2.44
  • Average comments per pull request: 0.35
  • Merged pull requests: 88
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 11
  • Average time to close issues: 9 months
  • Average time to close pull requests: 12 days
  • Issue authors: 1
  • Pull request authors: 4
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.45
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • tofu-rocketry (4)
  • enolfc (3)
  • themiszamani (1)
  • gregcorbett (1)
  • vrdel (1)
  • samuraiii (1)
Pull Request Authors
  • vrdel (48)
  • agelostsal (28)
  • themiszamani (21)
  • kkoumantaros (6)
  • tofu-rocketry (5)
  • kevangel79 (4)
  • gregcorbett (2)
  • deksa89 (1)
  • enolfc (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 7,141 last-month
  • Total docker downloads: 4,686
  • Total dependent packages: 1
  • Total dependent repositories: 13
  • Total versions: 19
  • Total maintainers: 2
pypi.org: argo-ams-library

A simple python library for interacting with the ARGO Messaging Service

  • Versions: 19
  • Dependent Packages: 1
  • Dependent Repositories: 13
  • Downloads: 7,141 Last month
  • Docker Downloads: 4,686
Rankings
Docker downloads count: 1.7%
Dependent repos count: 4.0%
Dependent packages count: 4.7%
Forks count: 10.2%
Average: 10.5%
Downloads: 10.8%
Stargazers count: 31.9%
Maintainers (2)
Last synced: 10 months ago

Dependencies

Pipfile pypi
  • setuptools * develop
  • twine * develop
  • wheel * develop
documentation/Dockerfile docker
  • debian jessie build
setup.py pypi