1

Is it possible to execute server side code (something like Parse "Cloud Code") with Apigee, as backend for a mobile app as client?

I'd want to use the out of the box "App Services" functionality, but perform some extra stuff (like updating data) from the server side,

The only (naive?) way I can think of is this:

  • Have my own server running.
  • The mobile app uses standard "App Services" API on Apigee
  • If necessary, the client calls
    • some custom API on my server,
    • which lets my server call Apigee via REST to fetch data, calculate some results, and post the updated data Apigee
    • and then returns the result to the client

Sounds a bit complicated (especially in terms of handling authentication) - are there any best practices to achieve something like I described?

Thanks!

Cheeso
  • 189,189
  • 101
  • 473
  • 713
thomers
  • 2,603
  • 4
  • 29
  • 50

2 Answers2

3

Consider App Services as your database in the cloud to which you can talk using APIs. Therefore, you really don't need that server in the between unless you are doing some heavy lifting in it. You could make that API call directly from the app.

Even if you want to have a back end server for your app, you can leverage the node.js functionality that Apigee Edge provides and have a server up and running in the cloud in quick time. More info can be found here

n3o
  • 2,795
  • 5
  • 24
  • 37
  • Thanks - I need some server side validation and/or processing of the data coming from the clients. I'm familiar with Usergrid, but not with Apigee (for some reason, I still don't really understand what their different products provide or are targeted at). If I understand correctly, I would write a node.js application, and run it on Apigee Edge. That application would process the data from the client, process it and use the App Services to store it? I should probably add I start from scratch, so there is no existing infrastructure/data sources that I would connect expose as APIs via Apigee – thomers Mar 19 '14 at 16:16
1

If you want to do server side validation, you should use a Node.js proxy that incorporates Usergrid. This will allow you to perform a query on the database and do processing of the results. Check out this presentation: https://speakerdeck.com/timanglade/coders-workshop-at-i-apis. In particular, see Section 7, which discusses using Usergrid and Node.js.

Mike Malloy
  • 1,520
  • 1
  • 15
  • 19