Releases: jharmer95/rpc.hpp
Alpha 8-1
Alpha v8 brings a big change to function dispatching, utilizing a hashmap instead of macro-heavy code. It also changes the namespace from rpc
to rpc_hpp
for clarity and avoiding conflicts.
-
Function dispatching now uses a dispatch table
- Functions are now "bound" to the server at runtime via a hashmap
- Key: function name/alias string
- Simplifies server setup (and possible performance boost)
- No more
rpc_dispatch_helper.hpp
- Functions are now "bound" to the server at runtime via a hashmap
-
Add support for using string literal arguments
-
Add benchmarks comparing rpc.hpp to other RPC libraries
-
Changed dispatch function signature
- The
dispatch
function in the server interface is now sink & return, rather than pass-by-reference.
- The
-
Adapters now use more direct static polymorphism
- As a result, adapters are nicer to work with and can be more flexible
- Details for adapters can now be implemented as
private
members
- Details for adapters can now be implemented as
- As a result, adapters are nicer to work with and can be more flexible
-
Fix compiler compatibility issues
Alpha 7-1
Alpha v7 cleans up the code and adds exception handling:
- Removed unused internal functions
- Moved previously unnecessarily public functions to internal namespaces
- Exceptions can now be throw for error detection, both client- and server-side
- Exceptions are serializable so they can be "re-thrown" on the client side
- Tests are in place to ensure the proper exceptions are thrown
- Bitsery binary serialization adapter now public
- More efficient use of memory allocation for all adapters
Alpha 6-1
Alpha v6 brings some big changes:
- Calling a function that takes parameters by reference is now transparent!
- This means that is behaves like you were calling the function locally; non-const reference parameters will be updated automatically
- Server functions are now in a class
server_interface
much likeclient_interface
- Makes it easier to define a server class via inheritance
- Minor performance enhancements and warning cleanup
Alpha 5-1
- Components can now be conditionally compiled to save compilation time. This can be done by defining one or more of the following in a
.cpp
file that includesrpc.hpp
(or an adapter):#define RPC_HPP_CLIENT_IMPL
for client executables (caller)#define RPC_HPP_MODULE_IMPL
for dynamically-loaded.dll
or.so
projects acting as the "server" (receiver)#define RPC_HPP_SERVER_IMPL
for server executables (receiver)
- Additionally,
call_func
was moved from a free-standing function, to a member function ofclient_interface
. This allows for a slightly nicer calling convention:
// before
auto pack = rpc::client::call_func<T_SERIAL, T_RETURN>(my_client, "FUNC_NAME", arg1, arg2);
// now
auto pack = my_client.template call_func<T_RETURN>("FUNC_NAME", arg1, arg2);
- Also added some examples for creating RPC clients, modules, and servers
Alpha 4-1
This release involves a new redesign featuring a much smaller codebase (2183 total LOC down to 1129) and a way simpler extension system.
It is technically a breaking change though the syntax for the client should be very similar (replace rpc::call
with rpc::call_func
).
This rewrite also removes pointer support (again). It may be added at a later time, but it was discovered that pointer support was a big reason for the code bloat
Alpha 3-4
Alpha 3-3
This release provides some minor performance improvements and also provides built-in capability for reporting exceptions from the server back to the client.
Calls to packed_func::get_result()
will now throw if the result is std::nullopt
and provide the user with the error message via exception
Alpha 3-2
This release fixes some bugs and adds back the ability to define public
, static
serialize
and deserialize
methods to your classes
Alpha 3-1
This release adds the ability to cache the results of certain functions on the server to potentially improve performance. This feature is per-function and opt-in (i.e. not default behavior).
In order to indicate that a function is to be cached, the RPC_ATTACH_CACHED_FUNC
/ RPC_ATTACH_CACHED_FUNCS
macros should be used instead of the normal RPC_ATTACH_FUNC
.
To benefit from server-side caching, a function should be a pure function and have a non-void
return type
Alpha 2-4
This release includes a new adapter for Boost.JSON (require Boost 1.75.0 or newer).
Also included are some bugfixes and performance improvements.