GeniusVentures / GeniusSDK

1 stars 0 forks source link

Set interface #7

Open henriqueaklein opened 2 months ago

henriqueaklein commented 2 months ago

After building the SDK, think about the interfaces required for a Game developer.

Ideally, as a passive processing node, it would need a Init() function to trigger the node underneath. As a node active processing node (where an AI/ML job is requested) there would need to be a call with these parameters and the amount to be paid.

As for initialization parameters, there would be a need to define these:

It could be a json. (For initial integration could be parameters if easier)

The most important part about this is setting a simple interface for the Game dev

Super-Genius commented 2 months ago

For this no Init() function is needed.

instead.

extern struct sgInitData { ...Linked Values in make, or read from cfg file and passed into linker... } extern "C" bool sgInited = SgInit(&sgInitData);

Linker would whole archive this file, so that SgInit gets called on loading of executable/library

henriqueaklein commented 1 month ago

I've implemented essentially this by the Node Class creating a singleton-like object in its source file. However the code doesn't behave well, due to the static initialization nature that was inserted. Basically I ran into multiple occasions where strings/vectors weren't build yet and that resulted in exception and errors (mainly in soralog, libp2p, gossipubsub).

Also while at that I found some probable errors on soralog configuration that flew under the radar (no configuration for the application logger works alone, it must have lip2p's configuration which is the fallback it uses, or else it crashes).

For now I'll comment the static initialization to continue working on other features

henriqueaklein commented 3 weeks ago

Working on secure storage interface