Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Batch calls and a macro command design pattern
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Grigori Kochanov  
View profile   Translate to Translated (View Original)
 More options Jul 9 2012, 7:29 am
From: Grigori Kochanov <pub...@grik.net>
Date: Mon, 9 Jul 2012 04:29:58 -0700 (PDT)
Local: Mon, Jul 9 2012 7:29 am
Subject: Batch calls and a macro command design pattern

Hi, we are implementing the JSON-RPC 2 protocol, and would like to offer an
improvement.
We have a case where a request can register a customer, set the delivery
address data, save the basket of goods selected and register an order.
A batch request seems a good approach where each action is called
sequentially, within a single HTTP request.

The problem is that we need another macro-command to manage the process of
each methods called.
The user may be registered, the address validation may fail, and the basket
is saved, then the order registration should not be executed.
If the user is not registered, all other methods should be skipped.

This is a case for a Command (action) design pattern described by GOF. We
should register a macro command object and make our methods as sub-commands
of a macro command.

What is the best way to describe the macro command in the JSON-RPC 2
protocol? It seems like there is no sub-methods described. I can simply
create the method called MACRO and place it along with other methods, and
parse it as a macro command in an application logic.

WBR, Grigori


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.