Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REVIEW]: kiwiPy: Robust, high-volume, messaging for big-data and computational science workflows #2351

Open
whedon opened this issue Jun 17, 2020 · 18 comments
Assignees
Labels

Comments

@whedon
Copy link
Collaborator

@whedon whedon commented Jun 17, 2020

Submitting author: @muhrin (Martin Uhrin)
Repository: https://github.com/aiidateam/kiwipy.git
Version: v0.6.0
Editor: @danielskatz
Reviewer: @dghoshal-lbl, @uellue
Archive: Pending

⚠️ JOSS reduced service mode ⚠️

Due to the challenges of the COVID-19 pandemic, JOSS is currently operating in a "reduced service mode". You can read more about what that means in our blog post.

Status

status

Status badge code:

HTML: <a href="https://joss.theoj.org/papers/9e125b72f716db5303d3f4437896a157"><img src="https://joss.theoj.org/papers/9e125b72f716db5303d3f4437896a157/status.svg"></a>
Markdown: [![status](https://joss.theoj.org/papers/9e125b72f716db5303d3f4437896a157/status.svg)](https://joss.theoj.org/papers/9e125b72f716db5303d3f4437896a157)

Reviewers and authors:

Please avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) by leaving comments in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)

Reviewer instructions & questions

@dghoshal-lbl & @uellue, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:

  1. Make sure you're logged in to your GitHub account
  2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews/invitations

The reviewer guidelines are available here: https://joss.readthedocs.io/en/latest/reviewer_guidelines.html. Any questions/concerns please let @danielskatz know.

Please try and complete your review in the next six weeks

Review checklist for @dghoshal-lbl

Conflict of interest

  • I confirm that I have read the JOSS conflict of interest (COI) policy and that: I have no COIs with reviewing this work or that any perceived COIs have been waived by JOSS for the purpose of this review.

Code of Conduct

General checks

  • Repository: Is the source code for this software available at the repository url?
  • License: Does the repository contain a plain-text LICENSE file with the contents of an OSI approved software license?
  • Contribution and authorship: Has the submitting author (@muhrin) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?

Functionality

  • Installation: Does installation proceed as outlined in the documentation?
  • Functionality: Have the functional claims of the software been confirmed?
  • Performance: If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)

Documentation

  • A statement of need: Do the authors clearly state what problems the software is designed to solve and who the target audience is?
  • Installation instructions: Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.
  • Example usage: Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).
  • Functionality documentation: Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?
  • Automated tests: Are there automated tests or manual steps described so that the functionality of the software can be verified?
  • Community guidelines: Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support

Software paper

  • Summary: Has a clear description of the high-level functionality and purpose of the software for a diverse, non-specialist audience been provided?
  • A statement of need: Do the authors clearly state what problems the software is designed to solve and who the target audience is?
  • State of the field: Do the authors describe how this software compares to other commonly-used packages?
  • Quality of writing: Is the paper well written (i.e., it does not require editing for structure, language, or writing quality)?
  • References: Is the list of references complete, and is everything cited appropriately that should be cited (e.g., papers, datasets, software)? Do references in the text use the proper citation syntax?

Review checklist for @uellue

Conflict of interest

  • I confirm that I have read the JOSS conflict of interest (COI) policy and that: I have no COIs with reviewing this work or that any perceived COIs have been waived by JOSS for the purpose of this review.

Code of Conduct

General checks

  • Repository: Is the source code for this software available at the repository url?
  • License: Does the repository contain a plain-text LICENSE file with the contents of an OSI approved software license?
  • Contribution and authorship: Has the submitting author (@muhrin) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?

Functionality

  • Installation: Does installation proceed as outlined in the documentation?
  • Functionality: Have the functional claims of the software been confirmed?
  • Performance: If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)

Documentation

  • A statement of need: Do the authors clearly state what problems the software is designed to solve and who the target audience is?
  • Installation instructions: Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.
  • Example usage: Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).
  • Functionality documentation: Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?
  • Automated tests: Are there automated tests or manual steps described so that the functionality of the software can be verified?
  • Community guidelines: Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support

Software paper

  • Summary: Has a clear description of the high-level functionality and purpose of the software for a diverse, non-specialist audience been provided?
  • A statement of need: Do the authors clearly state what problems the software is designed to solve and who the target audience is?
  • State of the field: Do the authors describe how this software compares to other commonly-used packages?
  • Quality of writing: Is the paper well written (i.e., it does not require editing for structure, language, or writing quality)?
  • References: Is the list of references complete, and is everything cited appropriately that should be cited (e.g., papers, datasets, software)? Do references in the text use the proper citation syntax?
