Skip to content
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

interledger-service API review for v1.0-rc #569

Closed
13 tasks done
gakonst opened this issue Dec 18, 2019 · 8 comments
Closed
13 tasks done

interledger-service API review for v1.0-rc #569

gakonst opened this issue Dec 18, 2019 · 8 comments
Assignees
Labels
crate/interledger-service docs v1.0 Issues which need to be handled for a v1.0 release

Comments

@gakonst
Copy link
Member

gakonst commented Dec 18, 2019

interledger-service public items marked with x are documented. Non-exported items are not taken into account. Follows format from #561.

Part of #557.

  • username (struct)
  • trace(module): Does this need to be exported? It just contains implementations to the service traits for Instrumented
  • Account (trait)
    • Should we document each function's expected output? Their names are pretty self-explanatory.
  • IncomingRequest (struct)
    • Maybe we should add comments to each field of the struct as well?
  • OutgoingRequest (struct)
    • Maybe we should add comments to each field of the struct as well?
  • IncomingService (trait):
    • Should we document the expected behavior of handle_request?
  • OutgoingService (trait):
    • Should we document the expected behavior of send_request?
  • BoxedIlpFuture (type)
  • AccountStore (trait):
    • Should we document each function's expected output? Their names are pretty self-explanatory.
  • incoming_service_fn / outgoing_service_fn
  • ServiceFn
  • WrappedService:
    • (nit) we can rename the generic parameters for the wrap_incoming and wrap_outgoing functions to be I and O for consistency, instead of IO
  • AddressStore:
    • Should be filled to explain why this functionality is needed/used, short explanation: when a parent account is added the node's address must be updated to reflect the address assigned to it by the parent
@gakonst gakonst changed the title interledger-service API review for v1.0-rc #561 interledger-service API review for v1.0-rc Dec 18, 2019
@gakonst gakonst added this to To do in Towards a v1.0 Dec 18, 2019
@emschwartz
Copy link
Member

This is going to have some serious breaking changes (or potentially be removed) based on #434 #142 #85

@bstrie
Copy link
Contributor

bstrie commented Dec 18, 2019

If we did replace the services with Tower, I imagine we'd still want this crate around to provide IncomingRequest, OutgoingRequest, and Account.

@bstrie
Copy link
Contributor

bstrie commented Dec 18, 2019

Should AddressStore be defined in interledger-packet, where Address is defined?

@emschwartz
Copy link
Member

Should AddressStore be defined in interledger-packet, where Address is defined?

No. interledger-packet is just the (de)serialization format.

@gakonst gakonst mentioned this issue Jan 20, 2020
11 tasks
@gakonst gakonst moved this from To do to In progress in Towards a v1.0 Jan 20, 2020
@gakonst gakonst self-assigned this Jan 20, 2020
@gakonst gakonst added v1.0 Issues which need to be handled for a v1.0 release docs labels Jan 20, 2020
@gakonst gakonst moved this from In progress to Waiting Review / Response in Towards a v1.0 Jan 20, 2020
@gakonst
Copy link
Member Author

gakonst commented Jan 29, 2020

Maybe we can remove the mut requirement from services, as @kincaidoneil pointed out:

Alternatively... why does handle_request on the service interface require a mutable borrow? Could we change it to just &self?

@bstrie
Copy link
Contributor

bstrie commented Jan 29, 2020

If we're not sure why that function is &mut self then I'd say it's worth a try to remove it, if only to see whether it causes any problems (assuming that we don't actually need mutability anywhere, then it should be entirely painless to go from &mut self to &self). But I forget the broader context of the conversation, was there something else that we were hoping to gain from this? Something like, say, loosening up some other bounds elsewhere?

@bstrie
Copy link
Contributor

bstrie commented Feb 4, 2020

  • if the trace module doesn't need to be exported, then don't export it. Reduce public surface area.
  • Account/AccountStore: if the names are self-explanatory then don't worry about it.
  • IncomingRequest/OutgoingRequest: comments on fields sounds good to me
  • IncomingService/OutgoingService: if the behavior isn't self-explanatory, then it should be documented
  • WrappedService: rename the parameters for consistency (though I seem to remember that this was already done?)

@gakonst
Copy link
Member Author

gakonst commented Feb 4, 2020

  • trace is no longer exported
  • account / account-store have been thoroughly documented
  • comments in Request fields have been added
  • Comments on Service types and their functions have been added
  • WrappedService params are in a good spot

@gakonst gakonst closed this as completed Feb 4, 2020
Towards a v1.0 automation moved this from Waiting Review / Response to Done Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate/interledger-service docs v1.0 Issues which need to be handled for a v1.0 release
Projects
No open projects
Development

No branches or pull requests

3 participants