Some feedback after trying P #672
gabrielgiussi
started this conversation in
General
Replies: 1 comment
-
I found that P supports foreign functions and foreign types, which could help me to solve of the issues I described like the need for built-in functions to operate over collections and the possibility to unit test those functions. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi folks 👋
After watching Ankush's presentation I'm really interested on using P to model a distributed system involving datomic peers, datomic transactor and kafka topics to prove some message ordering guarantees.
As a programmer, I think the actor model is much more friendly than having to write TLA+, however I've faced some challenges during this week that didn't allow me to complete my work.
I'm adding a list of them here hoping you find this feedback useful and potentially give me some tips to overcome some of them:
Main issues I've faced
and
andor
, I can mirror them using functions except in the case I need them to shortcircuit, e.g.and(index < sizeof(aSeq),aSeq(index) > 1))
. For this case I had to introduce a boolean var and a break to exit from a while loop.Things it would be nice to have
goto WaitingResponse(request.id)
passing the id to the state so I can assert the response corresponds to my request by matching the id. With this I don't have to add another var to the machine and remember to clean it up after receiving the response.What I did to make sense of my execution was to process the trace.json file and created lamport diagrams from it, let me know if you could be interested in such tooling, I would like to contribute to P if you think it could be useful, maybe as another file to generate on failed executions (or even on successful ones).
The tool requires some conventions about always including the sender of a message, although I saw there is an issue proposing adding that implicitly already, and a way to uniquely identify a message to match send and receive events.
Thanks for the great work on P!
Cheers.
Beta Was this translation helpful? Give feedback.
All reactions