-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat(compiler): CRDT-maps implementation #1142
Conversation
…ation # Conflicts: # aqua-src/antithesis.aqua
streamMap <<- "key one", "new" | ||
streamMap <<- "key two", "" | ||
resSecond = streamMap.keysStream() | ||
<- resEmpty, resFirst, resSecond |
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.
Should not we join on result streams?
|
||
for r <- relays par: | ||
on r: | ||
join map.get("time")[relays.length - 1] |
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.
Is not it join on an array that has no effect?
getKeys(mapName, mapType) | ||
case (KeysStream, Nil) => | ||
getKeysStream(mapName, mapType) | ||
case (n, args) => |
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.
Why not put this argument flattening inside getModel
? It already flattens the id if it is a string literal. And contains
uses getModel
inside, so there will be no need to use it twice.
@@ -129,7 +129,7 @@ trait TypesAlgebra[S[_], Alg[_]] { | |||
|
|||
def typeToCollectible(token: Token[S], givenType: Type): OptionT[Alg, CollectibleType] | |||
|
|||
def typeToStream(token: Token[S], givenType: Type): OptionT[Alg, StreamType] | |||
def typeToStream(token: Token[S], givenType: Type, isMap: Boolean): OptionT[Alg, MutableStreamType] |
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.
nit: Personally, I don't like such bool flags that essentially separate two distinct methods inside.
Here it is just typeToStream(...): ...[..., StreamType]
and typeToStreamMap(...): ...[..., StreamMapType]
.
Description
Implementation of CRDT-maps in Aqua
Proposed Changes
https://www.notion.so/fluencenetwork/CRDT-Maps-in-Aqua-82d047246329446b8e1ca6f4db73228b?pm=c
Checklist
Reviewer Checklist