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]: OpenMSIStream: A Python package for facilitating integration of streaming data in diverse laboratory environments #4896

Closed
editorialbot opened this issue Oct 31, 2022 · 86 comments
Assignees
Labels
accepted Dockerfile published Papers published in JOSS Python recommend-accept Papers recommended for acceptance in JOSS. review TeX Track: 7 (CSISM) Computer science, Information Science, and Mathematics

Comments

@editorialbot
Copy link
Collaborator

editorialbot commented Oct 31, 2022

Submitting author: @eminizer (Margaret Eminizer)
Repository: https:/openmsi/openmsistream
Branch with paper.md (empty if default branch):
Version: v1.3.1
Editor: @pibion
Reviewers: @lucask07, @SergeyYakubov
Archive: 10.5281/zenodo.7713196

Status

status

Status badge code:

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

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

@lucask07, your review will be checklist based. Each of you will have a separate checklist that you should update when carrying out your review.
First of all you need to run this command in a separate comment to create the checklist:

@editorialbot generate my checklist

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

Please start on your review when you are able, and be sure to complete your review in the next six weeks, at the very latest

Checklists

📝 Checklist for @lucask07

📝 Checklist for @SergeyYakubov

@editorialbot
Copy link
Collaborator Author

Hello humans, I'm @editorialbot, a robot that can help you with some common editorial tasks.

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

@editorialbot commands

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

@editorialbot generate pdf

@editorialbot
Copy link
Collaborator Author

Software report:

github.com/AlDanial/cloc v 1.88  T=0.18 s (938.0 files/s, 75212.4 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Python                          90            991           3128           7444
reStructuredText                61            394            190            617
Markdown                         5             35              0            115
YAML                             3              9             22            102
TeX                              1             11              0             84
DOS Batch                        1              8              1             26
Bourne Shell                     1              0              3             12
make                             1              4              7              9
Dockerfile                       1              4              5              6
CSS                              1              0              0              3
-------------------------------------------------------------------------------
SUM:                           165           1456           3356           8418
-------------------------------------------------------------------------------


gitinspector failed to run statistical information for the repository

@editorialbot
Copy link
Collaborator Author

Wordcount for paper.md is 1392

@editorialbot
Copy link
Collaborator Author

Reference check summary (note 'MISSING' DOIs are suggestions that need verification):

OK DOIs

- None

MISSING DOIs

- 10.3139/9783446470460.fm may be a valid DOI for title: Apache Kafka
- 10.5040/9781784602314.00000002 may be a valid DOI for title: pandas

INVALID DOIs

- None

@editorialbot
Copy link
Collaborator Author

👉📄 Download article proof 📄 View article proof on GitHub 📄 👈

@lucask07
Copy link

lucask07 commented Nov 2, 2022

Review checklist for @lucask07

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 https:/openmsi/openmsistream?
  • 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 (@eminizer) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?
  • Substantial scholarly effort: Does this submission meet the scope eligibility described in the JOSS guidelines
  • Data sharing: If the paper contains original data, data are accessible to the reviewers. If the paper contains no original data, please check this item.
  • Reproducibility: If the paper contains original results, results are entirely reproducible by reviewers. If the paper contains no original results, please check this item.
  • Human and animal research: If the paper contains original data research on humans subjects or animals, does it comply with JOSS's human participants research policy and/or animal research policy? If the paper contains no such data, please check this item.

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: Does the paper have a section titled 'Statement of need' that clearly states what problems the software is designed to solve, who the target audience is, and its relation to other work?
  • 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?

@lucask07
Copy link

lucask07 commented Nov 8, 2022

Installation for a MAC with Intel chip was checked and proceeded as outlined in the documentation.

@lucask07
Copy link

lucask07 commented Nov 8, 2022

@eminizer
Could you point me to the simplest example to try this package on my own system(s)?

@eminizer
Copy link

eminizer commented Nov 8, 2022

Hi @lucask07,

Yes! Certainly the simplest program would be "UploadDataFile", which will break a given file into chunks and Produce those chunks as messages to a Kafka topic.

To run that program (or any others), though, you will need access to a Kafka cluster as enumerated in the "external requirements" section of the documentation. It's fairly quick and easy to set up a Kafka cluster to use on Confluent Cloud, though there is a subscription fee to use that service.

If you'd like, for purposes of the review, maybe I could send you the access keys to our group's cluster and you could try passing data through there? Using our cluster would also make it very easy for you to run our CI tests on your own machine once you set the server/username/password as environment variables on your system(s).

Sorry for the trouble; this package is designed to simplify passing streaming data through Kafka, but users generally need to have their own external access to a broker to use. Let me know if you'd like me to send you our access keys through something more secure.

Thanks for your efforts,
Maggie

@lucask07
Copy link

lucask07 commented Nov 9, 2022

Thanks @eminizer I would like to try an actual test. This would help my understanding of the overall architecture. If there is an easy way for you to allow me to access your cluster I would try passing data through there. However, if this becomes a project in itself let's not bother.
My email is koerner dot lucas @ stthomas dot edu.

Thank you, Lucas

@lucask07
Copy link

lucask07 commented Nov 9, 2022

A paper comment. An example of a real dataset would be helpful. What are typical file types and sizes? Is there a typical rate at which the data is generated/consumed?

And a related side question: is there a guideline for maximum filesize when using Apache Kafka?

@eminizer
Copy link

eminizer commented Nov 9, 2022

Thank you, @lucask07, and again sorry for the trouble. Some responses in line:

I would like to try an actual test. This would help my understanding of the overall architecture. If there is an easy way for you to allow me to access your cluster I would try passing data through there.

Of course! We would definitely want you to try running the code yourself, that's why we're here : )

