Skip to content

[RFC] Starting the debugging API #562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3,588 commits into
base: main
Choose a base branch
from
Open

[RFC] Starting the debugging API #562

wants to merge 3,588 commits into from

Conversation

mbouaziz
Copy link
Contributor

Here is a start for a debugging API. You can test it like that:

cd skipruntime-ts
bun run build
bun run examples/groups.ts
curl http://localhost:8081/v1/debug/raw/dirs | jq

which gives me before.json

After running the example server and client, I get: after.json

Design discussion points:

  • URL: I plan on having SKStore-level stuff under /debug/raw/ and SkipRuntime-level stuff under /debug/inputs/, /debug/resources/, /debug/streams/, what do you think?
  • Security: the debugging entrypoints should be disabled by default (where to put this?), forthcoming non-read-only ones will even be under another flag
  • Code separation: we could even put the code under another package so that it doesn't pollute production code, maybe as an optional node package, for now the code should be easy to find by grepping debug
  • Data usage: for now the API is non-reactive but part of it can be made reactive later, under a feature flag as well because it could be costly

jberdine and others added 30 commits October 29, 2024 15:57
They are far from clean, and not the current priority
I don't know why TS allows declaring an uninitialized variable (that is even
read before written) with a type that does not admit undefined.
It seems to be common for code to not need the context argument of
reactiveCompute. This PR reorders the args so that when it is not needed, it
can be omitted.
I am finding the name of the inputCollections field of SkipService
confusing, and so propose a renaming. There are two aspects: the type of the
field is not a Collection in the Skip sense, and the name inputCollections
is also used for that actual collections argument of reactiveCompute. The
reuse of the name is confusing, I think, as the field is the initial data
while the argument is the working data of the service. Users should not ever
read the inputCollections field, only provide it for runService (and
eventually initService) to read. But users should read from the
inputCollections argument. I think that renaming to emphasize that the field
is only the initial data will help.
I am finding the name of the inputCollections field of SkipService
confusing, and so propose a renaming. There are two aspects: the type of
the
field is not a Collection in the Skip sense, and the name
inputCollections
is also used for that actual collections argument of reactiveCompute.
The
reuse of the name is confusing, I think, as the field is the initial
data
while the argument is the working data of the service. Users should not
ever
read the inputCollections field, only provide it for runService (and
eventually initService) to read. But users should read from the
inputCollections argument. I think that renaming to emphasize that the
field
is only the initial data will help.
jberdine and others added 25 commits November 26, 2024 16:25
In expected usage, the reactive service will not know its own public URL, so
this function does not make sense.

This reverts commit 0f0bd4d.
In expected usage, the reactive service will not know its own public
URL, so
this function does not make sense.

This reverts commit 0f0bd4d.
This class provides methods that mirror and have thin implementations over
the skip service HTTP interface. This class is providing a method-call
interface for the HTTP interface. In this context, the term "broker" seems
more appropriate and clear.
…kipLabs#543)

- Rename RESTWrapperOfSkipService to SkipServiceBroker

This class provides methods that mirror and have thin implementations
over
the skip service HTTP interface. This class is providing a method-call
interface for the HTTP interface. In this context, the term "broker"
seems
more appropriate and clear.

- Document SkipServiceBroker
Noticed while documenting, the data returned by ServiceInstance.getArray
will be an array of Json values.
Noticed while documenting, the data returned by ServiceInstance.getArray
will be an array of Json values.
To match the interface of Eager/LazyCollection.
To match the interface of Eager/LazyCollection.
First attempt to describe SKStore. Still needs some work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants