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

First release of River Ruby bindings #1

Merged
merged 1 commit into from
Apr 26, 2024
Merged

Conversation

brandur
Copy link
Contributor

@brandur brandur commented Nov 20, 2023

A first push of Ruby bindings for River, providing insert-only client
to work jobs that are implemented in Go.

Includes two initial drivers in the drivers/ directory, one for
ActiveRecord and one for Sequel, which should cover the vast majority of
Ruby applications making use of Postgres. The drivers are kept in the
main gem's GitHub repository for convenience, but ship as separate gems
so that programs including them can minimize their dependencies.

Overall, I'm happy at how close I was able to keep the API to the Go
version. A lot of syntax in Go just isn't needed due to the more dynamic
and implicit nature of Ruby, but the parts that came through are quite
close. e.g. We have a job args concept, along with InsertOpts that can
be added to both jobs and at insert time, just like Go.

Purposely not implemented on this first push (I'll follow up with these
later on):

  • Unique jobs.
  • Batch insert.

Try to maintain high Ruby quality standards with:

  • Full spec suite that requires 100.0% branch coverage.
  • Use standardrb for lint.
  • Include RBS files with type and run Steep against the project to
    verify correctness.

@brandur brandur force-pushed the brandur-first-release branch 8 times, most recently from 859333e to 9012077 Compare November 20, 2023 00:33
brandur added a commit to riverqueue/riverqueue-ruby-sequel that referenced this pull request Nov 20, 2023
Related to main `riverqueue` gem's push in [1], this one provides a
driver implementation for the Sequel gem. This is a similar concept to
use the use of `riverpgxv5` in the main Go package -- it breaks up
implementations for specific database packages into separate gems so
that projects using River don't have include every third party database
framework under the sun. I'll also be writing one for ActiveRecord.

Like with [1], functionality for unique jobs and batch inserts is
currently missing, to be added on a follow up release.

[1] riverqueue/riverqueue-ruby#1
brandur added a commit to riverqueue/riverqueue-ruby-sequel that referenced this pull request Nov 20, 2023
Related to main `riverqueue` gem's push in [1], this one provides a
driver implementation for the Sequel gem. This is a similar concept to
use the use of `riverpgxv5` in the main Go package -- it breaks up
implementations for specific database packages into separate gems so
that projects using River don't have include every third party database
framework under the sun. I'll also be writing one for ActiveRecord.

Like with [1], functionality for unique jobs and batch inserts is
currently missing, to be added on a follow up release.

[1] riverqueue/riverqueue-ruby#1
@brandur brandur force-pushed the brandur-first-release branch from 9012077 to 6ebdab4 Compare November 20, 2023 00:42
@brandur
Copy link
Contributor Author

brandur commented Nov 20, 2023

@brandur brandur force-pushed the brandur-first-release branch from 6ebdab4 to 46b2985 Compare November 20, 2023 04:55
brandur added a commit to riverqueue/riverqueue-ruby-sequel that referenced this pull request Nov 20, 2023
Related to main `riverqueue` gem's push in [1], this one provides a
driver implementation for the Sequel gem. This is a similar concept to
use the use of `riverpgxv5` in the main Go package -- it breaks up
implementations for specific database packages into separate gems so
that projects using River don't have include every third party database
framework under the sun. I'll also be writing one for ActiveRecord.

Like with [1], functionality for unique jobs and batch inserts is
currently missing, to be added on a follow up release.

[1] riverqueue/riverqueue-ruby#1
brandur added a commit to riverqueue/riverqueue-ruby-sequel that referenced this pull request Nov 26, 2023
Related to main `riverqueue` gem's push in [1], this one provides a
driver implementation for the Sequel gem. This is a similar concept to
use the use of `riverpgxv5` in the main Go package -- it breaks up
implementations for specific database packages into separate gems so
that projects using River don't have include every third party database
framework under the sun. I'll also be writing one for ActiveRecord.

Like with [1], functionality for unique jobs and batch inserts is
currently missing, to be added on a follow up release.