I wasn't sure how the review would proceed, but using our cluster would definitely be fastest and easiest. I've just emailed you the information for how to connect to it.

There are a number of topics there for the CI tests (listed here, and the default topic called "test" also exists), but I just created another one called "joss_review" for you to use however you'd like. I set the retention time on that new topic to an hour, so it'll clear itself out regularly, and I otherwise left all the settings at their defaults (6 partitions, ~1MB max message size, etc.). If you would like me to create any other topics for you to use just let me know.

An example of a real dataset would be helpful. What are typical file types and sizes?

Good questions. We've deployed OpenMSIStream in a variety of lab environments, so some examples of the file data we're moving include .csv and .raw data files, bitmap and .tif images, .xml and .txt description files, and even some proprietary file formats for automated backups. These files range in size from about 1.5KB to about 4.5GB. We also move data that don't come originally from files, in the form of JSON-formatted strings of extracted metadata information.

The PARADIM group with whom we work hosts a number of public domain datasets at https://data.paradim.org/ if you would like to use any of those as examples of real-world data. Other than that, though, the software is generally agnostic to the type (and, to a point, size, see below) of files, so you should be able to test with pretty much anything.

Is there a typical rate at which the data is generated/consumed?

Generally upload and download speeds are limited mostly by the network and the read/write speed of the disks on which the filess are stored, so we typically get upload and download rates of 60MB/s or so on wide average. We usually set up a DataFileUploadDirectory on different lab machines to passively wait for new files to be added, so the exact rate of data production/consumption depends on when experiments are performed and new data are saved.

is there a guideline for maximum filesize when using Apache Kafka?

There is (theoretically) no limit to the size of files, because OpenMSIStream breaks files of any size into individual chunks, and each chunk is Produced as a message. Kafka limits the sizes of individual messages to 1MB by default, and OpenMSIStream creates messages of about 16KB each by default, but these are both configurable through Kafka and OpenMSIStream, respectively. When we're moving very large files we use our own on-prem broker where we can set the max message size on the relevant topic to 32MB, and then we configure OpenMSIStream to send messages of 8-17MB each.

In practice, however, there is more latency through both Kafka and OpenMSIStream when using larger message sizes, and reconstructed files are held in memory unless they're being written to disk, so those are both considerations. I think those 4.5GB files I mentioned are starting to push the edge of what is practically feasible on standard hardware.

Let me know if there's any other way I can be helpful, and thank you!
Maggie

@lucask07
Copy link

Hello @eminizer

I have added the Kafka environmental variables and now am moving further with the tests. Progress!

----------------------------------------------------------------------
Ran 49 tests in 175.359s

FAILED (failures=2, errors=4, skipped=4)

Seems that most of the issues are FileExistsError:

FileExistsError: [Errno 17] File exists: '/somepaths/joss/openMSIstream/openmsistream/test/test_reco'
After removing these files the tests advanced further

test_initial_properties (test_upload_data_file.TestUploadDataFile) ... ok
test_upload_whole_file_kafka (test_upload_data_file.TestUploadDataFile) ... ok

======================================================================
FAIL: test_data_file_stream_processor_restart_kafka (test_data_file_stream_processor.TestDataFileStreamProcessor)
Test restarting a DataFileStreamProcessor from the beginning of the topic after failing to process a file
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/somepaths/joss/openMSIstream/openmsistream/test/unittests/test_data_file_stream_processor.py", line 132, in test_data_file_stream_processor_restart_kafka
    self.assertFalse(TEST_CONST.TEST_STREAM_PROCESSOR_OUTPUT_DIR_RESTART.is_dir())
AssertionError: True is not false

======================================================================
FAIL: test_data_file_stream_processor_restart_encrypted_kafka (test_data_file_stream_processor_encrypted.TestDataFileStreamProcessorEncyrpted)
Test restarting an encrypted DataFileStreamProcessor after failing to process a file
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/somepaths/joss/openMSIstream/openmsistream/test/unittests/test_data_file_stream_processor_encrypted.py", line 26, in test_data_file_stream_processor_restart_encrypted_kafka
    self.assertFalse(TEST_CONST.TEST_STREAM_PROCESSOR_OUTPUT_DIR_RESTART_ENCRYPTED.is_dir())
AssertionError: True is not false

----------------------------------------------------------------------
Ran 49 tests in 200.716s

FAILED (failures=2, skipped=4)

@lucask07
Copy link

My tests (on a MAC) were initially throwing an SSL error like:
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed

I removed this error by adding

CERT_PATH=$(python -m certifi)
export SSL_CERT_FILE=${CERT_PATH}
export REQUESTS_CA_BUNDLE=${CERT_PATH}

to my bash_profile as described at this StackOverflow question.

@lucask07
Copy link

The paper reads very well. Nice work!

A few boxes I will wait for feedback to check off:

  • The package would benefit from a few practical examples added to the docs and repository. These examples ideally would be a tangible experiment. GitHub Issue #27
  • It is not clear how to use the configuration files. GitHub Issue #26

The

State of the field: Do the authors describe how this software compares to other commonly-used packages?

in the paper could use a revisit. The authors mention and cite Bluesky from NSLS but do not note if this fulfills the need. Are there other Python packages that enable streaming of data?

Hopefully, I can get all the tests working as well!

@eminizer
Copy link

eminizer commented Nov 21, 2022

Hi @lucask07,

Thanks for the detailed look!

First, in terms of the tests, I just released a new version on PyPi (v1.1.6) that should prevent the failures you were seeing. If you update your install and try again hopefully you'll have more success this time!

Second, I love your idea of including concrete examples in the repo and documentation. I'll absolutely work on this soon, and I'll link a PR to the issue you opened for it. I'll also do the same for some documentation updates to better explain the usage of the configuration files. These later updates might take a bit longer due to the short week, but I'll get to them as soon as I'm able.

We can also flesh out that section in the paper to provide more context, and I'll also add to the troubleshooting section in the documentation to reflect the solution you found to that SSL verification error.

Thanks again for all of your attention to detail and for your help in improving our body of work : )

Best,
Maggie

@lucask07
Copy link

Great, thanks @eminizer and nice work, all tests pass.

----------------------------------------------------------------------
Ran 49 tests in 339.638s

OK (skipped=4)
All unittest checks complete : )
SKIPPING GIT REPOSITORY CHECKS
All tests passed!

In terms of the paper and documentation edits you are in control of the timeline. Just mention me when there is new material to review.

@eminizer
Copy link

eminizer commented Dec 2, 2022

Hi again @lucask07,

I've just released version 1.2.0 of OpenMSIStream, which includes some extra documentation for how to use configuration files see and a brand new section with detailed tutorials for uploading/downloading files, transferring files to S3 buckets, and making plots and extracting metadata from files on streams. The tutorials are covered by CI tests, as well. Please take a look and let me know what you think! If you'd like to try the tutorials, I've created topics with the appropriate names on our Kafka broker and you should be all good to go with then environment variables you've already set.

The edit to the paper text we will likely put together at the start of next week; we'd like to gather a little more context first.

Thanks as always for your continued help and for the improvements to our work that you've inspired : )

Best,
Maggie

@lucask07
Copy link

lucask07 commented Dec 5, 2022

Hi @eminizer,
The tutorials are very nicely done. Great work! I have checked off the 'Example Usage' box. Unfortunately, with the end of the semester approaching, I won't have time to try these out.

I will check back when the paper edits are posted.

Best,
Lucas

@eminizer
Copy link

eminizer commented Dec 6, 2022

@editorialbot generate pdf

@editorialbot
Copy link
Collaborator Author

👉📄 Download article proof 📄 View article proof on GitHub 📄 👈

@eminizer
Copy link

eminizer commented Dec 6, 2022

Hi again @lucask07 ,

I've just merged a PR that updates the last paragraph in the "Statement of Need" section of the paper to elaborate a bit on how OpenMSIStream fits in with other existing open source Python libraries. I gave some examples in the paper, but the overarching idea is that existing packages tend to fall into one of three categories: complete streaming libraries, libraries that "stream" collected data to local or remote files, and libraries that can be used to design and execute "streaming" workflows entirely locally. OpenMSIStream would integrate well with any of them, but it also fills a gap they share by providing a full streaming solution using a remote broker while remaining accessible to lab users and students.

Complete streaming libraries (like Bytewax, or the confluent_kafka wrapper itself on which OpenMSIStream is built) are very low-level and require direct interaction with the underlying streaming infrastructure, whereas OpenMSIStream is higher level and abstracts away the details of its underlying streaming solution to remain more accessible to lab users. OpenMSIStream provides a way for lab students and scientists to very easily convert analysis scripts or metadata extractors that run on local or remote files into running on files moving through streams as groups of arbitrarily-sized messages.

The Bluesky collection framework doesn't actually yet implement a full streaming solution with a remote broker (as erroneously stated in the original draft of our paper), but rather it can update local and remote files as data are collected. OpenMSIStream publishes data to/reads data from the central Kafka broker.

Streamz and other "local-only" streaming solutions are great for automating local workflows on single machines. OpenMSIStream can be run across multiple machines all interacting with the remote broker to bring different parts of the streaming ecosystem to where they are best suited computationally.

Please let me know if we can do a better job of conveying these ideas, or if there's anything else I can help with.

Thanks for your continued help, and best wishes as always,
Maggie

@lucask07
Copy link

lucask07 commented Dec 7, 2022

@eminizer great paper and excellent Python package!
@pibion I fully approve this paper for publication.

@editorialbot
Copy link
Collaborator Author

Done! Archive is now 10.5281/zenodo.7713196

@pibion
Copy link

pibion commented Mar 9, 2023

@editorialbot generate pdf

@pibion
Copy link

pibion commented Mar 9, 2023

@editorialbot check references

@editorialbot
Copy link
Collaborator Author

👉📄 Download article proof 📄 View article proof on GitHub 📄 👈

@editorialbot
Copy link
Collaborator Author

Reference check summary (note 'MISSING' DOIs are suggestions that need verification):

OK DOIs

- 10.1038/s41586-020-2649-2 is OK
- 10.1038/s41592-019-0686-2 is OK
- 10.5281/zenodo.3509134 is OK
- 10.25080/Majora-92bf1922-00a is OK

MISSING DOIs

- 10.3139/9783446470460.fm may be a valid DOI for title: Apache Kafka

INVALID DOIs

- None

@pibion
Copy link

pibion commented Mar 9, 2023

@editorialbot recommend-accept

@editorialbot
Copy link
Collaborator Author

Attempting dry run of processing paper acceptance...

@editorialbot
Copy link
Collaborator Author

Reference check summary (note 'MISSING' DOIs are suggestions that need verification):

OK DOIs

- 10.1038/s41586-020-2649-2 is OK
- 10.1038/s41592-019-0686-2 is OK
- 10.5281/zenodo.3509134 is OK
- 10.25080/Majora-92bf1922-00a is OK

MISSING DOIs

- 10.3139/9783446470460.fm may be a valid DOI for title: Apache Kafka

INVALID DOIs

- None

@editorialbot
Copy link
Collaborator Author

👋 @openjournals/csism-eics, this paper is ready to be accepted and published.

Check final proof 👉📄 Download article

