Releases: Geod24/localrest
v0.4.0: Major overhaul of concurrency system
This release comes with a brand new concurrency system,
originally a fork of std.concurrency
which was modified
to support the notion of channels (inspired from Golang's API).
It should not interact (or conflict) with std.concurrency
anymore.
Other major changes:
- Threads can now be shut down explicitly;
- Request mismatch are now handled gracefully (the node won't crash);
- There is a new module,
geod24.Registry
, to allow easily mocking a router / DNS; - The
std.concurrency
priority messages have been removed; - Localrest can now use a custom serialization policy, with
vibe.data.json
being the default; - An comprehensive error message will now be printed out when a node dies (including instantiation location);
- Nodes responding to dead peers will no longer crash;
- Control interface: Shutdown can now accept a custom callback for user-defined cleanup;
setTimer
(similar to Vibe.d) andschedule
have been implemented for task management;- Control interface: Nodes can now be restarted;
- Client error (e.g. peer dead, unimplemented methods) are now separate from error response (e.g. wrong parameter);
- Various improments around Tid to make type mismatch harder;
- The scheduler can now be used from the node constructor;
- All operations now default to a timeout of 5 seconds (previously: unlimited);
- Self connecting nodes (nodes that connect to themselves) should now work properly;
v0.3.0: Better node control
This release introduces the following features:
- Control interface, under
node.ctrl
: All functionalities later described,
as well as thetid
property, live in the control interface.
The control interface is a named template mixin with namectrl
,
meaning that names are accessing through the parent scope unless they
conflict with other names (e.g. if an API define atid
function). - Add the ability to suspend a node for a specified duration;
The node can either drop requests, or delay them. - Ability to filter requests: A node can be told to ignore certain endpoints.
- Request timeout: It is now possible to define a timeout on a client.
AnException
will be thrown if the client time out. - The annoying
Serializing composite type [...] ArgWrapper
won't show up again.
v0.2.0: Support for concurrent nodes and async tasks
This new release supports re-entrant nodes
(e.g. node A can call node B which in turns calls node A again)
and exposes some primitives that are common in Vibe.d program,
namely runTask
and sleep
to allow polling tasks.
Support for future is not here yet (runTask
returns void
)
but might come in the future.
Note that, since Vibe.d
messes with the global scheduler
instance
in std.concurrency
, it's likely you will need to reset it to null
to avoid your tests hanging randomly.
v0.1.0: Improved API for nodes
This release changes (in a breaking way) the RemoteAPI
type to take out
the implementation type out of it, mirroring RestInterfaceClient
better
and allowing to create arrays of client pointing to different kind of nodes.
v0.0.1: Initial import from private repository
This was part of a private project.
It's usage as a library is not yet completely ironed out
and this this is a preview release (but usable via dub).