4 ms·
> Allow users to submit "agents" rather than "requests." An agent is a small program given extremely limited resources (limited process/memory/runtime budget) t
by stingraycharles 6y ago
> Allow users to submit "agents" rather than "requests." An agent is a small program given extremely limited resources (limited process/memory/runtime budget) that you can safely run on your server. It is a possible answer to many of the standards/protocols that wouldn't exist if frontends were running on the same machines as backends.
Forgive my ignorance, but how would this work in practice? Would agents be arbitrary code that a client would submit to an API, or would the agent be something that the server itself implements and manages in the backend?
EDIT: after some further reading of the mentioned threads, it appears to me like the idea is that we ship data with their own interpreters of some kind? I can help but fear this will cause even more JavaScript code to be pushed to the server. :)
- AriaMinaei 6y agoI think at a minimum, agents are programs that clients submit to the server. The server runs the agent with a very limited API and likely as a pure function (lang could be JS or wasm maybe). The agent could run in response to events on the server (like webhooks), or in response to requests coming in from the client. Here is a scribble: https://gist.github.com/AriaMinaei/69e1a9166e7ffbd61e7f6709d7a819b8 https://gist.github.com/AriaMinaei/69e1a9166e7ffbd61e7f6709d...
- hinkley 6y agoEffectively we are talking about something on a par with stored procedures, but hopefully a bit nicer and portable. You would of course want to apply at least as much thought to the design of the agent as you would to a prepared statement, so that they can be reused. And that would probably mean, like a prepared statement, that you are sending a query and some config for that query as two separate inputs, one of which is much more stable than the other.
- aabbcc1241 6y agoSeems horizon (RethinkDB middleware that allows the queries to be constructed on client side) is an implementation of agent in the discussion.