vrpc 2.6.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,89 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.0.0] - Jan 20 2022
9
+
10
+ ### Added
11
+
12
+ - `vrpcOn` / `vrpcOff` feature to client
13
+ - tests exclusively for VrpcAdapter
14
+ - support for `path.join(__dirname, <path>)` expressions when registering class
15
+
16
+ ### Fixed
17
+
18
+ - unhandled promise rejection on initial connect timeout
19
+ - missing documentation for VrpcNative
20
+ - bug on new `vrpcOn` feature
21
+ - bug while unregister event listeners via "off" or "removeAllListeners"
22
+
23
+ ### Changed
24
+
25
+ - error messages as triggered on remote agents (now include context info)
26
+ - removed obsolete public API from VrpcAdapter
27
+ - internal handling of EventEmitter subscriptions
28
+ - now publishing a single message per event to a fixed topic
29
+ - dispatching happens by the broker not by the agent anymore
30
+ - this saves a lot of traffic when many clients subscribe to same events
31
+ - reduced size of response messages by skipping redundant information
32
+ - order of items within RPC message
33
+ - promise rejection message as triggered on remote agents (now include context
34
+ info)
35
+
36
+ ## [3.0.0-alpha.3] - 25 Nov 2021
37
+
38
+ ### Fixed
39
+
40
+ - missing 'create' event in VrpcAdapter
41
+ - respecting isolation state in callAll
42
+
43
+ ### Changed
44
+
45
+ - cleaned API and tests from deprecation supports, those will now result in
46
+ errors
47
+ - intercepting return value of EventEmitter functions and changing it from
48
+ potentially gigantic object (as it returns `this`) to `true`
49
+
50
+ ## [3.0.0-alpha.2] - 19 Nov 2021
51
+
52
+ ### Fixed
53
+
54
+ - leaking event registrations on remote-controlled instance when event consumer
55
+ was not creator of the instance
56
+
57
+ ## Changed
58
+
59
+ - reduced payload of callback message by omitting the original return value
60
+ - changed prefix of mqtt client id to `vc3` and `va3`, respectively
61
+
62
+ ## [3.0.0-alpha.1] - 10 Nov 2021
63
+
64
+ ### Changed
65
+
66
+ - layout and content of this repository, only javascript related code is left
67
+ - naming of public API classes is made consistent
68
+ - VrpcAdapter
69
+ - VrpcAgent
70
+ - VrpcClient (formerly VrpcRemote)
71
+ - VrpcNative (formerly VrpcLocal)
72
+ - RPC wire protocol got changed and simplified, a protocol version is attached
73
+ to every message (`v: 3`)
74
+ - concept of isolated and shared proxy instances
75
+ ([#51](https://github.com/heisenware/vrpc/issues/51)) got implemented
76
+ - all namings including 'binding' got renamed for the more appropriate 'adapter'
77
+ - calling embedded C++ code got a completely new API (VrpcNative)
78
+
79
+ ### Added
80
+
81
+ - injection of proxy-, instance-, and client id into proxy instance [Node.js] (#49)
82
+ - public accessor for client id [Node.js] (#49)
83
+ - signal `clientGone` on agent, indicating that a state-changing client went
84
+ [Node.js]
85
+
86
+ ### Fixed
87
+
88
+ - Bug during clientId extraction for an exited client (causing leaks for
89
+ anonymous instances)
90
+
8
91
  ## [2.6.0] - 12 Jul 2021
9
92
 
10
93
  ### Added
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2018 - 2021 Dr. Burkhard C. Heisen
3
+ Copyright (c) 2018 - 2022 Dr. Burkhard C. Heisen
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,76 +1,50 @@
1
1
  # VRPC - Variadic Remote Procedure Calls
2
2
 
3
- [![Build Status](https://travis-ci.com/heisenware/vrpc.svg?branch=master)](https://travis-ci.com/heisenware/vrpc)
4
- [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/heisenware/vrpc/master/LICENSE)
3
+ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/heisenware/vrpc-js/master/LICENSE)
5
4
  [![Semver](https://img.shields.io/badge/semver-2.0.0-blue)](https://semver.org/spec/v2.0.0.html)
6
- [![GitHub Releases](https://img.shields.io/github/tag/heisenware/vrpc.svg)](https://github.com/heisenware/vrpc/tag)
7
- [![GitHub Issues](https://img.shields.io/github/issues/heisenware/vrpc.svg)](http://github.com/heisenware/vrpc/issues)
5
+ [![GitHub Releases](https://img.shields.io/github/tag/heisenware/vrpc-js.svg)](https://github.com/heisenware/vrpc-js/tag)
6
+ [![GitHub Issues](https://img.shields.io/github/issues/heisenware/vrpc-js.svg)](http://github.com/heisenware/vrpc-js/issues)
7
+ ![ci](https://github.com/heisenware/vrpc-js/actions/workflows/ci.yml/badge.svg)
8
8
 
9
- ---
10
- ## Visit our website: https://vrpc.io
11
- ---
9
+ ## Visit our website: [vrpc.io](https://vrpc.io)
12
10
 
13
11
  ## What is VRPC?
14
12
 
15
- VRPC - Variadic Remote Procedure Calls - is a modern and asynchronous
16
- implementation of the old RPC (remote procedure calls) idea. Basically, it
17
- allows to directly call functions written in any programming language by
18
- functions written in any other (or the same) programming language.
13
+ VRPC - Variadic Remote Procedure Calls - is an enhancement of the old RPC
14
+ (remote procedure calls) idea. Like RPC, it allows to directly call functions
15
+ written in any programming language by functions written in any other (or the
16
+ same) programming language. Unlike RPC, VRPC furthermore supports:
19
17
 
20
- VRPC is modern as existing code can be made remotely callable:
18
+ - non-intrusive adaption of existing code, making it callable remotely
19
+ - remote function calls on many distributed receivers at the same time (one
20
+ client - multiple agents)
21
+ - service discovery
22
+ - outbound-connection-only network architecture (using MQTT technology)
23
+ - isolated (multi-tenant) and shared access modes to remote resources
24
+ - asynchronous language constructs (callbacks, promises, event-loops)
25
+ - OOP (classes, objects, member functions) and functional (lambda) patterns
26
+ - exception forwarding
21
27
 
22
- - without having to change it
23
- - without the need to program any binding code or complex
24
- schemas
25
- - without the need to run a server
28
+ VRPC is available for an entire spectrum of programming technologies including
29
+ embedded, data-science, and web technologies.
26
30
 
27
- VRPC is unique as it supports the full power of the programming language in use,
28
- such as:
31
+ As a robust and highly performing communication system, it can build the
32
+ foundation of complex digitization projects in the area of (I)IoT or
33
+ Cloud-Computing.
29
34
 
30
- - automated memory handling
31
- - language native and custom data type support
32
- - callback mechanisms
33
- - asynchronicity (i.e. event-loop integration)
34
- - exception handling
35
- - object orientation
36
- - lambda and closures support
35
+ ## This is VRPC for Javascript (Node.js and Browser)
37
36
 
38
- Depending on the targeted technologies, VRPC ships as a library (static or
39
- dynamic linkage), executable or source package.
37
+ Understand how to use it by looking at the examples:
40
38
 
41
- ## Examples
39
+ - [Agent Example](examples/01-agent/README.md)
40
+ - [Client Example](examples/02-client/README.md)
41
+ - [Simple C++ Embedding Example](examples/03-native-simple/README.md)
42
+ - [Advanced C++ Embedding Example](examples/04-native-advanced/README.md)
42
43
 
43
- ### Embedding C++ into Node.js
44
+ Get all the details by reading the documentation:
44
45
 
45
- - [Simple C++ to Node.js Binding Example](docs/examples/CppNodeExample1.md)
46
- - [Advanced C++ to Node.js Binding Example](docs/examples/CppNodeExample2.md)
46
+ - [API Reference](docs/api.md)
47
+ - [RPC Protocol Details](docs/protocol.md)
47
48
 
48
- ### Embedding C++ into Python3
49
-
50
- - [Simple C++ to Python Binding Example](docs/examples/CppPythonExample1.md)
51
- - [Advanced C++ to Python Binding Example](docs/examples/CppPythonExample2.md)
52
-
53
- ### Making existing C++ code remotely callable (agent)
54
-
55
- - [Simple C++ Agent Example](docs/examples/CppAgentLinuxExample1.md)
56
- - [Advanced C++ Agent Example](docs/examples/CppAgentLinuxExample2.md)
57
-
58
- ### Making existing Node.js code remotely callable (agent)
59
-
60
- - [Node.js Agent Example](docs/examples/NodeAgentExample.md)
61
-
62
- ### Calling code remotely from Node.js (client)
63
-
64
- - [Node.js Remote Client Example](docs/examples/NodeClientExample.md)
65
-
66
- ### Frontend-Backend communication
67
-
68
- - [Simple React Todos App](https://github.com/heisenware/react-vrpc/tree/master/examples/vrpc-react-todos-1)
69
- - [Advanced React Todos App](https://github.com/heisenware/react-vrpc/tree/master/examples/vrpc-react-todos-2)
70
-
71
- ## Reference Documentation
72
-
73
- - [RPC Protocol Details](docs/reference/remoteProtocol.md)
74
- - [C++ Binding Syntax](docs/reference/cppBinding.md)
75
- - [C++ Agent](docs/reference/cppAgent.md)
76
- - [Node.js API](docs/reference/nodeJs.md)
49
+ > This open-source project is professionally managed and supported by
50
+ > [Heisenware GmbH](https://heisenware.com).
@@ -6,8 +6,6 @@
6
6
  ['"<!(echo $VRPC_DEBUG)"=="1"', {'defines': ['VRPC_DEBUG']}],
7
7
  ],
8
8
  'defines': ['VRPC_WITH_DL'],
9
- 'sources': ['vrpc/addon.cpp'],
10
- 'include_dirs': ['cpp'],
11
9
  'cflags_cc!': ['-std=gnu++0x', '-fno-rtti', '-fno-exceptions'],
12
10
  'cflags_cc': ['-std=c++14', '-fPIC'],
13
11
  'conditions': [
@@ -17,7 +15,9 @@
17
15
  'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
18
16
  }
19
17
  }]
20
- ]
18
+ ],
19
+ 'sources': ['vrpc/addon.cpp'],
20
+ 'include_dirs': ['.']
21
21
  },
22
22
  {
23
23
  'target_name': 'vrpc_test',
@@ -36,29 +36,7 @@
36
36
  }]
37
37
  ],
38
38
  'sources': ['vrpc/addon.cpp'],
39
- 'include_dirs': ['vrpc', 'test/fixtures']
39
+ 'include_dirs': ['.', 'tests/native/fixtures']
40
40
  },
41
- {
42
- 'target_name': 'vrpc-test',
43
- 'target_conditions': [
44
- ['"<!(echo $VRPC_DEBUG)"=="1"', {'defines': ['VRPC_DEBUG']}],
45
- ],
46
- 'type': 'executable',
47
- 'sources': [
48
- 'test/cpp/main.cpp',
49
- 'test/cpp/vrpcTest.cpp'
50
- ],
51
- 'include_dirs': ['third_party/include', 'vrpc'],
52
- 'cflags_cc!': ['-std=gnu++0x', '-fno-rtti', '-fno-exceptions'],
53
- 'cflags_cc': ['-std=c++14'],
54
- 'conditions': [
55
- ['OS=="mac"', {
56
- 'xcode_settings': {
57
- 'GCC_ENABLE_CPP_RTTI': 'YES',
58
- 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
59
- }
60
- }]
61
- ]
62
- }
63
41
  ]
64
42
  }