-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add mediator and simple client implementation #977
Conversation
ba7b96f
to
f619fab
Compare
Codecov Report
@@ Coverage Diff @@
## main #977 +/- ##
=======================================
Coverage 36.31% 36.32%
=======================================
Files 386 386
Lines 22040 22040
Branches 4062 4073 +11
=======================================
+ Hits 8003 8005 +2
Misses 11877 11877
+ Partials 2160 2158 -2
Flags with carried forward coverage won't be shown. Click here to find out more. |
4adc7dd
to
d07c054
Compare
241be31
to
54026f3
Compare
3b6393e
to
66dc3a4
Compare
d07c054
to
2821f11
Compare
Hi @nain-F49FF806 note that all of the commits must be DCO signed |
@Patrik-Stas Yes. This PR is currently WIP. (Specifically the unsigned commit) I was using the (absence of) DCO as an automatic block. 😅 |
f66a1b3
to
23932c2
Compare
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.
review is not complete yet (far from it), but just submitting my intermediate comments
ea170f4
to
8bb431e
Compare
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Has majorly common code with mediator agent. It's in essence one hybrid, with organized code. Then again, aries agents are meant to be horizontal. Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
The workspace Cargo.lock will be used since mediator is now part of workspace. This can be removed Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
Signed-off-by: Naian <[email protected]>
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 is commented, shall be removed?
|
||
Currently exposed endpoints. | ||
|
||
```yaml |
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.
the endpoints below are now out of sync - but note my comments on endpoint routes, before you start changing this
Encrypted Aries messages (envelops) can be passed and received from this endpoint in json serialized format. | ||
``` | ||
|
||
### Client API |
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.
let's remove this, for once, I am not sure if there a value to the web client, I think TUI is a lot nicer, secondly if we were to keep this, it would probably be separate project. Let's keep this readme focus on mediator only
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.
I mentioned elsewhere, but why don't we just keep the TUI in favor of this?
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.
let's keep all workflows in the root .github/
directory
> The commits are made in such a way as to demonstrate and try one feature or workflow (refactoring) at a time. | ||
> So the git log could be educative. | ||
> | ||
> ## Some Interesting commits |
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.
Feel free to include this somewhere along project plan notes, but probably doesn't belong here.
.route("/forward", post(handle_forward)) | ||
.route("/pickup", post(handle_pickup)) |
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.
these can be either:
- a single
didcomm
endpoint - or 2 endpoints as you have it, but then I'd suggest
/didcomm
for 3rd party fw messages and/didcomm-client
for didcomm messages from clients (eg connections, mediation coordition, pickup)
2 endpoints can be really good idea from oversight perspective, in logs it would be easier to distinguish between incoming 3rd party messages, client messages and plot stats and graphs out of that data
pub async fn respond_message_json(Json(body): Json<MessageJson>) -> Json<MessageResponseJson> { | ||
Json(MessageResponseJson { | ||
message: (body.message), | ||
response: ("I am groot".to_owned()), |
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.
😆 👍
let app = create_router().await; | ||
info!("Starting server"); | ||
// add server task to main loop | ||
axum::Server::bind(&"127.0.0.1:7999".parse().unwrap()) |
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.
Let's the IP and the port configurable. You can keep the current values as defaults
// Copyright 2023 Naian G. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
// unimplemented!() |
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.
if we going with mysql only, I guess we can remove the commented code?
@nain-F49FF806 I've left another round of comments. I think we could get initial version merged after these, and we can keep bigger improvements in a todo list externally |
Signed-off-by: Patrik <[email protected]>
For now, I am merging this as is~ The outstanding comments shall be addressed in subsequent PRs |
Client agent has majorly common code with mediator agent.
It's in essence one hybrid, with code organized separately.
This is in anticipation of splitting client into separate binary.
Then again, Aries agents are meant to be horizontal (p2p). So perhaps a multifunctional agent isn't all that odd.