[PATCH 0/9]: gnu: Add NSQ.

  • Done
  • quality assurance status badge
Details
2 participants
  • Maxim Cournoyer
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal
S
S
Sharlatan Hellseher wrote on 6 Aug 2023 21:54
(address . guix-patches@gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
cover.1691350701.git.sharlatanus@gmail.com
Hi Guix!

This patch series adds broker queue with high availability model - NSQ.

While preparing packages for it I've notices go-github-com-golang-snappy is in
(gnu packages syncthing), it might be reasonable to move Golang related
packages from there to (gnu packages golang) to make the search of required
Golang packages easy to find in logical place.

Othere issues where some of the packages were already mentioned but not merged yet:

- go-github-com-julienschmidt-httprouter :: https://issues.guix.gnu.org/54560

It would be great to add services for each of the applications from (gnu packages
high-availability) as all of them have purpose to run as daemons.

Regards,
Oleg

Sharlatan Hellseher (9):
gnu: Add go-github-com-bitly-go-hostpool.
gnu: Add go-github-com-bitly-timer-metrics.
gnu: Add go-github-com-bmizerany-perks-quantile.
gnu: Add go-github-com-mreiferson-go-svc.
gnu: Add go-github-com-julienschmidt-httprouter.
gnu: Add go-github-com-mreiferson-go-options.
gnu: Add go-github-com-nsqio-go-diskqueue.
gnu: Add go-github-com-nsqio-go-nsq.
gnu: Add nsq.

gnu/packages/golang.scm | 193 ++++++++++++++++++++++++++++-
gnu/packages/high-availability.scm | 87 +++++++++++++
2 files changed, 279 insertions(+), 1 deletion(-)


base-commit: c4b9f726e3a1889b92a4b14a2af1c25f10798469
--
2.40.1
S
S
Sharlatan Hellseher wrote on 6 Aug 2023 21:55
[PATCH 1/9] gnu: Add go-github-com-bitly-go-hostpool.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
571542b44f072e97b1f336f30b6dc02e52f865bd.1691350701.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-bitly-go-hostpool): New variable.
---
gnu/packages/golang.scm | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)

Toggle diff (47 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ea6aadbe80..0a747f2eee 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -25,7 +25,7 @@
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021, 2022 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
-;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@mgail.com>
+;;; Copyright © 2021, 2023 Sharlatan Hellseher <sharlatanus@mgail.com>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
;;; Copyright © 2021 jgart <jgart@dismail.de>
@@ -2112,6 +2112,31 @@ (define-public go-github-com-dhowett-go-plist
types.")
(license license:giftware))))
+(define-public go-github-com-bitly-go-hostpool
+ (package
+ (name "go-github-com-bitly-go-hostpool")
+ (version "0.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bitly/go-hostpool")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1iibj7dwymczw7cknrh6glc6sdpp4yap2plnyr8qphynwrzlz73w"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/bitly/go-hostpool"))
+ (native-inputs (list go-github-com-stretchr-testify))
+ (home-page "https://github.com/bitly/go-hostpool")
+ (synopsis "Pool among multiple hosts from Golang")
+ (description
+ "This package provides a Go package to intelligently and flexibly pool among
+multiple hosts from your Go application. Host selection can operate in round
+robin or epsilon greedy mode, and unresponsive hosts are avoided.")
+ (license license:expat)))
+
(define-public go-github-com-blanu-dust
(package
(name "go-github-com-blanu-dust")
--
2.40.1
S
S
Sharlatan Hellseher wrote on 6 Aug 2023 21:55
[PATCH 4/9] gnu: Add go-github-com-mreiferson-go-svc.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
3baf6e14e056d3b59288af505fc1eafd3d4c74d1.1691350701.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-mreiferson-go-svc): New variable.
---
gnu/packages/golang.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ce46e02158..7890e4d583 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -6256,6 +6256,34 @@ (define-public go-github-com-mr-tron-base58
encoding and 8 times faster decoding.")
(license license:expat))))
+(define-public go-github-com-mreiferson-go-svc
+ ;; NSQ specific fork of github.com/judwhite/go-svc, as Guix go build system
+ ;; does not support go.mod with `replace' statement.
+ (let ((commit "7a96e00010f68d9436e3de53a70c53f209a0c244")
+ (revision "0"))
+ (package
+ (name "go-github-com-mreiferson-go-svc")
+ (version (git-version "1.2.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mreiferson/go-svc")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1acgb0n3svhnraqj1fz5qc5n3b4vc5ffwyk9vfi6gcfkibm0hgmd"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/judwhite/go-svc"))
+ (propagated-inputs (list go-golang-org-x-sys))
+ (home-page "https://github.com/mreiferson/go-svc")
+ (synopsis "Go Windows Service wrapper that plays nice with Linux")
+ (description
+ "Go Windows Service wrapper that plays nice with Linux. Windows tests
+@@url{https://github.com/judwhite/go-svc/raw/master/svc/svc_windows_test.go,here}.")
+ (license license:expat))))
+
(define-public go-github-com-gxed-hashland-keccakpg
(let ((commit "d9f6b97f8db22dd1e090fd0bbbe98f09cc7dd0a8")
(revision "0"))
--
2.40.1
S
S
Sharlatan Hellseher wrote on 6 Aug 2023 21:55
[PATCH 3/9] gnu: Add go-github-com-bmizerany-perks-quantile.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
dd35850030451700572b8a72655397383867975a.1691350701.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-bmizerany-perks-quantile): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 4721519a9b..ce46e02158 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9033,6 +9033,30 @@ (define-public go-github-com-bmatcuk-doublestar
matching and globbing with support for \"doublestar\" patterns.")
(license license:expat)))
+(define-public go-github-com-bmizerany-perks-quantile
+ (package
+ (name "go-github-com-bmizerany-perks-quantile")
+ (version "0.0.0-20230307044200-03f9df79da1e")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bmizerany/perks")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1f2a99v3618bz2mf61iwhdjm3xi1gam6v4apqgcrz71gj7ba9943"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:unpack-path "github.com/bmizerany/perks"
+ #:import-path "github.com/bmizerany/perks/quantile"))
+ (home-page "https://github.com/bmizerany/perks")
+ (synopsis "Perks for Golang")
+ (description
+ "Perks contains the Go package quantile that computes approximate quantiles
+over an unbounded data stream within low memory and CPU bounds.")
+ (license license:bsd-2)))
+
(define-public go-github-com-dlclark-regexp2
(package
(name "go-github-com-dlclark-regexp2")
--
2.40.1
S
S
Sharlatan Hellseher wrote on 6 Aug 2023 21:55
[PATCH 5/9] gnu: Add go-github-com-julienschmidt-httprouter.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
bf8f93602785aa0f28de3bedabd8bd90c51541db.1691350701.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-julienschmidt-httprouter): New variable.
---
gnu/packages/golang.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 7890e4d583..cdfad943c7 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9922,6 +9922,28 @@ (define-public go-github-com-juju-ansiterm
for color and styles.")
(license license:lgpl3)))
+(define-public go-github-com-julienschmidt-httprouter
+ (package
+ (name "go-github-com-julienschmidt-httprouter")
+ (version "1.3.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/julienschmidt/httprouter")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1a6sy0ysqknsjssjh7qg1dqn21xmj9a36c57nrk7srfmab4ffmk1"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/julienschmidt/httprouter"))
+ (home-page "https://github.com/julienschmidt/httprouter")
+ (synopsis "High performance HTTP request router")
+ (description
+ "Package httprouter is a trie based high performance HTTP request router.")
+ (license license:bsd-3)))
+
(define-public go-github-com-kevinburke-ssh-config
(package
(name "go-github-com-kevinburke-ssh-config")
--
2.40.1
S
S
Sharlatan Hellseher wrote on 6 Aug 2023 21:55
[PATCH 2/9] gnu: Add go-github-com-bitly-timer-metrics.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
1128f68bf020ede3f1b960d25d80e0ac0bb5fd8c.1691350701.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-bitly-timer-metrics): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 0a747f2eee..4721519a9b 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2137,6 +2137,29 @@ (define-public go-github-com-bitly-go-hostpool
robin or epsilon greedy mode, and unresponsive hosts are avoided.")
(license license:expat)))
+(define-public go-github-com-bitly-timer-metrics
+ (package
+ (name "go-github-com-bitly-timer-metrics")
+ (version "1.0.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bitly/timer_metrics")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "02fhx8hx8126m2cgxw9fm8q2401r7zfann8b5zy5yyark1sgkrb4"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/bitly/timer_metrics"))
+ (home-page "https://github.com/bitly/timer_metrics")
+ (synopsis "Capture timings and enables periodic metrics every n events")
+ (description
+ "This package provides an efficient way to capture timing information and
+periodically output metrics")
+ (license license:expat)))
+
(define-public go-github-com-blanu-dust
(package
(name "go-github-com-blanu-dust")
--
2.40.1
S
S
Sharlatan Hellseher wrote on 6 Aug 2023 21:55
[PATCH 6/9] gnu: Add go-github-com-mreiferson-go-options.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
8e3228708dc30a784f2c217144ed01208b9d9cf3.1691350701.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-mreiferson-go-options): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index cdfad943c7..fd3807bb7e 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -6256,6 +6256,29 @@ (define-public go-github-com-mr-tron-base58
encoding and 8 times faster decoding.")
(license license:expat))))
+(define-public go-github-com-mreiferson-go-options
+ (package
+ (name "go-github-com-mreiferson-go-options")
+ (version "1.0.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mreiferson/go-options")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1pxs9ybrh196qy14ijn4zn51h2z28lj31y6vxrz2xxhgvpmfmxyl"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/mreiferson/go-options"))
+ (home-page "https://github.com/mreiferson/go-options")
+ (synopsis "Go package to structure and resolve options")
+ (description
+ "OPTIONS resolves configuration values set via command line flags, config
+files, and default struct values")
+ (license license:expat)))
+
(define-public go-github-com-mreiferson-go-svc
;; NSQ specific fork of github.com/judwhite/go-svc, as Guix go build system
;; does not support go.mod with `replace' statement.
--
2.40.1
S
S
Sharlatan Hellseher wrote on 6 Aug 2023 21:55
[PATCH 8/9] gnu: Add go-github-com-nsqio-go-nsq.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
f588b20e9989ec063eea5a81f31c6ad5f82580ae.1691350701.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-nsqio-go-nsq): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 637e6ebe73..91b1880476 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3205,6 +3205,30 @@ (define-public go-github-com-nsqio-go-diskqueue
"This package provides a Go package providing a filesystem-backed FIFO queue")
(license license:expat)))
+(define-public go-github-com-nsqio-go-nsq
+ (package
+ (name "go-github-com-nsqio-go-nsq")
+ (version "1.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nsqio/go-nsq")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1h9z3z225sdgg7fl3l7x11xn5ch6lm5flgmcj046cdp453qj2qhf"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:tests? #f ;It requires local network setup.
+ #:import-path "github.com/nsqio/go-nsq"))
+ (propagated-inputs (list go-github-com-golang-snappy))
+ (home-page "https://github.com/nsqio/go-nsq")
+ (synopsis "Golang package of high-level Consumer and Produce for NSQ")
+ (description "Package nsq is the official Go package for NSQ
+(@url{http://nsq.io/,http://nsq.io/}).")
+ (license license:expat)))
+
(define-public go-github-com-hebcal-gematriya
(let ((commit "fe3043f73e415eb82727701d10f2fb40f87675e9")
(revision "0"))
--
2.40.1
S
S
Sharlatan Hellseher wrote on 6 Aug 2023 21:55
[PATCH 7/9] gnu: Add go-github-com-nsqio-go-diskqueue.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
e724e1d8a4998b64a99a288f9cbfba368eeea38e.1691350701.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-nsqio-go-diskqueue): New variable.
---
gnu/packages/golang.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index fd3807bb7e..637e6ebe73 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3183,6 +3183,28 @@ (define-public go-github-com-nathan-osman-go-sunrise
sunset times from geographical coordinates and a date.")
(license license:expat))))
+(define-public go-github-com-nsqio-go-diskqueue
+ (package
+ (name "go-github-com-nsqio-go-diskqueue")
+ (version "1.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nsqio/go-diskqueue")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hp66hkmfn0nyf3c53a40f94ah11a9rj01r5zp3jph9p54j8rany"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/nsqio/go-diskqueue"))
+ (home-page "https://github.com/nsqio/go-diskqueue")
+ (synopsis "Go package providing a filesystem-backed FIFO queue")
+ (description
+ "This package provides a Go package providing a filesystem-backed FIFO queue")
+ (license license:expat)))
+
(define-public go-github-com-hebcal-gematriya
(let ((commit "fe3043f73e415eb82727701d10f2fb40f87675e9")
(revision "0"))
--
2.40.1
S
S
Sharlatan Hellseher wrote on 6 Aug 2023 21:55
[PATCH 9/9] gnu: Add nsq.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
8520b8137aea74779901aa314e26e2b635eeadb9.1691350701.git.sharlatanus@gmail.com
* gnu/packages/high-availability.scm (nsq): New variable.
---
gnu/packages/high-availability.scm | 87 ++++++++++++++++++++++++++++++
1 file changed, 87 insertions(+)

Toggle diff (120 lines)
diff --git a/gnu/packages/high-availability.scm b/gnu/packages/high-availability.scm
index 11ff8014cf..9763a04b21 100644
--- a/gnu/packages/high-availability.scm
+++ b/gnu/packages/high-availability.scm
@@ -34,6 +34,7 @@ (define-module (gnu packages high-availability)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
+ #:use-module (gnu packages golang)
#:use-module (gnu packages hardware)
#:use-module (gnu packages linux)
#:use-module (gnu packages lua)
@@ -43,12 +44,14 @@ (define-module (gnu packages high-availability)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages rsync)
+ #:use-module (gnu packages syncthing)
#:use-module (gnu packages tls)
#:use-module (gnu packages valgrind)
#:use-module (gnu packages version-control)
#:use-module (gnu packages xml)
#:use-module (gnu packages)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system go)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download)
@@ -190,6 +193,90 @@ (define-public kronosnet
in general better performances compared to the old network protocol.")
(license (list license:gpl2+ license:lgpl2.1+))))
+(define-public nsq
+ (package
+ (name "nsq")
+ (version "1.2.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nsqio/nsq")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0ajqjwfn06zsmz21z9mkl4cblarypaf20228pqcd1293zl6y3ry8"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/nsqio/nsq"
+ #:install-source? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda* (#:key import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (invoke "make"))))
+ (replace 'check
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (when tests?
+ (setenv "HOME" "/tmp")
+ (with-directory-excursion (string-append "src/" import-path)
+ (invoke #$@(if (string-prefix? "x86_64-linux"
+ (or (%current-system)
+ (%current-target-system)))
+ (list "go" "test" "-v" "-race" "./...")
+ (list "go" "test" "-v" "./...")))))))
+ (replace 'install
+ (lambda* (#:key import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (invoke "make" (string-append "PREFIX=" #$output)
+ "install")))))))
+ (native-inputs
+ (list go-github-com-bitly-go-hostpool
+ go-github-com-bitly-timer-metrics
+ go-github-com-blang-semver
+ go-github-com-bmizerany-perks-quantile
+ go-github-com-burntsushi-toml
+ go-github-com-davecgh-go-spew
+ go-github-com-golang-snappy ; Move to (gnu packages golang)
+ go-github-com-mreiferson-go-svc
+ go-github-com-julienschmidt-httprouter
+ go-github-com-mreiferson-go-options
+ go-github-com-mreiferson-go-svc
+ go-github-com-nsqio-go-diskqueue
+ go-github-com-nsqio-go-nsq
+ python-wrapper))
+ (home-page "https://nsq.io")
+ (synopsis "Realtime distributed messaging platform")
+ (description
+ "NSQ is a realtime distributed messaging platform designed to operate at
+scale, handling billions of messages per day.
+
+Key features:
+@itemize
+@item support distributed topologies with no SPOF
+@item horizontally scalable (no brokers, seamlessly add more nodes to the
+cluster)
+@item low-latency push based message delivery (performance)
+@item combination load-balanced and multicast style message routing
+@item excel at both streaming (high-throughput) and job oriented
+(low-throughput) workloads
+@item primarily in-memory (beyond a high-water mark messages are transparently
+kept on disk)
+@item runtime discovery service for consumers to find producers (nsqlookupd)
+@item transport layer security (TLS)
+@item data format agnostic
+@item few dependencies (easy to deploy) and a sane, bounded, default
+configuration
+@item simple TCP protocol supporting client libraries in any language
+@item HTTP interface for stats, admin actions, and producers (no client
+library needed to publish)
+@item integrates with statsd for realtime instrumentation
+@item robust cluster administration interface (nsqadmin)
+@end itemize")
+ (license license:expat)))
+
(define-public corosync
(package
(name "corosync")
--
2.40.1
S
S
Sharlatan Hellseher wrote on 26 Aug 2023 18:17
(address . 65118@debbugs.gnu.org)
CAO+9K5pSzMFdZqQ6jTXBysEh6JY0H+5c8PTHB+YW9bW2V46h8Q@mail.gmail.com
Hi Guix,
A gentle ping on the status of this issue, please let me know if the
patch service needs to be updated somehow.
Thanks,
Oleg
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
M
M
Maxim Cournoyer wrote on 27 Aug 2023 04:02
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 65118@debbugs.gnu.org)
87sf85kzt6.fsf_-_@gmail.com
Hello!

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (69 lines)
> * gnu/packages/high-availability.scm (nsq): New variable.
> ---
> gnu/packages/high-availability.scm | 87 ++++++++++++++++++++++++++++++
> 1 file changed, 87 insertions(+)
>
> diff --git a/gnu/packages/high-availability.scm b/gnu/packages/high-availability.scm
> index 11ff8014cf..9763a04b21 100644
> --- a/gnu/packages/high-availability.scm
> +++ b/gnu/packages/high-availability.scm
> @@ -34,6 +34,7 @@ (define-module (gnu packages high-availability)
> #:use-module (gnu packages gcc)
> #:use-module (gnu packages gettext)
> #:use-module (gnu packages glib)
> + #:use-module (gnu packages golang)
> #:use-module (gnu packages hardware)
> #:use-module (gnu packages linux)
> #:use-module (gnu packages lua)
> @@ -43,12 +44,14 @@ (define-module (gnu packages high-availability)
> #:use-module (gnu packages pkg-config)
> #:use-module (gnu packages python)
> #:use-module (gnu packages rsync)
> + #:use-module (gnu packages syncthing)
> #:use-module (gnu packages tls)
> #:use-module (gnu packages valgrind)
> #:use-module (gnu packages version-control)
> #:use-module (gnu packages xml)
> #:use-module (gnu packages)
> #:use-module (guix build-system gnu)
> + #:use-module (guix build-system go)
> #:use-module (guix download)
> #:use-module (guix gexp)
> #:use-module (guix git-download)
> @@ -190,6 +193,90 @@ (define-public kronosnet
> in general better performances compared to the old network protocol.")
> (license (list license:gpl2+ license:lgpl2.1+))))
>
> +(define-public nsq
> + (package
> + (name "nsq")
> + (version "1.2.1")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/nsqio/nsq")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "0ajqjwfn06zsmz21z9mkl4cblarypaf20228pqcd1293zl6y3ry8"))))
> + (build-system go-build-system)
> + (arguments
> + (list
> + #:import-path "github.com/nsqio/nsq"
> + #:install-source? #f
> + #:phases
> + #~(modify-phases %standard-phases
> + (replace 'build
> + (lambda* (#:key import-path #:allow-other-keys)
> + (with-directory-excursion (string-append "src/" import-path)
> + (invoke "make"))))
> + (replace 'check
> + (lambda* (#:key tests? import-path #:allow-other-keys)
> + (when tests?
> + (setenv "HOME" "/tmp")
> + (with-directory-excursion (string-append "src/" import-path)
> + (invoke #$@(if (string-prefix? "x86_64-linux"
> + (or (%current-system)
> + (%current-target-system)))

The target should be checked before the system, as current-system is
always defined, and would shortcut the or. But you can now safely
forget about this detail and use the 'target-x86?' procedure instead,
which comes from (guix tilers).

Toggle quote (32 lines)
> + (list "go" "test" "-v" "-race" "./...")
> + (list "go" "test" "-v" "./...")))))))
> + (replace 'install
> + (lambda* (#:key import-path #:allow-other-keys)
> + (with-directory-excursion (string-append "src/" import-path)
> + (invoke "make" (string-append "PREFIX=" #$output)
> + "install")))))))
> + (native-inputs
> + (list go-github-com-bitly-go-hostpool
> + go-github-com-bitly-timer-metrics
> + go-github-com-blang-semver
> + go-github-com-bmizerany-perks-quantile
> + go-github-com-burntsushi-toml
> + go-github-com-davecgh-go-spew
> + go-github-com-golang-snappy ; Move to (gnu packages golang)
> + go-github-com-mreiferson-go-svc
> + go-github-com-julienschmidt-httprouter
> + go-github-com-mreiferson-go-options
> + go-github-com-mreiferson-go-svc
> + go-github-com-nsqio-go-diskqueue
> + go-github-com-nsqio-go-nsq
> + python-wrapper))
> + (home-page "https://nsq.io")
> + (synopsis "Realtime distributed messaging platform")
> + (description
> + "NSQ is a realtime distributed messaging platform designed to operate at
> +scale, handling billions of messages per day.
> +
> +Key features:
> +@itemize
> +@item support distributed topologies with no SPOF

What is SPOF?

Toggle quote (5 lines)
> +@item horizontally scalable (no brokers, seamlessly add more nodes to the
> +cluster)
> +@item low-latency push based message delivery (performance)
> +@item combination load-balanced and multicast style message routing

I'd replace 'combination' here with the 'combine' verb.

Toggle quote (14 lines)
> +@item excel at both streaming (high-throughput) and job oriented
> +(low-throughput) workloads
> +@item primarily in-memory (beyond a high-water mark messages are transparently
> +kept on disk)
> +@item runtime discovery service for consumers to find producers (nsqlookupd)
> +@item transport layer security (TLS)
> +@item data format agnostic
> +@item few dependencies (easy to deploy) and a sane, bounded, default
> +configuration
> +@item simple TCP protocol supporting client libraries in any language
> +@item HTTP interface for stats, admin actions, and producers (no client
> +library needed to publish)
> +@item integrates with statsd for realtime instrumentation

The imperative rather than descriptive verb tense is used elsewhere
here, I'd stick with it (integrate with ...).

Could you send a v2 addressing the above?

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 27 Aug 2023 04:08
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 65118@debbugs.gnu.org)
87ledxkzif.fsf_-_@gmail.com
Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (33 lines)
> * gnu/packages/golang.scm (go-github-com-bitly-timer-metrics): New variable.
> ---
> gnu/packages/golang.scm | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
> index 0a747f2eee..4721519a9b 100644
> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm
> @@ -2137,6 +2137,29 @@ (define-public go-github-com-bitly-go-hostpool
> robin or epsilon greedy mode, and unresponsive hosts are avoided.")
> (license license:expat)))
>
> +(define-public go-github-com-bitly-timer-metrics
> + (package
> + (name "go-github-com-bitly-timer-metrics")
> + (version "1.0.0")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/bitly/timer_metrics")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "02fhx8hx8126m2cgxw9fm8q2401r7zfann8b5zy5yyark1sgkrb4"))))
> + (build-system go-build-system)
> + (arguments
> + '(#:import-path "github.com/bitly/timer_metrics"))
> + (home-page "https://github.com/bitly/timer_metrics")
> + (synopsis "Capture timings and enables periodic metrics every n
> events")

s/enables/enable/

Maybe use @var{n} if that's supported.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 27 Aug 2023 04:10
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 65118@debbugs.gnu.org)
87h6olkzfq.fsf_-_@gmail.com
Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (33 lines)
> * gnu/packages/golang.scm (go-github-com-bmizerany-perks-quantile): New variable.
> ---
> gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
> index 4721519a9b..ce46e02158 100644
> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm
> @@ -9033,6 +9033,30 @@ (define-public go-github-com-bmatcuk-doublestar
> matching and globbing with support for \"doublestar\" patterns.")
> (license license:expat)))
>
> +(define-public go-github-com-bmizerany-perks-quantile
> + (package
> + (name "go-github-com-bmizerany-perks-quantile")
> + (version "0.0.0-20230307044200-03f9df79da1e")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/bmizerany/perks")
> + (commit (go-version->git-ref version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1f2a99v3618bz2mf61iwhdjm3xi1gam6v4apqgcrz71gj7ba9943"))))
> + (build-system go-build-system)
> + (arguments
> + (list #:unpack-path "github.com/bmizerany/perks"
> + #:import-path "github.com/bmizerany/perks/quantile"))
> + (home-page "https://github.com/bmizerany/perks")
> + (synopsis "Perks for Golang")

I'd use "Library for computing quantiles"

Toggle quote (3 lines)
> + (description
> + "Perks contains the Go package quantile that computes approximate quantiles

the Go package @code{quantile} [...]

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 27 Aug 2023 04:13
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 65118@debbugs.gnu.org)
87cyz9kzag.fsf_-_@gmail.com
Hi,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (41 lines)
> * gnu/packages/golang.scm (go-github-com-mreiferson-go-svc): New variable.
> ---
> gnu/packages/golang.scm | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
> index ce46e02158..7890e4d583 100644
> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm
> @@ -6256,6 +6256,34 @@ (define-public go-github-com-mr-tron-base58
> encoding and 8 times faster decoding.")
> (license license:expat))))
>
> +(define-public go-github-com-mreiferson-go-svc
> + ;; NSQ specific fork of github.com/judwhite/go-svc, as Guix go build system
> + ;; does not support go.mod with `replace' statement.
> + (let ((commit "7a96e00010f68d9436e3de53a70c53f209a0c244")
> + (revision "0"))
> + (package
> + (name "go-github-com-mreiferson-go-svc")
> + (version (git-version "1.2.1" revision commit))
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/mreiferson/go-svc")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1acgb0n3svhnraqj1fz5qc5n3b4vc5ffwyk9vfi6gcfkibm0hgmd"))))
> + (build-system go-build-system)
> + (arguments
> + '(#:import-path "github.com/judwhite/go-svc"))
> + (propagated-inputs (list go-golang-org-x-sys))
> + (home-page "https://github.com/mreiferson/go-svc")
> + (synopsis "Go Windows Service wrapper that plays nice with Linux")
> + (description
> + "Go Windows Service wrapper that plays nice with Linux. Windows tests
> +@@url{https://github.com/judwhite/go-svc/raw/master/svc/svc_windows_test.go,here}.")
> + (license license:expat))))

Reading this makes me wonder when the code path would ever be used on
GNU/Linux. Probably never. Perhaps an alternative would eb to edit it
out of the go.mod, if it still builds without too many problems.

Otherwise, LGTM.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 27 Aug 2023 04:14
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 65118@debbugs.gnu.org)
878r9xkz9q.fsf_-_@gmail.com
Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (35 lines)
> * gnu/packages/golang.scm (go-github-com-julienschmidt-httprouter): New variable.
> ---
> gnu/packages/golang.scm | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
> index 7890e4d583..cdfad943c7 100644
> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm
> @@ -9922,6 +9922,28 @@ (define-public go-github-com-juju-ansiterm
> for color and styles.")
> (license license:lgpl3)))
>
> +(define-public go-github-com-julienschmidt-httprouter
> + (package
> + (name "go-github-com-julienschmidt-httprouter")
> + (version "1.3.0")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/julienschmidt/httprouter")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1a6sy0ysqknsjssjh7qg1dqn21xmj9a36c57nrk7srfmab4ffmk1"))))
> + (build-system go-build-system)
> + (arguments
> + '(#:import-path "github.com/julienschmidt/httprouter"))
> + (home-page "https://github.com/julienschmidt/httprouter")
> + (synopsis "High performance HTTP request router")
> + (description
> + "Package httprouter is a trie based high performance HTTP
> request router.")

Nitpick: @code{httprouter}

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 27 Aug 2023 04:15
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 65118@debbugs.gnu.org)
874jklkz89.fsf_-_@gmail.com
Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (35 lines)
> * gnu/packages/golang.scm (go-github-com-mreiferson-go-options): New variable.
> ---
> gnu/packages/golang.scm | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
> index cdfad943c7..fd3807bb7e 100644
> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm
> @@ -6256,6 +6256,29 @@ (define-public go-github-com-mr-tron-base58
> encoding and 8 times faster decoding.")
> (license license:expat))))
>
> +(define-public go-github-com-mreiferson-go-options
> + (package
> + (name "go-github-com-mreiferson-go-options")
> + (version "1.0.0")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/mreiferson/go-options")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1pxs9ybrh196qy14ijn4zn51h2z28lj31y6vxrz2xxhgvpmfmxyl"))))
> + (build-system go-build-system)
> + (arguments
> + '(#:import-path "github.com/mreiferson/go-options"))
> + (home-page "https://github.com/mreiferson/go-options")
> + (synopsis "Go package to structure and resolve options")
> + (description
> + "OPTIONS resolves configuration values set via command line
> flags, config

Maybe, "The @code{options} Go package resolves [...]"

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 27 Aug 2023 04:18
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 65118@debbugs.gnu.org)
87v8d1jkiq.fsf_-_@gmail.com
Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (34 lines)
> * gnu/packages/golang.scm (go-github-com-nsqio-go-diskqueue): New variable.
> ---
> gnu/packages/golang.scm | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
> index fd3807bb7e..637e6ebe73 100644
> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm
> @@ -3183,6 +3183,28 @@ (define-public go-github-com-nathan-osman-go-sunrise
> sunset times from geographical coordinates and a date.")
> (license license:expat))))
>
> +(define-public go-github-com-nsqio-go-diskqueue
> + (package
> + (name "go-github-com-nsqio-go-diskqueue")
> + (version "1.1.0")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/nsqio/go-diskqueue")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1hp66hkmfn0nyf3c53a40f94ah11a9rj01r5zp3jph9p54j8rany"))))
> + (build-system go-build-system)
> + (arguments
> + '(#:import-path "github.com/nsqio/go-diskqueue"))
> + (home-page "https://github.com/nsqio/go-diskqueue")
> + (synopsis "Go package providing a filesystem-backed FIFO queue")
> + (description
> + "This package provides a Go package providing a filesystem-backed FIFO queue")

I'd use something like "The @code{diskqueue} Go package provides a
filesystem-backed FIFO queue." to avoid the using "provides" twice in
the same sentence.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 27 Aug 2023 04:23
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 65118@debbugs.gnu.org)
87pm39jkaj.fsf_-_@gmail.com
Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (36 lines)
> * gnu/packages/golang.scm (go-github-com-nsqio-go-nsq): New variable.
> ---
> gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
> index 637e6ebe73..91b1880476 100644
> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm
> @@ -3205,6 +3205,30 @@ (define-public go-github-com-nsqio-go-diskqueue
> "This package provides a Go package providing a filesystem-backed FIFO queue")
> (license license:expat)))
>
> +(define-public go-github-com-nsqio-go-nsq
> + (package
> + (name "go-github-com-nsqio-go-nsq")
> + (version "1.1.0")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/nsqio/go-nsq")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1h9z3z225sdgg7fl3l7x11xn5ch6lm5flgmcj046cdp453qj2qhf"))))
> + (build-system go-build-system)
> + (arguments
> + (list #:tests? #f ;It requires local network setup.
> + #:import-path "github.com/nsqio/go-nsq"))
> + (propagated-inputs (list go-github-com-golang-snappy))
> + (home-page "https://github.com/nsqio/go-nsq")
> + (synopsis "Golang package of high-level Consumer and Produce for NSQ")
> + (description "Package nsq is the official Go package for NSQ
> +(@url{http://nsq.io/,http://nsq.io/}).")

The description should provide more detail than the synopsis, not less
:-). I'd use something like this, inspired by [0].

Toggle snippet (5 lines)
The @code{nsq} Go module provides a high-level consumer and producer
types as well as low-level functions to communicate over the NSQ
protocol.

Another thing; when the URL name is the same as the URL itself, you
don't need to repeat it in the @url command.


--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 27 Aug 2023 04:24
Re: none
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
87ledxjk8k.fsf@gmail.com
Hi Oleg,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (5 lines)
> Hi Guix,
>
> A gentle ping on the status of this issue, please let me know if the
> patch service needs to be updated somehow.

The series looks good! I've commented with minor (mostly cosmetic)
suggestions; I look forward to a v2!

--
Thanks,
Maxim
S
S
Sharlatan Hellseher wrote on 1 Sep 2023 21:57
[PATCH v2 0/9] gnu: Add NSQ.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
cover.1693597912.git.sharlatanus@gmail.com
Hi Guix!

@Maxim thanks for review points I think I've covered all of them in v2, patch
set was rebased from master's the latest pull.

One note on <[PATCH 4/9] gnu: Add go-github-com-mreiferson-go-svc>, without
setting the import path causes build to fail as the code still imports it as
forked name, it does not fail if go.mod is in use which is abandon in Guix
right now.

Thanks,
Oleg

Sharlatan Hellseher (9):
gnu: Add go-github-com-bitly-go-hostpool.
gnu: Add go-github-com-bitly-timer-metrics.
gnu: Add go-github-com-bmizerany-perks-quantile.
gnu: Add go-github-com-mreiferson-go-svc.
gnu: Add go-github-com-julienschmidt-httprouter.
gnu: Add go-github-com-mreiferson-go-options.
gnu: Add go-github-com-nsqio-go-diskqueue.
gnu: Add go-github-com-nsqio-go-nsq.
gnu: Add nsq.

gnu/packages/golang.scm | 197 ++++++++++++++++++++++++++++-
gnu/packages/high-availability.scm | 86 +++++++++++++
2 files changed, 282 insertions(+), 1 deletion(-)


base-commit: 7309da3ba64a191f074807275d8c5661a25c035c
--
2.40.1
S
S
Sharlatan Hellseher wrote on 1 Sep 2023 21:58
[PATCH v2 2/9] gnu: Add go-github-com-bitly-timer-metrics.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
64363d6802851fba783d896300f5d713b8433d58.1693597912.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-bitly-timer-metrics): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 70d5af6107..b569c9edaa 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2137,6 +2137,29 @@ (define-public go-github-com-bitly-go-hostpool
robin or epsilon greedy mode, and unresponsive hosts are avoided.")
(license license:expat)))
+(define-public go-github-com-bitly-timer-metrics
+ (package
+ (name "go-github-com-bitly-timer-metrics")
+ (version "1.0.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bitly/timer_metrics")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "02fhx8hx8126m2cgxw9fm8q2401r7zfann8b5zy5yyark1sgkrb4"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/bitly/timer_metrics"))
+ (home-page "https://github.com/bitly/timer_metrics")
+ (synopsis "Capture timings and enable periodic metrics every @var{n} events")
+ (description
+ "This package provides an efficient way to capture timing information and
+periodically output metrics")
+ (license license:expat)))
+
(define-public go-github-com-blanu-dust
(package
(name "go-github-com-blanu-dust")
--
2.40.1
S
S
Sharlatan Hellseher wrote on 1 Sep 2023 21:58
[PATCH v2 1/9] gnu: Add go-github-com-bitly-go-hostpool.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
662e6c24d3a71db1db52165702acd13128241aaa.1693597912.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-bitly-go-hostpool): New variable.
---
gnu/packages/golang.scm | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)

Toggle diff (47 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 5a53838435..70d5af6107 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -25,7 +25,7 @@
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021, 2022 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
-;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@mgail.com>
+;;; Copyright © 2021, 2023 Sharlatan Hellseher <sharlatanus@mgail.com>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
;;; Copyright © 2021 jgart <jgart@dismail.de>
@@ -2112,6 +2112,31 @@ (define-public go-github-com-dhowett-go-plist
types.")
(license license:giftware))))
+(define-public go-github-com-bitly-go-hostpool
+ (package
+ (name "go-github-com-bitly-go-hostpool")
+ (version "0.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bitly/go-hostpool")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1iibj7dwymczw7cknrh6glc6sdpp4yap2plnyr8qphynwrzlz73w"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/bitly/go-hostpool"))
+ (native-inputs (list go-github-com-stretchr-testify))
+ (home-page "https://github.com/bitly/go-hostpool")
+ (synopsis "Pool among multiple hosts from Golang")
+ (description
+ "This package provides a Go package to intelligently and flexibly pool among
+multiple hosts from your Go application. Host selection can operate in round
+robin or epsilon greedy mode, and unresponsive hosts are avoided.")
+ (license license:expat)))
+
(define-public go-github-com-blanu-dust
(package
(name "go-github-com-blanu-dust")
--
2.40.1
S
S
Sharlatan Hellseher wrote on 1 Sep 2023 21:58
[PATCH v2 3/9] gnu: Add go-github-com-bmizerany-perks-quantile.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
adf3c9ec039dcc45913c2e0272651ac796bf4884.1693597912.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-bmizerany-perks-quantile): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index b569c9edaa..ab5ed46b9f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9050,6 +9050,30 @@ (define-public go-github-com-bmatcuk-doublestar
matching and globbing with support for \"doublestar\" patterns.")
(license license:expat)))
+(define-public go-github-com-bmizerany-perks-quantile
+ (package
+ (name "go-github-com-bmizerany-perks-quantile")
+ (version "0.0.0-20230307044200-03f9df79da1e")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bmizerany/perks")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1f2a99v3618bz2mf61iwhdjm3xi1gam6v4apqgcrz71gj7ba9943"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:unpack-path "github.com/bmizerany/perks"
+ #:import-path "github.com/bmizerany/perks/quantile"))
+ (home-page "https://github.com/bmizerany/perks")
+ (synopsis "Library for computing quantiles")
+ (description
+ "Perks contains the Go package @code{quantile} that computes approximate
+quantiles over an unbounded data stream within low memory and CPU bounds.")
+ (license license:bsd-2)))
+
(define-public go-github-com-dlclark-regexp2
(package
(name "go-github-com-dlclark-regexp2")
--
2.40.1
S
S
Sharlatan Hellseher wrote on 1 Sep 2023 21:58
[PATCH v2 4/9] gnu: Add go-github-com-mreiferson-go-svc.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
295fd3aeea88e95d5342a371c486ac8d06b9d022.1693597912.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-mreiferson-go-svc): New variable.
---
gnu/packages/golang.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ab5ed46b9f..897d84f444 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -6273,6 +6273,34 @@ (define-public go-github-com-mr-tron-base58
encoding and 8 times faster decoding.")
(license license:expat))))
+(define-public go-github-com-mreiferson-go-svc
+ ;; NSQ specific fork of github.com/judwhite/go-svc, as Guix go build system
+ ;; does not support go.mod with `replace' statement.
+ (let ((commit "7a96e00010f68d9436e3de53a70c53f209a0c244")
+ (revision "0"))
+ (package
+ (name "go-github-com-mreiferson-go-svc")
+ (version (git-version "1.2.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mreiferson/go-svc")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1acgb0n3svhnraqj1fz5qc5n3b4vc5ffwyk9vfi6gcfkibm0hgmd"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/judwhite/go-svc"))
+ (propagated-inputs (list go-golang-org-x-sys))
+ (home-page "https://github.com/mreiferson/go-svc")
+ (synopsis "Go Windows Service wrapper that plays nice with Linux")
+ (description
+ "Go Windows Service wrapper that plays nice with Linux. Windows tests
+@@url{https://github.com/judwhite/go-svc/raw/master/svc/svc_windows_test.go,here}.")
+ (license license:expat))))
+
(define-public go-github-com-gxed-hashland-keccakpg
(let ((commit "d9f6b97f8db22dd1e090fd0bbbe98f09cc7dd0a8")
(revision "0"))
--
2.40.1
S
S
Sharlatan Hellseher wrote on 1 Sep 2023 21:58
[PATCH v2 5/9] gnu: Add go-github-com-julienschmidt-httprouter.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
595ebd3237886cf7ef1ad842e2d56389fd203f0f.1693597912.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-julienschmidt-httprouter): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 897d84f444..a7c005d43e 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9961,6 +9961,29 @@ (define-public go-github-com-juju-ansiterm
for color and styles.")
(license license:lgpl3)))
+(define-public go-github-com-julienschmidt-httprouter
+ (package
+ (name "go-github-com-julienschmidt-httprouter")
+ (version "1.3.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/julienschmidt/httprouter")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1a6sy0ysqknsjssjh7qg1dqn21xmj9a36c57nrk7srfmab4ffmk1"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/julienschmidt/httprouter"))
+ (home-page "https://github.com/julienschmidt/httprouter")
+ (synopsis "High performance HTTP request router")
+ (description
+ "Package @code{httprouter} is a trie based high performance HTTP request
+router.")
+ (license license:bsd-3)))
+
(define-public go-github-com-kevinburke-ssh-config
(package
(name "go-github-com-kevinburke-ssh-config")
--
2.40.1
S
S
Sharlatan Hellseher wrote on 1 Sep 2023 21:58
[PATCH v2 6/9] gnu: Add go-github-com-mreiferson-go-options.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
af0ab8ca6553f80a0dcf0a3cca1086d80b0be0c8.1693597912.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-mreiferson-go-options): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index a7c005d43e..62505ff732 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -6273,6 +6273,29 @@ (define-public go-github-com-mr-tron-base58
encoding and 8 times faster decoding.")
(license license:expat))))
+(define-public go-github-com-mreiferson-go-options
+ (package
+ (name "go-github-com-mreiferson-go-options")
+ (version "1.0.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mreiferson/go-options")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1pxs9ybrh196qy14ijn4zn51h2z28lj31y6vxrz2xxhgvpmfmxyl"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/mreiferson/go-options"))
+ (home-page "https://github.com/mreiferson/go-options")
+ (synopsis "Go package to structure and resolve options")
+ (description
+ "The @code{options} Go package resolves configuration values set via
+command line flags, config files, and default struct values")
+ (license license:expat)))
+
(define-public go-github-com-mreiferson-go-svc
;; NSQ specific fork of github.com/judwhite/go-svc, as Guix go build system
;; does not support go.mod with `replace' statement.
--
2.40.1
S
S
Sharlatan Hellseher wrote on 1 Sep 2023 21:58
[PATCH v2 7/9] gnu: Add go-github-com-nsqio-go-diskqueue.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
7b27ab3342013b58de3dcc9e77959b397078d04d.1693597912.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-nsqio-go-diskqueue): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 62505ff732..756700ef97 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3183,6 +3183,29 @@ (define-public go-github-com-nathan-osman-go-sunrise
sunset times from geographical coordinates and a date.")
(license license:expat))))
+(define-public go-github-com-nsqio-go-diskqueue
+ (package
+ (name "go-github-com-nsqio-go-diskqueue")
+ (version "1.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nsqio/go-diskqueue")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hp66hkmfn0nyf3c53a40f94ah11a9rj01r5zp3jph9p54j8rany"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/nsqio/go-diskqueue"))
+ (home-page "https://github.com/nsqio/go-diskqueue")
+ (synopsis "Go package providing a filesystem-backed FIFO queue")
+ (description
+ "The @code{diskqueue} Go package provides a filesystem-backed FIFO
+queue.")
+ (license license:expat)))
+
(define-public go-github-com-hebcal-gematriya
(let ((commit "fe3043f73e415eb82727701d10f2fb40f87675e9")
(revision "0"))
--
2.40.1
S
S
Sharlatan Hellseher wrote on 1 Sep 2023 21:58
[PATCH v2 8/9] gnu: Add go-github-com-nsqio-go-nsq.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
5ff30e3de2f45e1678d6283a3712193a975e5f4b.1693597912.git.sharlatanus@gmail.com
* gnu/packages/golang.scm (go-github-com-nsqio-go-nsq): New variable.
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 756700ef97..1f70741f5b 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3206,6 +3206,32 @@ (define-public go-github-com-nsqio-go-diskqueue
queue.")
(license license:expat)))
+(define-public go-github-com-nsqio-go-nsq
+ (package
+ (name "go-github-com-nsqio-go-nsq")
+ (version "1.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nsqio/go-nsq")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1h9z3z225sdgg7fl3l7x11xn5ch6lm5flgmcj046cdp453qj2qhf"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:tests? #f ;It requires local network setup.
+ #:import-path "github.com/nsqio/go-nsq"))
+ (propagated-inputs (list go-github-com-golang-snappy))
+ (home-page "https://github.com/nsqio/go-nsq")
+ (synopsis "Golang package of high-level Consumer and Produce for NSQ")
+ (description
+ "The @code{nsq} Go module provides a high-level consumer and producer
+types as well as low-level functions to communicate over the NSQ protocol
+@url{https://nsq.io/}.")
+ (license license:expat)))
+
(define-public go-github-com-hebcal-gematriya
(let ((commit "fe3043f73e415eb82727701d10f2fb40f87675e9")
(revision "0"))
--
2.40.1
S
S
Sharlatan Hellseher wrote on 1 Sep 2023 21:58
[PATCH v2 9/9] gnu: Add nsq.
(address . 65118@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
d373ef4a7c32e9d33be00d7a0ff57f6f87baba4d.1693597912.git.sharlatanus@gmail.com
* gnu/packages/high-availability.scm (nsq): New variable.
---
gnu/packages/high-availability.scm | 86 ++++++++++++++++++++++++++++++
1 file changed, 86 insertions(+)

Toggle diff (119 lines)
diff --git a/gnu/packages/high-availability.scm b/gnu/packages/high-availability.scm
index 11ff8014cf..553095cb75 100644
--- a/gnu/packages/high-availability.scm
+++ b/gnu/packages/high-availability.scm
@@ -34,6 +34,7 @@ (define-module (gnu packages high-availability)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
+ #:use-module (gnu packages golang)
#:use-module (gnu packages hardware)
#:use-module (gnu packages linux)
#:use-module (gnu packages lua)
@@ -43,12 +44,14 @@ (define-module (gnu packages high-availability)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages rsync)
+ #:use-module (gnu packages syncthing)
#:use-module (gnu packages tls)
#:use-module (gnu packages valgrind)
#:use-module (gnu packages version-control)
#:use-module (gnu packages xml)
#:use-module (gnu packages)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system go)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download)
@@ -190,6 +193,89 @@ (define-public kronosnet
in general better performances compared to the old network protocol.")
(license (list license:gpl2+ license:lgpl2.1+))))
+(define-public nsq
+ (package
+ (name "nsq")
+ (version "1.2.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nsqio/nsq")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0ajqjwfn06zsmz21z9mkl4cblarypaf20228pqcd1293zl6y3ry8"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/nsqio/nsq"
+ #:install-source? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda* (#:key import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (invoke "make"))))
+ (replace 'check
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (when tests?
+ (setenv "HOME" "/tmp")
+ (with-directory-excursion (string-append "src/" import-path)
+ (invoke #$@(if (target-x86?)
+ (list "go" "test" "-v" "-race" "./...")
+ (list "go" "test" "-v" "./...")))))))
+ (replace 'install
+ (lambda* (#:key import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (invoke "make" (string-append "PREFIX=" #$output)
+ "install")))))))
+ (native-inputs
+ (list go-github-com-bitly-go-hostpool
+ go-github-com-bitly-timer-metrics
+ go-github-com-blang-semver
+ go-github-com-bmizerany-perks-quantile
+ go-github-com-burntsushi-toml
+ go-github-com-davecgh-go-spew
+ go-github-com-golang-snappy ; Move to (gnu packages golang)
+ go-github-com-julienschmidt-httprouter
+ go-github-com-mreiferson-go-options
+ go-github-com-mreiferson-go-svc
+ go-github-com-nsqio-go-diskqueue
+ go-github-com-nsqio-go-nsq
+ python-wrapper))
+ (home-page "https://nsq.io")
+ (synopsis "Realtime distributed messaging platform")
+ (description
+ "NSQ is a realtime distributed messaging platform designed to operate at
+scale, handling billions of messages per day.
+
+Key features:
+@itemize
+@item support distributed topologies without @acronym{SPOF, Single Point of
+Failure}
+@item scale horizontally (no brokers, seamlessly add more nodes to the
+cluster)
+@item low-latency push based message delivery (performance)
+@item combine load-balanced and multicast style message routing
+@item excel at both streaming (high-throughput) and job oriented
+(low-throughput) workloads
+@item primarily in-memory (beyond a high-water mark messages are transparently
+kept on disk)
+@item runtime discovery service for consumers to find producers (nsqlookupd)
+@item transport layer security (TLS)
+@item data format agnostic
+@item few dependencies (easy to deploy) and a sane, bounded, default
+configuration
+@item simple TCP protocol supporting client libraries in any language
+@item HTTP interface for stats, admin actions, and producers (no client
+library needed to publish)
+@item integrate with @acronym{StatsD, Stats aggregation Daemon} for realtime
+instrumentation
+@item robust cluster administration interface (nsqadmin)
+@end itemize")
+ (license license:expat)))
+
(define-public corosync
(package
(name "corosync")
--
2.40.1
S
S
Sharlatan Hellseher wrote on 3 Sep 2023 16:07
(address . 65118@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
CAO+9K5r2Z5f=z+4aM6B95D=n-WYkPRaMP7Qy98YVM6ucgdFYrQ@mail.gmail.com
Hi Maxim,
I think I've covered all review points in v2, let me know if you spot
anything else to adjust.
Thanks,
Oleg
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
M
M
Maxim Cournoyer wrote on 5 Sep 2023 05:45
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 65118-done@debbugs.gnu.org)
87v8cpmgeq.fsf@gmail.com
Hi,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (5 lines)
> Hi Maxim,
>
> I think I've covered all review points in v2, let me know if you spot
> anything else to adjust.

I did very small changes to 2 packages, and installed the series!

--
Thanks,
Maxim
Closed
?