@whedon
Copy link
Collaborator Author

@whedon whedon commented Jun 17, 2020

Hello human, I'm @whedon, a robot that can help you with some common editorial tasks. @dghoshal-lbl, @uellue it looks like you're currently assigned to review this paper 🎉.

⚠️ JOSS reduced service mode ⚠️

Due to the challenges of the COVID-19 pandemic, JOSS is currently operating in a "reduced service mode". You can read more about what that means in our blog post.

Important

If you haven't already, you should seriously consider unsubscribing from GitHub notifications for this (https://github.com/openjournals/joss-reviews) repository. As a reviewer, you're probably currently watching this repository which means for GitHub's default behaviour you will receive notifications (emails) for all reviews 😿

To fix this do the following two things:

  1. Set yourself as 'Not watching' https://github.com/openjournals/joss-reviews:

watching

  1. You may also like to change your default settings for this watching repositories in your GitHub profile here: https://github.com/settings/notifications

notifications

For a list of things I can do to help you, just type:

@whedon commands

For example, to regenerate the paper pdf after making changes in the paper's md or bib files, type:

@whedon generate pdf
@whedon
Copy link
Collaborator Author

@whedon whedon commented Jun 17, 2020

Reference check summary:

OK DOIs

- 10.1063/1.4812323 is OK
- 10.1007/s11837-013-0755-4 is OK
- 10.1016/j.commatsci.2012.02.005 is OK
- 10.1088/2515-7639/ab13bb is OK
- 10.1109/MCSE.2012.16 is OK
- 10.1002/cpe.3505 is OK
- 10.1016/j.commatsci.2015.09.013 is OK
- 10.21105/joss.01844 is OK
- 10.21105/joss.01844 is OK

MISSING DOIs

- None

INVALID DOIs

- None
@whedon
Copy link
Collaborator Author

@whedon whedon commented Jun 17, 2020

@danielskatz
Copy link

@danielskatz danielskatz commented Jun 17, 2020

👋 @dghoshal-lbl & @uellue - thanks for agreeing to review this submission. Please be sure to read the comments above, and let me know if you have any questions. Basically, your job is to check the article proof and repository and check items off your checklist above. (And note that you will have to accept the invitation before you will be able to do so.)

If you see small problems that need to be discussed, feel free to discuss them here. But if you can, create a new issue in the target repository and link to this review thread in that issue to create a corresponding breadcrumb trail here.

I look forward to seeing how this review goes

@uellue
Copy link
Collaborator

@uellue uellue commented Jun 19, 2020

Regarding "State of the field":

Comparison with Pika

After a quick side-by-side comparison between the RabbitMQ documentation and kiwiPy, it is not clear to me what the difference between the default Pika Python API and the kiwiPy API is. The code of the Pika-based RabbitMQ examples and the kiwiPy examles are quite similar, and at least to my eyes the kiwiPy version is not a noticeable improvement, different from what is claimed in the paper.

(edit: source code formatting)

Pika https://www.rabbitmq.com/tutorials/tutorial-two-python.html
#!/usr/bin/env python
import time

import pika

connection = pika.BlockingConnection(
    pika.ConnectionParameters(host='localhost'))
channel = connection.channel()

channel.queue_declare(queue='hello')


def callback(ch, method, properties, body):
    print(" [x] Received %r" % body)
    time.sleep(body.count(b'.'))
    print(" [x] Done")


channel.basic_consume(
    queue='hello', on_message_callback=callback, auto_ack=True)

print(' [*] Waiting for messages. To exit press CTRL+C')
channel.start_consuming()
kiwiPy https://github.com/aiidateam/kiwipy/blob/develop/README.rst
# -*- coding: utf-8 -*-
import time
import threading

import kiwipy

print(' [*] Waiting for messages. To exit press CTRL+C')


def callback(_comm, task):
    print((' [x] Received %r' % task))
    time.sleep(task.count('.'))
    print(' [x] Done')
    return task


with kiwipy.connect('amqp://127.0.0.1/') as communicator:
    communicator.add_task_subscriber(callback)
    try:
        threading.Event().wait()
    except KeyboardInterrupt:
        pass

Comparison with other work distribution and messaging systems

A quick list of major distributed work scheduling systems with Python API that might deserve a comparison:

The paper and documentation should make much clearer what makes kiwiPy unique and for what particular use cases it is advantageous. Perhaps it can also reference the appropriate parts of RabbitMQ documentation since it is essentially a Python API for it, as far as I understood.

@uellue
Copy link
Collaborator

@uellue uellue commented Jun 19, 2020

