Conversation
c1cd55c to
23b3072
Compare
library/libwaku_conf.nim
Outdated
|
|
||
| ] | ||
| ) | ||
| nwakuCfg.RateLimits.Filter = &bindingscommon.RateLimit{Volume: 100, Period: 1, TimeUnit: bindingscommon.Second} |
There was a problem hiding this comment.
doing #3489 so that I can just instantiate the rate limits here.
|
You can find the image built from this PR at Built from df62371 |
23b3072 to
19df60b
Compare
library/libwaku_conf.nim
Outdated
| AutoSharding | ||
| StaticSharding | ||
|
|
||
| type AutoShadingConf* = object |
There was a problem hiding this comment.
| type AutoShadingConf* = object | |
| type AutoShardingConf* = object |
library/libwaku_conf.nim
Outdated
| @@ -0,0 +1,66 @@ | |||
| import std/options, waku/factory/waku_conf, waku/factory/conf_builder | |||
There was a problem hiding this comment.
I think we need to rename this module to libwaku_sdk_conf.nim instead, to make it clearer it is aimed for the opinionated version of the library and not for the core libwaku
There was a problem hiding this comment.
I would say this would only fix the tip of the iceberg.
I think waku folder should be named lib and library can be renamed sdk
One could argue that my new config should be in api folder.
Is this addressed by the "architecture and api" virtual offsite recommendation? I havent see a forum post.
There was a problem hiding this comment.
Thanks for the suggestion! Let me share my 2cs in case of willing to rename folders.
I think waku folder should be named lib and library can be renamed sdk
wakufolder is properly named IMHO. We cannot name itlibbecause it does not expose a library outside. Also, the currentwakuapproach seems to be the idiomatic way of naming it. See for example: chronos chronicles- I would suggest keeping
libraryfolder and potentially create these folders as the need for that arises:- Create a new
library/core/folder and move the currentlibrarycontent there. libwaku-core will be compiled from there. - Create a new
library/sdkfolder that will host the opinionated libwaku-sdk. In that case, my original comment above would make much more sense.
- Create a new
summarizing: disregard my previous comment as it seems to be a premature optimization
Is this addressed by the "architecture and api" virtual offsite recommendation? I havent see a forum post.
We are working on it but I think this won't be covered there because that's a very specific for nwaku
There was a problem hiding this comment.
I think we need to rename this module to
libwaku_sdk_conf.niminstead, to make it clearer it is aimed for the opinionated version of the library and not for the core libwaku
"core libwaku" should not be exposed, and we should deprecate it. the Waku API should be the sole API exposed on FFI, do we agree?
There was a problem hiding this comment.
"core libwaku" should not be exposed, and we should deprecate it. the Waku API should be the sole API exposed on FFI, do we agree?
I think it makes sense to only maintain Waku API, for the sake of optimizing resources. Nevertheless, core libwaku might be still relevant for future integrators. Then, IMHO we cannot strongly state that core libwaku should be deprecated. I think it will depend on its future demand.
19df60b to
b56f0f0
Compare
b56f0f0 to
8cc1837
Compare
|
@waku-org/nwaku can I have feedback in terms of the location of the new artefacts? |
library/libwaku.nim
Outdated
|
|
||
| import std/[json, atomics, strformat, options, atomics] | ||
| import chronicles, chronos, chronos/threadsync | ||
| import chronicles, chronos, chronos/threadsync, results |
There was a problem hiding this comment.
@Ivansete-status I wonder if we should rename this file to libwaku_ffi.nim as it is more focused on FFI than actual library.
There was a problem hiding this comment.
Yes, I think we can rename that
Ivansete-status
left a comment
There was a problem hiding this comment.
Some comments so far. Thanks! 🙌
There was a problem hiding this comment.
Yes, I think we can rename that
library/libwaku_api.nim
Outdated
|
|
||
| import ./libwaku_conf | ||
|
|
||
| proc createNode*(config: LibWakuConf): Future[Result[Waku, string]] {.async.} = |
There was a problem hiding this comment.
It seems this createNode duplicates the following: https://github.com/waku-org/nwaku/blob/d74d29e2f1463289291769e2a2107c64868f9a04/library/waku_thread_requests/requests/node_lifecycle_request.nim#L96
There was a problem hiding this comment.
The whole point here @Ivansete-status is to start a fresh Waku API, aligned with the spec logos-messaging/specs#65
There are 2 ways forward:
- Modify existing functions
- Create new functions
I went with (2) because until we have create, send, subscribe, it's going to be hard to dogfood. Also, makes it easier to not force upgrade to the new API in status-go integration, etc.
| @@ -0,0 +1,116 @@ | |||
| import | |||
There was a problem hiding this comment.
If possible, I would not add this file. It seems it adds an additional layer of possible bugs, when sending attributes between layers
There was a problem hiding this comment.
We are defining a new API. These is the config for this new API. The existing API uses WakuNodeConf which is the CLI args one, and hence not adapted.
The intent is to move away from WakuNodeConf and have a config object that works for application developers.
|
Superseded by #3564 due to nim-lang/nimble#1466 |
Description
Demonstrate the Waku API defined in logos-messaging/specs#65 in libwaku.
Dependencies
Here are a list of changes to make this PR happen:
Changes