If the paper PDF and the deposit XML files look good in openjournals/joss-papers#4042, then you can now move forward with accepting the submission by compiling again with the command @editorialbot accept

@editorialbot editorialbot added the recommend-accept Papers recommended for acceptance in JOSS. label Mar 9, 2023
@danielskatz
Copy link

👋 @eminizer - I'm the track editor who is taking over for the final steps - I've suggested some small changes in openmsi/openmsistream#36. Please merge this, or let me know what you disagree with, then we can proceed.

@eminizer
Copy link

eminizer commented Mar 9, 2023

Hi @danielskatz ,

I just merged your PR, thank you for the close look. Let me know how else I can help : )

@danielskatz
Copy link

@editorialbot recommend-accept

hopefully the final proof for me to check

@editorialbot
Copy link
Collaborator Author

Attempting dry run of processing paper acceptance...

@editorialbot
Copy link
Collaborator Author

Reference check summary (note 'MISSING' DOIs are suggestions that need verification):

OK DOIs

- 10.1038/s41586-020-2649-2 is OK
- 10.1038/s41592-019-0686-2 is OK
- 10.5281/zenodo.3509134 is OK
- 10.25080/Majora-92bf1922-00a is OK

MISSING DOIs

- 10.3139/9783446470460.fm may be a valid DOI for title: Apache Kafka

INVALID DOIs

- None

@editorialbot
Copy link
Collaborator Author

👋 @openjournals/csism-eics, this paper is ready to be accepted and published.

Check final proof 👉📄 Download article

If the paper PDF and the deposit XML files look good in openjournals/joss-papers#4044, then you can now move forward with accepting the submission by compiling again with the command @editorialbot accept

@danielskatz
Copy link

@editorialbot accept

@editorialbot
Copy link
Collaborator Author

Doing it live! Attempting automated processing of paper acceptance...

@editorialbot
Copy link
Collaborator Author

🐦🐦🐦 👉 Tweet for this paper 👈 🐦🐦🐦

@editorialbot
Copy link
Collaborator Author

🐘🐘🐘 👉 Toot for this paper 👈 🐘🐘🐘

@editorialbot
Copy link
Collaborator Author

🚨🚨🚨 THIS IS NOT A DRILL, YOU HAVE JUST ACCEPTED A PAPER INTO JOSS! 🚨🚨🚨

Here's what you must now do:

  1. Check final PDF and Crossref metadata that was deposited 👉 Creating pull request for 10.21105.joss.04896 joss-papers#4045
  2. Wait a couple of minutes, then verify that the paper DOI resolves https://doi.org/10.21105/joss.04896
  3. If everything looks good, then close this review issue.
  4. Party like you just published a paper! 🎉🌈🦄💃👻🤘

Any issues? Notify your editorial technical team...

@editorialbot editorialbot added accepted published Papers published in JOSS labels Mar 9, 2023
@danielskatz
Copy link

Congratulations to @eminizer (Margaret Eminizer) and co-authors!!

And thanks to @lucask07, @SergeyYakubov for reviewing, and to @pibion for editing!
We couldn't do this without you

@editorialbot
Copy link
Collaborator Author

🎉🎉🎉 Congratulations on your paper acceptance! 🎉🎉🎉

If you would like to include a link to your paper from your README use the following code snippets:

Markdown:
[![DOI](https://joss.theoj.org/papers/10.21105/joss.04896/status.svg)](https://doi.org/10.21105/joss.04896)

HTML:
<a style="border-width:0" href="https://doi.org/10.21105/joss.04896">
  <img src="https://joss.theoj.org/papers/10.21105/joss.04896/status.svg" alt="DOI badge" >
</a>

reStructuredText:
.. image:: https://joss.theoj.org/papers/10.21105/joss.04896/status.svg
   :target: https://doi.org/10.21105/joss.04896

This is how it will look in your documentation:

DOI

We need your help!

The Journal of Open Source Software is a community-run journal and relies upon volunteer effort. If you'd like to support us please consider doing either one (or both) of the the following:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Dockerfile published Papers published in JOSS Python recommend-accept Papers recommended for acceptance in JOSS. review TeX Track: 7 (CSISM) Computer science, Information Science, and Mathematics
Projects
None yet
Development

No branches or pull requests

8 participants