Optional explicit syntax for remote operations

Bug #590559 reported by Jonathan Lange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restfulclient
Triaged
Low
Unassigned

Bug Description

It would be nice if there were some sort of (optional) explicit syntax for remote operations.

For example, rather than saying:
  branch.createMergeProposal(commit_message="foo", ...)

Being able to say:
  branch.callRemote('createMergeProposal', commit_message="foo", ...)

The main advantages would be:
  - making it easy to scan for network ops
  - familiarity to Twisted programmers

I don't think this is a very important bug.

Revision history for this message
Gary Poster (gary) wrote :

"making it easy to scan for network ops": you mean, in the codebase? That would be a coding convention which would be easily forgotten and ignored on one hand, and on the other hand could be replaced with other coding conventions that didn't require alternat APIs (e.g., remote_branch.createMergeProposal...).

"familiarity to Twisted programmers": if it doesn't return a Deferred, this seems of very minimal gain. I'd personally prefer an approach that had an alternate root object that kept the same API but returned Deferreds.

- A given root object only supports one approach, so it is less accident-prone.
- Programmers can learn a single API, and either use standard blocking calls or Deferreds.

Of course, that may be a pipe dream, for one reason or another. Or perhaps that's what James is experimenting with?

I'm very inclined to call this a Won't Fix, but will call it a Triaged: Low for now in case you convince me otherwise.

Changed in lazr.restfulclient:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.