[1] riverqueue/riverqueue-ruby#1
@brandur brandur force-pushed the brandur-first-release branch from 46b2985 to dce999d Compare November 26, 2023 16:38
brandur added a commit to riverqueue/riverqueue-ruby-sequel that referenced this pull request Nov 26, 2023
Related to main `riverqueue` gem's push in [1], this one provides a
driver implementation for the Sequel gem. This is a similar concept to
use the use of `riverpgxv5` in the main Go package -- it breaks up
implementations for specific database packages into separate gems so
that projects using River don't have include every third party database
framework under the sun. I'll also be writing one for ActiveRecord.

Like with [1], functionality for unique jobs and batch inserts is
currently missing, to be added on a follow up release.

[1] riverqueue/riverqueue-ruby#1
@brandur brandur force-pushed the brandur-first-release branch from dce999d to eefeaa0 Compare November 26, 2023 16:57
@brandur brandur force-pushed the brandur-first-release branch 2 times, most recently from 91b9ec4 to 95daf75 Compare March 2, 2024 15:25
brandur added a commit to riverqueue/riverqueue-ruby-sequel that referenced this pull request Mar 2, 2024
Related to main `riverqueue` gem's push in [1], this one provides a
driver implementation for the Sequel gem. This is a similar concept to
use the use of `riverpgxv5` in the main Go package -- it breaks up
implementations for specific database packages into separate gems so
that projects using River don't have include every third party database
framework under the sun. I'll also be writing one for ActiveRecord.

Like with [1], functionality for unique jobs and batch inserts is
currently missing, to be added on a follow up release.

[1] riverqueue/riverqueue-ruby#1
@brandur brandur force-pushed the brandur-first-release branch 4 times, most recently from 8e9e46f to 8d02904 Compare March 2, 2024 16:59
brandur added a commit to riverqueue/riverqueue-ruby-sequel that referenced this pull request Mar 2, 2024
Related to main `riverqueue` gem's push in [1], this one provides a
driver implementation for the Sequel gem. This is a similar concept to
use the use of `riverpgxv5` in the main Go package -- it breaks up
implementations for specific database packages into separate gems so
that projects using River don't have include every third party database
framework under the sun. I'll also be writing one for ActiveRecord.

Like with [1], functionality for unique jobs and batch inserts is
currently missing, to be added on a follow up release.

[1] riverqueue/riverqueue-ruby#1
@brandur brandur force-pushed the brandur-first-release branch from 8d02904 to 72d8f66 Compare March 2, 2024 17:32
brandur added a commit to riverqueue/riverqueue-ruby-sequel that referenced this pull request Mar 2, 2024
Related to main `riverqueue` gem's push in [1], this one provides a
driver implementation for the Sequel gem. This is a similar concept to
use the use of `riverpgxv5` in the main Go package -- it breaks up
implementations for specific database packages into separate gems so
that projects using River don't have include every third party database
framework under the sun. I'll also be writing one for ActiveRecord.

Like with [1], functionality for unique jobs and batch inserts is
currently missing, to be added on a follow up release.

[1] riverqueue/riverqueue-ruby#1
brandur added a commit to riverqueue/riverqueue-ruby-sequel that referenced this pull request Mar 2, 2024
Related to main `riverqueue` gem's push in [1], this one provides a
driver implementation for the Sequel gem. This is a similar concept to
use the use of `riverpgxv5` in the main Go package -- it breaks up
implementations for specific database packages into separate gems so
that projects using River don't have include every third party database
framework under the sun. I'll also be writing one for ActiveRecord.

Like with [1], functionality for unique jobs and batch inserts is
currently missing, to be added on a follow up release.

[1] riverqueue/riverqueue-ruby#1
@brandur brandur force-pushed the brandur-first-release branch from 72d8f66 to 3936213 Compare March 2, 2024 17:37
brandur added a commit to riverqueue/riverqueue-ruby-sequel that referenced this pull request Mar 4, 2024
Related to main `riverqueue` gem's push in [1], this one provides a
driver implementation for the Sequel gem. This is a similar concept to
use the use of `riverpgxv5` in the main Go package -- it breaks up
implementations for specific database packages into separate gems so
that projects using River don't have include every third party database
framework under the sun. I'll also be writing one for ActiveRecord.

Like with [1], functionality for unique jobs and batch inserts is
currently missing, to be added on a follow up release.

[1] riverqueue/riverqueue-ruby#1
@brandur brandur force-pushed the brandur-first-release branch from 3936213 to bd4a615 Compare March 5, 2024 01:25
brandur added a commit to riverqueue/riverqueue-ruby-sequel that referenced this pull request Mar 5, 2024
Related to main `riverqueue` gem's push in [1], this one provides a
driver implementation for the Sequel gem. This is a similar concept to
use the use of `riverpgxv5` in the main Go package -- it breaks up
implementations for specific database packages into separate gems so
that projects using River don't have include every third party database
framework under the sun. I'll also be writing one for ActiveRecord.

Like with [1], functionality for unique jobs and batch inserts is
currently missing, to be added on a follow up release.

[1] riverqueue/riverqueue-ruby#1
@brandur brandur force-pushed the brandur-first-release branch 4 times, most recently from 3491113 to e25d151 Compare March 6, 2024 01:43
@brandur
Copy link
Contributor Author

brandur commented Mar 6, 2024

So actually, I ended up just moving both the ActiveRecord and Sequel drivers into this main repo. This'll keep changes easier to make in the future since everything will be in one place.

brandur added a commit to riverqueue/riverqueue-ruby-sequel that referenced this pull request Mar 6, 2024
Add a note to the README to indicate that drivers are migrating to a
subdirectory in the main GitHub repository:

riverqueue/riverqueue-ruby#1
brandur added a commit to riverqueue/riverqueue-ruby-sequel that referenced this pull request Mar 6, 2024
Add a note to the README to indicate that drivers are migrating to a
subdirectory in the main GitHub repository:

riverqueue/riverqueue-ruby#1
@brandur brandur force-pushed the brandur-first-release branch 9 times, most recently from 020d4a1 to f96c103 Compare April 26, 2024 02:51
A first push of Ruby bindings for River, providing insert-only client
to work jobs that are implemented in Go.

Includes two initial drivers in the `drivers/` directory, one for
ActiveRecord and one for Sequel, which should cover the vast majority of
Ruby applications making use of Postgres. The drivers are kept in the
main gem's GitHub repository for convenience, but ship as separate gems
so that programs including them can minimize their dependencies.

Overall, I'm happy at how close I was able to keep the API to the Go
version. A lot of syntax in Go just isn't needed due to the more dynamic
and implicit nature of Ruby, but the parts that came through are quite
close. e.g. We have a job args concept, along with `InsertOpts` that can
be added to both jobs and at insert time, just like Go.

Purposely not implemented on this first push (I'll follow up with these
later on):

* Unique jobs.
* Batch insert.

Try to maintain high Ruby quality standards with:

* Full spec suite that requires 100.0% branch coverage.
* Use standardrb for lint.
* Include RBS files with type and run Steep against the project to
  verify correctness.
@brandur brandur force-pushed the brandur-first-release branch from f96c103 to 4eba885 Compare April 26, 2024 02:55
@brandur brandur merged commit 353f746 into master Apr 26, 2024
4 checks passed
@brandur brandur deleted the brandur-first-release branch April 26, 2024 02:57
brandur added a commit that referenced this pull request Apr 26, 2024
Update various files to prepare for release 0.1.0, containing the
initial implementation from #1.
brandur added a commit that referenced this pull request Apr 26, 2024
Update various files to prepare for release 0.1.0, containing the
initial implementation from #1.
@brandur brandur mentioned this pull request Apr 26, 2024
brandur added a commit that referenced this pull request Apr 26, 2024
Update various files to prepare for release 0.1.0, containing the
initial implementation from #1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant