Many `beekeeper` instances with many `clive` instances
Explanation:
storage
: a directory pointed by a --wallet-dir
switch. In this directory there are internal files with encoded private keys, files with information about currently used PID, details of connection and so on.
Basic rules:
- Only one
beekeper
instance has access to its storage - There are possible many
beekeeper
instances working concurrently, but every instance has to have ownstorage
-
beekeeper
instance can be attached toN
clive
instances in the same time -
beekeeper
instance has a--webserver-http-endpoint
switch where a port is given. The port can be given strictly as a precise number or a0
number, that means that OS chooses port's number randomly. - Every connection
clive
->beekeper
requires a token. That token represents a session. The session is an additional layer in c++ code. For example now there is only one global timeout, but it's desired that everyclive
->beekeper
connection has own timeout.
Tasks:
-
When a beekeeper
instance starts, checks ifbeekeeper.pid
exists. There are 2 possibilities: -
beekeeper.pid
file doesn't exist: save locally information about: own PID (beekeeper.pid
file), own port (beekeeper.connection
file), send this data in a notification and start normally -
beekeeper.pid
file exists: send PID/port in a notification and close -
Create two endpoints: beekeeper_api.create_session
where a token is generated andbeekeeper_api.close_session
where the internal session inbeekeper
instance is closed. After closing all sessions it's possible to closebeekeper
instance permanently. -
Extend every existing endpoint with a token information -
Extend a notification server in order to send a notification to particular endpoint