Skip to content

Commit 5eabd9e

Browse files
committed
CRAN release 0.6.0
1 parent 99927c8 commit 5eabd9e

File tree

5 files changed

+20
-16
lines changed

5 files changed

+20
-16
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: nanonext
22
Type: Package
33
Title: NNG (Nanomsg Next Gen) Lightweight Messaging Library
4-
Version: 0.5.5.9010
4+
Version: 0.6.0
55
Description: R binding for NNG (Nanomsg Next Gen), a successor to ZeroMQ. NNG is
66
a socket library providing high-performance scalability protocols,
77
implementing a cross-platform standard for messaging and communications.

NEWS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# nanonext 0.5.5.9010 (to be 0.6.0)
1+
# nanonext 0.6.0
22

33
*The nanonext 0.6 series incorporates significant advances in performance and stability over previous releases*
44

README.Rmd

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Using a messaging interface provides a clean and robust approach, light on resou
153153

154154
This approach can also serve as an interface / pipe between different processes written in the same or different languages, running on the same computer or distributed across networks, and is an enabler of modular software design as espoused by the Unix philosophy.
155155

156-
One problem it solves is that of processing real-time data where computation times exceed the data frequency - by dividing the computation into stages, this may be set up as a pipeline or 'cascade' of processes, each connected using NNG sockets.
156+
One solution it provides is that of processing real-time data where computation times exceed the data frequency - by dividing the computation into stages, this may be set up as a pipeline or 'cascade' of processes, each connected using NNG sockets.
157157

158158
Create socket in Python using the NNG binding 'pynng':
159159

@@ -268,7 +268,7 @@ close(s2)
268268

269269
### RPC and Distributed Computing
270270

271-
{nanonext} implements remote procedure calls (RPC) using NNG's req/rep protocol to provide a basis for distributed computing.
271+
{nanonext} implements remote procedure calls (RPC) using NNG's req/rep protocol to provide a basis for distributed computing.
272272

273273
Can be used to perform computationally-expensive calculations or I/O-bound operations such as writing large amounts of data to disk in a separate 'server' process running concurrently.
274274

README.md

+15-11
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,18 @@ between R and Python (NumPy), two of the most commonly-used languages
167167
for data science and machine learning.
168168

169169
Using a messaging interface provides a clean and robust approach, light
170-
on resources with limited and identifiable points of failure. This is
171-
especially relevant when processing real-time data, as an example.
170+
on resources with limited and identifiable points of failure.
172171

173172
This approach can also serve as an interface / pipe between different
174173
processes written in the same or different languages, running on the
175174
same computer or distributed across networks, and is an enabler of
176175
modular software design as espoused by the Unix philosophy.
177176

177+
One solution it provides is that of processing real-time data where
178+
computation times exceed the data frequency - by dividing the
179+
computation into stages, this may be set up as a pipeline or ‘cascade’
180+
of processes, each connected using NNG sockets.
181+
178182
Create socket in Python using the NNG binding ‘pynng’:
179183

180184
``` python
@@ -362,7 +366,7 @@ aio
362366
#> < recvAio >
363367
#> - $data for message data
364368
aio$data |> str()
365-
#> num [1:100000000] -0.9296 -0.5975 0.0695 0.0636 -1.5941 ...
369+
#> num [1:100000000] -0.202 -0.654 -0.632 -0.234 0.25 ...
366370
```
367371

368372
As `call_aio()` is blocking and will wait for completion, an alternative
@@ -482,7 +486,7 @@ aio2$data
482486
# after the survey expires, the second resolves into a timeout error
483487
Sys.sleep(0.5)
484488
aio2$data
485-
#> Warning in (function (aio) : 5 | Timed out
489+
#> Warning in (function (.) : 5 | Timed out
486490
#> 'errorValue' int 5
487491

488492
close(sur)
@@ -518,11 +522,11 @@ ncurl("https://httpbin.org/headers")
518522
#> [1] 7b 0a 20 20 22 68 65 61 64 65 72 73 22 3a 20 7b 0a 20 20 20 20 22 48 6f 73
519523
#> [26] 74 22 3a 20 22 68 74 74 70 62 69 6e 2e 6f 72 67 22 2c 20 0a 20 20 20 20 22
520524
#> [51] 58 2d 41 6d 7a 6e 2d 54 72 61 63 65 2d 49 64 22 3a 20 22 52 6f 6f 74 3d 31
521-
#> [76] 2d 36 33 34 30 37 33 35 32 2d 33 61 38 65 30 32 36 66 31 62 62 34 39 61 35
522-
#> [101] 61 36 30 39 31 35 32 39 32 22 0a 20 20 7d 0a 7d 0a
525+
#> [76] 2d 36 33 34 33 33 61 61 38 2d 31 39 64 63 35 32 36 30 35 31 64 36 66 31 61
526+
#> [101] 62 32 30 38 62 30 32 30 63 22 0a 20 20 7d 0a 7d 0a
523527
#>
524528
#> $data
525-
#> [1] "{\n \"headers\": {\n \"Host\": \"httpbin.org\", \n \"X-Amzn-Trace-Id\": \"Root=1-63407352-3a8e026f1bb49a5a60915292\"\n }\n}\n"
529+
#> [1] "{\n \"headers\": {\n \"Host\": \"httpbin.org\", \n \"X-Amzn-Trace-Id\": \"Root=1-63433aa8-19dc526051d6f1ab208b020c\"\n }\n}\n"
526530
```
527531

528532
For advanced use, supports additional HTTP methods such as POST or PUT.
@@ -543,13 +547,13 @@ res
543547

544548
call_aio(res)$headers
545549
#> $Date
546-
#> [1] "Fri, 07 Oct 2022 18:43:31 GMT"
550+
#> [1] "Sun, 09 Oct 2022 21:18:32 GMT"
547551
#>
548552
#> $Server
549553
#> [1] "gunicorn/19.9.0"
550554

551555
res$data
552-
#> [1] "{\n \"args\": {}, \n \"data\": \"{\\\"key\\\": \\\"value\\\"}\", \n \"files\": {}, \n \"form\": {}, \n \"headers\": {\n \"Authorization\": \"Bearer APIKEY\", \n \"Content-Length\": \"16\", \n \"Content-Type\": \"application/json\", \n \"Host\": \"httpbin.org\", \n \"X-Amzn-Trace-Id\": \"Root=1-63407353-1c60969717fda5ad0aa21373\"\n }, \n \"json\": {\n \"key\": \"value\"\n }, \n \"origin\": \"89.249.189.68\", \n \"url\": \"http://httpbin.org/post\"\n}\n"
556+
#> [1] "{\n \"args\": {}, \n \"data\": \"{\\\"key\\\": \\\"value\\\"}\", \n \"files\": {}, \n \"form\": {}, \n \"headers\": {\n \"Authorization\": \"Bearer APIKEY\", \n \"Content-Length\": \"16\", \n \"Content-Type\": \"application/json\", \n \"Host\": \"httpbin.org\", \n \"X-Amzn-Trace-Id\": \"Root=1-63433aa8-4f3d6da80076713f4a359c49\"\n }, \n \"json\": {\n \"key\": \"value\"\n }, \n \"origin\": \"213.205.242.66\", \n \"url\": \"http://httpbin.org/post\"\n}\n"
553557
```
554558

555559
In this respect, it may be used as a performant and lightweight method
@@ -590,10 +594,10 @@ s |> recv()
590594
s |> send('{"action": "subscribe", "symbols": "EURUSD"}')
591595

592596
s |> recv()
593-
#> [1] "{\"s\":\"EURUSD\",\"a\":0.97461,\"b\":0.97459,\"dc\":\"-0.4402\",\"dd\":\"-0.0043\",\"ppms\":false,\"t\":1665168213000}"
597+
#> [1] "{\"s\":\"EURUSD\",\"a\":0.97372,\"b\":0.9735,\"dc\":\"-0.0698\",\"dd\":\"-0.0007\",\"ppms\":true,\"t\":1665350345000}"
594598

595599
s |> recv()
596-
#> [1] "{\"s\":\"EURUSD\",\"a\":0.97463,\"b\":0.97456,\"dc\":\"-0.4381\",\"dd\":\"-0.0043\",\"ppms\":false,\"t\":1665168213000}"
600+
#> [1] "{\"s\":\"EURUSD\",\"a\":0.97371,\"b\":0.97351,\"dc\":\"-0.0709\",\"dd\":\"-0.0007\",\"ppms\":true,\"t\":1665350349000}"
597601

598602
close(s)
599603
```

src/aio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ SEXP rnng_aio_http(SEXP env, SEXP response, SEXP which) {
877877
SEXP rnng_request(SEXP con, SEXP data, SEXP sendmode, SEXP recvmode, SEXP timeout, SEXP keep, SEXP clo) {
878878

879879
if (R_ExternalPtrTag(con) != nano_ContextSymbol)
880-
Rf_error("'con' is not a valid Context");
880+
Rf_error("'context' is not a valid Context");
881881

882882
SEXP sendaio, aio;
883883
int xc;

0 commit comments

Comments
 (0)