Questions on rest and servicelayer.silverlight

32 views
Skip to first unread message

nabils

unread,
Jan 18, 2011, 10:47:03 AM1/18/11
to agatha
I have a few questions below:

1)      Is the agatha REST functionality mature? How would I use it to
call a simple request below whihc just echos the string in Data?

public class EchoRequest : Request

    {

        public string Data { get; set; }

    }


public class EchoResponse : Response

    {

        public string Data { get; set; }

    }

2)      What are common usage scenarios for ServiceLayer.Silverlight?

3)      I would like to write some retrying logic for the client where
on failure of a request it asks the client if they would like to
retry. What is the best way to do this?


Thanks,

Nabil

Davy Brion

unread,
Jan 19, 2011, 3:57:44 AM1/19/11
to agath...@googlegroups.com
1) i think Andrew wanted to make some changes to how it works, so i
wouldn't expect it to remain as it currently is. You can find an
example of how it's used in the Examples folder in subversion

2) not many... i only included it because someone once needed a sort
of fall-back scenario for when the server was offline and he had some
kind of 'local' handler implementation that he wanted to fall back on

3) if you're looking for some kind of generic solution, it could get
messy... there's no direct link between a Response type and the actual
Request type you need to send to get such a response... so whichever
way you intend to go, you'll need some kind of map to store which
request type corresponds to what response type

Matthew Lund

unread,
Jan 21, 2014, 6:58:44 PM1/21/14
to agath...@googlegroups.com, ral...@davybrion.com
I intend to implement some generic re-try logic on the client side of some programs that are using Agatha to communicate to a server.  In case it's relevant, we're using agatha with WCF.

I was just about to add some re-try logic when I read the messages below.  Now I'm in a bit of doubt.

I thought that if 4 requests get sent from client to server, the server would execute those requests, honoring order, and return 4 responses.  I've noticed that if the 3rd request, for example, raises on exception on the server side then the 3rd response to the client will contains information about the exception (as expected) and the 4th response will also contains exception info with an exception type of EarlierRequestAlreadyFailed.

In this example, I would think that the 3rd and 4th requests need to be sent back to the server.  This had lead me to the conclusion that I don't need any mapping info for request/responses from the client side in order to generically handle a certain amount of retries for any given request that fails.

Is my thinking flawed on this?

On Wednesday, January 19, 2011 1:57:44 AM UTC-7, Davy Brion wrote:

(snip)
 
3) if you're looking for some kind of generic solution, it could get

messy... there's no direct link between a Response type and the actual
Request type you need to send to get such a response... so whichever
way you intend to go, you'll need some kind of map to store which
request type corresponds to what response type

On Tue, Jan 18, 2011 at 4:47 PM, nabils <a...@shuhaiber.com> wrote:
> I have a few questions below:
>

(snip)

> 3)      I would like to write some retrying logic for the client where
> on failure of a request it asks the client if they would like to
> retry. What is the best way to do this?

(snip)
Reply all
Reply to author
Forward
0 new messages