Batch API: multi rest calls

94 views
Skip to first unread message

SoftWord

unread,
Nov 28, 2018, 3:32:46 AM11/28/18
to Fat-Free Framework

ved

unread,
Nov 28, 2018, 8:33:43 AM11/28/18
to Fat-Free Framework
Hi,

I personally fail to see what is so powerful about this in relation to, for example, GraphQL. I'm guessing Paypal already had way too many stuff running REST services that it would be easier and cheaper to just build this instead?

Anyway, I don't see how it should be the framework's job to implement this since F3 already supports building REST api's, so nothing should be stopping you from implementing something like this, which to me doesn't seem to be anything more than a middleman layer/proxy between the api server and clients that aggregates all results?

But please do correct me if I failed to see what's so special about this.

Cheers.

ved

unread,
Nov 28, 2018, 8:49:14 AM11/28/18
to Fat-Free Framework
Me again,

Strangely, on that same blog, last month they posted this: GraphQL: A success story for PayPal Checkout

And right at the beginning they state:

This blog post takes a close look at PayPal Checkout and explains our journey from REST to Batch REST to GraphQL and lessons learned along the way.

Which was exactly what I pointed on my previous reply. They seem to also be migrating to GraphQL which solves this exact problem.

I'm just not sure why they'd post that Batch REST blog now, because it seems clear that they're already deprecating it in favor of GraphQL.

SoftWord

unread,
Nov 28, 2018, 10:03:40 AM11/28/18
to Fat-Free Framework
But I'm not interested about what do u want, I'm interested in this implementation, I've asked only to ikez and F3 developers what think about that.

Stop "flames" please.

ved

unread,
Nov 28, 2018, 3:07:26 PM11/28/18
to f3-fra...@googlegroups.com
lol, I'm sorry, what?

First of all, this is a general support forum for F3 users. It's not your personal job board.

Secondly, at no time did you state that your post was only for ikkez and other F3 developers.

Thirdly, I merely stated that what that post describes is something that YOU can do yourself since F3 already supports REST, the batch functionality is something that you have to develop yourself. What exactly do you want? A $f3->thatPaypalThingie() that does your job for you?

So in conclusion, for merely stating some facts and doubts about your request (which I explicitly asked to be clarified in case I was missing something), you instead opted to disregard what I posted and decided to just be a self-entitled dick about it.

But that's ok. Since you accused me of "flaming", and at the risk of being banned from these groups, I might as well tell you to please kindly go **** yourself. How flammable was that?

SoftWord

unread,
Nov 29, 2018, 2:27:25 AM11/29/18
to Fat-Free Framework
Is Your reply costructive? No.
I follow the work of ikkez etc from the born of f3 and never meet è person like you.

Nice days Man.

ikkez

unread,
Nov 29, 2018, 4:25:17 AM11/29/18
to f3-fra...@googlegroups.com
Come on folks, we have more important things to solve than flaming for no reason.
First, thanks for the flowers Giancarlo, but I'm just that random dude who writes code and loves this framework for a while now :) so thx but I don't feel like I deserve more attention than anyone else here on the board. That said, I think that ved has shown some pretty good points and references to the topic.
Regarding the BATCH REST implementation, I think that's probably possible with a little helper class, like 100 lines of code that takes your requests, and bundles them into a single json payload for a single final request (on the consumer endpoint in php) and for the batch provider endpoint, you can maybe just foreach through all the request keys in that array and use $f3->mock() for simulating further requests, collect the responses and send them back. If that's worth a plugin or something I don't know right now. However GraphQL looks also very promissing and its syntax would absolutely fit for a request handler that run with cortex I guess.. maybe I'll experiment with that in the future.

SoftWord

unread,
Nov 29, 2018, 10:51:08 AM11/29/18
to Fat-Free Framework
Thanks ikkez, your contribute to F3 in this years are very appreciated.

So your idea is to unwrap every request and make a call using mock().

Thanks.
Reply all
Reply to author
Forward
0 new messages