Regarding "References": A reference to the default "Pika" Python API for RabbitMQ https://pika.readthedocs.io/en/stable/ seems to be missing.

@uellue
Copy link
Collaborator

@uellue uellue commented Jun 19, 2020

Regarding "Community guidelines": aiidateam/kiwipy#65

@uellue
Copy link
Collaborator

@uellue uellue commented Jun 19, 2020

@danielskatz @muhrin This concludes my first round of review. Looking forward to your responses!

@muhrin
Copy link

@muhrin muhrin commented Jun 19, 2020

@uellue, many thanks for the helpful review. I'll coordinate with my coauthor and address the points you've raised.

@danielskatz
Copy link

@danielskatz danielskatz commented Jun 26, 2020

👋 @muhrin - any update at this point?

@muhrin
Copy link

@muhrin muhrin commented Jun 26, 2020

We've addressed @uellue issue regarding contributor guidelines by adding wiki entry with is now linked to in the docs.
I've yet to find the time to address the other points raise but should find the time in the coming days. I'll report back as soon as I can.

@muhrin
Copy link

@muhrin muhrin commented Jul 7, 2020

Dear @danielskatz,

we once again thank @uellue for his thorough review which has helped to improve both the documentation and the paper itself. We have made the following changes to address the comments made:

  • aiidateam/kiwipy@26b561a
    We have added a contributing guide to our wiki detailing how contributions to kiwiPy can be made (this is linked to from the documentation), thus closing aiidateam/kiwipy#65.

  • aiidateam/kiwipy@56a6050
    A direct comparison to pika (the library used for tutorial on the RabbitMQ website) has been added to the documentation that both highlights the differences in in syntax and acts as a guide for transitioning to kiwiPy from pika. We believe this highlights that, for all but the most simple of cases, kiwiPy has more compact and pythonic syntax (e.g. contexts for resource lifetime scoping, use of futures), but perhaps more significantly we show that kiwiPy has a higher-level focus compared to pika making it more accessible to users not familiar with channels, exchanges, routing, etc.

  • aiidateam/kiwipy@e10464d
    We recognise that we did not sufficiently emphasise the major benefit and differentiating factor of kiwiPy as compared to some existing libraries as highlighted in the review (Dask, ZMQ, MPI). Namely, that kiwiPy (via RabbitMQ) automatically persists messages (e.g. tasks) to disk allowing us to build loosely coupled systems where it is not expected that all clients (or even the broker) will be online at all times allowing long-running workflows (taking weeks or months) to complete as and when resources are available. This has been highlighted in the paper and a comparison has been added to a number of existing libraries.

This concludes our changes in response to the review.

We look forward to the continuation of the review process.

@uellue
Copy link
Collaborator

@uellue uellue commented Jul 7, 2020

Dear @muhrin,

many thanks for the update! The new content is a great help for readers to understand the use cases and strengths of kiwiPy. The comparison with Pika and other systems sounds fair and objective. 👍 This fully addresses my previous comments and from my perspective the paper is good to go. 🚀 Congratulations!

CC @danielskatz

@muhrin
Copy link

@muhrin muhrin commented Jul 7, 2020

Thanks @uellue . Indeed, the library has certainly benefited from these additions. Thanks again for your review.

@uellue
Copy link
Collaborator

@uellue uellue commented Jul 7, 2020

Happy to hear that you found it helpful! :-)

@danielskatz
Copy link

@danielskatz danielskatz commented Jul 7, 2020

👋 @dghoshal-lbl - how is your review coming along?

@dghoshal-lbl
Copy link
Collaborator

@dghoshal-lbl dghoshal-lbl commented Jul 7, 2020

I finished my first round of review for the software and the paper. Some of the paper related concerns have already been addressed. I have a couple of more questions regarding the paper:

i) Has the library been tested to show any significant performance overheads? Mainly because this adds another level of abstraction to RabbitMQ.

ii) Since one of the use-cases for kiwiPy is to restart partially completed workflows and HPC jobs, I was wondering if there are any specific configurations in kiwiPy that enables this or if this is a default behavior?

Regarding the software, I was able to install it but not test its functionality properly:

i) I could not find any module or scripts that would let me test the library.

ii) When I wrote my own client and server following the examples, I ran into the following error:
ImportError: cannot import name 'AsyncContextManager'

I also see that there are a few examples in the source tree. I can dig deeper into why I am getting this error, but I think it will be good to document the steps to quickly test the examples or provide scripts for validating the tests.

@danielskatz
Copy link

@danielskatz danielskatz commented Jul 12, 2020

👋 @muhrin - I think we're waiting for your response to the issues @dghoshal-lbl has raised...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.