-
Notifications
You must be signed in to change notification settings - Fork 1
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
bedrock-db #1680
bedrock-db #1680
Conversation
…b to member updates in order to keep peers lists in sync with members lists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agents from separate desks still conflict with one another - recommend renaming to %realm-db
as a precaution
|
||
+$ paths (map path path-row) | ||
+$ schemas (map [=type:common v=@ud] schema) | ||
+$ schema (list [name=@t t=@t]) :: list of [column-name type-code] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be a (map column-name type-code)
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, the ordering matters, since it must match the order of the columns in the row
type
desks/realm/app/db.hoon
Outdated
?+ path !! | ||
:: | ||
[%x %db ~] | ||
``db-state+!>(state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you reformat the ?+
/ ?-
to be in backstep form like below? So they don't keep running to the right
?+ path !!
::
[%x %db ~]
``db-state+!>(state)
==
yeah %db is just the development name. we'll rename everything when we actually start putting it out in the real-net |
?> ?=([%o *] jon) | ||
=/ request-id=(unit json) (~(get by p.jon) 'request-id') | ||
?~ request-id | ||
[[~zod ~2000.1.1] (de-input-row jon)] :: if the poke-sender didn't care enough to pass a request id, just use a fake one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it probably makes sense to treat the action and the id separately. Maybe have a mark for the action without the id and have the agent on-poke accept an id/action pair and the thread accept only an action. The thread takes care of creating and passing along the id. This would allow frontends and other agents using the thread to not have to worry about ids at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With something like ^this you could also handle the action in the on-poke then put a single vent kick after that. The thread could interpret a kick without a fact as a simple ack. This would mean you would only need to worry about venting where you needed to. If an action needs to give a real response it vents a fact, otherwise it does nothing and the single kick is interpreted by the thread as an ack. Would make this pattern minimally invasive.
add enjs function for tables so that path scry returns all relevant data
add take-fact-or-kick
desks/realm/sur/common.hoon
Outdated
:: like/dislike upvote/downvote | ||
+$ vote | ||
$: up=? :: true for like/upvote, false for dislike/downvote | ||
=ship :: who cast this vote |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to be able to have some kind of constraint on votes that says that you can only vote on your own behalf.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe simply remove ship from the common type and rely instead on the row creator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I removed ship from the common type in basically all of them, since the ship was always redundant with the ship.id
… is not setup yet. also it still remote-scries every time even if it already has the thing
supposedly the custom-types system I have may be more flexibly replaced with:
https://github.com/ryjm/citadel/blob/cae5c3c9d3d293d7ca43d5ffac1762098eb7d459/desk/lib/etch.hoon#L4