-
Notifications
You must be signed in to change notification settings - Fork 13
Singletons and guards for RPC methods #148
Comments
As mentioned in the meeting today, having a standalone
I don't have a good view for what changes are needed for |
What would be the real advantage of a
There is no need to manage the locking ourself; LMDB already locks the database. Indeed every new transaction works on a snapshot of the database and the underlying data can be deleted only once the last read transaction is closed. We only need to be careful to open the database with the right options if we play we threads. Also, I think we should consider a standalone program to update the database so that it could be run in a post-transaction RPM hook.
Indeed the best best to initialize the Also
The main problem is that |
The only benefit (that I can see) of doing anything to the current treatment of the
We can (should?) have both, but until the FW is deployed as an RPM I don't feel a strong desire to change the standard operating procedure of using
Yes, this was the drawback I saw of going this route. I don't know the performance hit of this, especially if the logging is enabled in the
Is this really a problem? Is there a specific benefit of converting the global to a singleton in this case? OK, I'll wait for the working minimally working demonstration of these three things (my starting point was converting |
I don't understand what would be the resources gains achieved by limiting the number of
I was trying to find a good reason instead of just over-designing this part... In the end, the problem is that the Sure, the memory leak (confirmed with |
Brief summary of issue
The RPC modules require some services to be present at runtime (
memsvc
, LMDB, maybelog4cplus
). They are treated in different ways:memsvc
is initialized at module loadLOGGER
instance is used (tied towiscrpc
)I propose to use the following standard patterns:
memsvc
, the LMDB database and named database objects. This pattern is already used internally bylog4cplus
. Singleton objects are primarily useful for code transparency.With this design, I think that we can get rid of the
localArgs
struct completely, which will simplify module interfaces.[Note: I'm not 100% sure that the named db can be shared. A peek at the doc is required, but it was clear when I was looking a while ago.]
Types of issue
Expected Behavior
Calls to shared services should be transparent.
Current Behavior
The
localArgs
struct is a pain (though it's better than passing around many arguments).Context (for feature requests)
We are essentially rewriting the RPC modules anyway.
The text was updated successfully, but these errors were encountered: