DLTcollab / dcurl

Hardware-accelerated Multi-threaded IOTA PoW, drop-in replacement for ccurl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assign RabbitMQ broker IP address at the dcurl publisher side

marktwtn opened this issue · comments

When the build option BUILD_REMOTE is enabled, the dcurl can be treated as two parts.
The library for local machine and the executable for remote machine.
That is, the publisher and the consumer.

In #185, the consumer can assign the RabbitMQ broker IP.
However, the publisher can not.

The default IP value on the publisher side is localhost.
It means that the dcurl publisher and the RabbitMQ broker should be on the same machine only, which is not flexible.

To allow the dcurl publisher to assign the RabbitMQ broker IP address, there are two methods:

  • Assign the IP address at the compilation stage.
  • Assign the IP address when the dcurl is initializing.

I prefer assign the IP address when the dcurl is initializing.

dcurl_init() API needs to be changed, hence the code of dcurl and IRI would be changed as well.

The original API does not contain any input argument.
In the new design, the initialization related argument is collected as a structure and passed in pointer form.
The pointer form helps the unification of the API.

And the IP address is another problem.
The IP address is a string and it behaves differently in Java and C code, such as null termination character existence.

Currently most of the implementation has been done.
Only some minor issues need to be taken care with.

Shall we provide some neat diagnosis utility as well?