Closed pnoltes closed 1 month ago
About event-admin, I would like to update the current status:
Zhenbao Xu is busying working on porting RSA/PSA to a closed source web server due to civetweb's lack of reverse proxy support: https://github.com/civetweb/civetweb/issues/1131 Once the job is done, he will come back to us. I'm pretty sure he will be happy to help review any PR related to netstring and event admin.
Place the implementation in libs/netstring and ensure that the lib file name is celix_netstring and the lib name is netstring with a Celix::netstring alias. The lib should depend on Celix::utils and use the celix_err implementation to report error messages
@pnoltes As described in #674, properties will support netstring encoding, which will cause a mutual dependency between Celix:utils and Celix:netstring. To solve this problem, we may need to place netstring in Celix:utils; or we can separate celix_err and celix_errno into the library Celix:err, then Celix:utils and Celix:netstring depend on Celix:err. Do you have any other views?
To solve this problem, we may need to place netstring in Celix:utils; or we can separate celix_err and celix_errno into the library Celix:err, then Celix:utils and Celix:netstring depend on Celix:err.
Or a standalone netstring lib which does not depend on Celix:utils? It seems that we can reuse existing errno to report error, logging is not really needed. Customized FILE *
may also help netstring mux/demux.
It is overridden by #743.
Netstring lib
A netstring lib in C which can be used to encode/decode (serializer/deserialize) properties and/or metadata for remote service data and events for the - yet to be implemented - event admin.
Background
Source: https://en.wikipedia.org/wiki/Netstring
Implementation hints
Use the implementation in https://github.com/apache/celix/blob/master/bundles/pubsub/pubsub_protocol/pubsub_protocol_lib/src/pubsub_wire_protocol_common.c (
pubsubProtocol_addNetstringEntryToBuffer
andpubsubProtocol_parseNetstring
) as a basis for the netstring lib.Place the implementation in
libs/netstring
and ensure that the lib file name iscelix_netstring
and the lib name isnetstring
with aCelix::netstring
alias. The lib should depend onCelix::utils
and use thecelix_err
implementation to report error messages (https://github.com/apache/celix/blob/master/libs/utils/include/celix_err.h).The
celix_status_t
should be extended with a netstring facility andCELIX_ERROR_MAKE
using celix_errno.h (https://github.com/apache/celix/blob/rel/celix-2.3.0/libs/utils/include/celix_errno.h)A possible api could be: