vrpc 2.6.0 → 3.0.0-alpha.1
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 +29 -0
- package/README.md +33 -56
- package/binding.gyp.no-auto +4 -26
- package/browser/vrpc.js +1 -1
- package/index.js +2 -2
- package/package.json +11 -15
- package/vrpc/VrpcAdapter.js +95 -173
- package/vrpc/VrpcAgent.js +77 -77
- package/vrpc/{VrpcRemote.js → VrpcClient.js} +98 -152
- package/vrpc/VrpcNative.js +307 -0
- package/vrpc/{vrpc.hpp → adapter.hpp} +1000 -1114
- package/vrpc/addon.cpp +5 -5
- package/vrpc/json.hpp +1769 -870
- package/vrpc/vrpc-agent-js +4 -4
- package/README.rst +0 -18
- package/third_party/include/catch.hpp +0 -12749
- package/third_party/install.sh +0 -22
- package/vrpc/VrpcLocal.js +0 -269
- package/vrpc/VrpcLocal.py +0 -171
- package/vrpc/__init__.py +0 -1
- package/vrpc/module.cpp +0 -183
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,35 @@ 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-alpha.1]
|
|
9
|
+
|
|
10
|
+
### Changes
|
|
11
|
+
|
|
12
|
+
- layout and content of this repository, only javascript related code is left
|
|
13
|
+
- naming of public API classes is made consistent
|
|
14
|
+
- VrpcAdapter
|
|
15
|
+
- VrpcAgent
|
|
16
|
+
- VrpcClient (formerly VrpcRemote)
|
|
17
|
+
- VrpcNative (formerly VrpcLocal)
|
|
18
|
+
- RPC wire protocol got changed and simplified, a protocol version is attached
|
|
19
|
+
to every message (`v: 3`)
|
|
20
|
+
- concept of isolated and shared proxy instances
|
|
21
|
+
([#51](https://github.com/heisenware/vrpc/issues/51)) got implemented
|
|
22
|
+
- all namings including 'binding' got renamed for the more appropriate 'adapter'
|
|
23
|
+
- calling embedded C++ code got a completely new API (VrpcNative)
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- injection of proxy-, instance-, and client id into proxy instance [Node.js] (#49)
|
|
28
|
+
- public accessor for client id [Node.js] (#49)
|
|
29
|
+
- signal `clientGone` on agent, indicating that a state-changing client went
|
|
30
|
+
[Node.js]
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- Bug during clientId extraction for an exited client (causing leaks for
|
|
35
|
+
anonymous instances)
|
|
36
|
+
|
|
8
37
|
## [2.6.0] - 12 Jul 2021
|
|
9
38
|
|
|
10
39
|
### Added
|
package/README.md
CHANGED
|
@@ -5,72 +5,49 @@
|
|
|
5
5
|
[](https://semver.org/spec/v2.0.0.html)
|
|
6
6
|
[](https://github.com/heisenware/vrpc/tag)
|
|
7
7
|
[](http://github.com/heisenware/vrpc/issues)
|
|
8
|
+

|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
## Visit our website: https://vrpc.io
|
|
11
|
-
---
|
|
10
|
+
## Visit our website: [vrpc.io](https://vrpc.io)
|
|
12
11
|
|
|
13
12
|
## What is VRPC?
|
|
14
13
|
|
|
15
|
-
VRPC - Variadic Remote Procedure Calls - is
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
VRPC - Variadic Remote Procedure Calls - is an enhancement of the old RPC
|
|
15
|
+
(remote procedure calls) idea. Like RPC, it allows to directly call functions
|
|
16
|
+
written in any programming language by functions written in any other (or the
|
|
17
|
+
same) programming language. Unlike RPC, VRPC furthermore supports:
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
- non-intrusive adaption of existing code, making it remotely callable
|
|
20
|
+
- remote function calls on many distributed receivers at the same time (one
|
|
21
|
+
client - multiple agents)
|
|
22
|
+
- service discovery
|
|
23
|
+
- outbound-connection-only network architecture (using MQTT technology)
|
|
24
|
+
- isolated (multi-tenant) and shared access modes to remotely available
|
|
25
|
+
resources
|
|
26
|
+
- asynchronous language constructs (callbacks, promises, event-loops)
|
|
27
|
+
- OOP (classes, objects, member functions) and functional (lambda) patterns
|
|
28
|
+
- exception forwarding
|
|
21
29
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- without the need to run a server
|
|
30
|
+
VRPC is available for an entire spectrum of programming technologies including
|
|
31
|
+
embedded (Arduino, header-only C++, etc.), data-science (Python, R,
|
|
32
|
+
etc.), and web (Javascript, React, etc.) technologies.
|
|
26
33
|
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
As a robust and highly performing communication system it can build the
|
|
35
|
+
foundation of complex digitization projects in the area of (I)IoT or
|
|
36
|
+
Cloud-Computing.
|
|
29
37
|
|
|
30
|
-
|
|
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
|
|
38
|
+
## This is VRPC for Javascript (Node.js and Browser)
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
dynamic linkage), executable or source package.
|
|
40
|
+
Understand how to use it by looking at the examples:
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
- [Agent Example](examples/agent/README.md)
|
|
43
|
+
- [Client Example](examples/client/README.md)
|
|
44
|
+
- [Simple C++ Embedding Example](examples/native1/README.md)
|
|
45
|
+
- [Advanced C++ Embedding Example](examples/native2/README.md)
|
|
42
46
|
|
|
43
|
-
|
|
47
|
+
Get all the details by reading the documentation:
|
|
44
48
|
|
|
45
|
-
- [
|
|
46
|
-
- [
|
|
49
|
+
- [API Reference](docs/api.md)
|
|
50
|
+
- [RPC Protocol Details](docs/protocol.md)
|
|
47
51
|
|
|
48
|
-
|
|
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)
|
|
52
|
+
> This open-source project is professionally managed and supported by
|
|
53
|
+
> [Heisenware GmbH](https://heisenware.com).
|
package/binding.gyp.no-auto
CHANGED
|
@@ -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': ['
|
|
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
|
}
|