Message Boards Message Boards

Can one use Wolfram Cloud to set up a client-server Mathematica env't?

I want to deploy a notebook in the cloud that has a global state and time management function, and then have several Mathematica clients access that server using function calls (as in GetServerState[], which would be defined in the cloud-resident notebook). The clients would have a user interface (built using GUIKit; this is a proof of concept that would follow with better clients).

I have tried using CloudPut/CloudGet, and can pass data.

I have tried using CloudDeploy[APIFunction[…]] and then URLExecute on the resulting URL. This works from a browser, but it doesn't work from within a mathematica notebook on the client side (I get the "web page" below in my notebook; note that the notebook is properly signed in to WolframCloud and can access data there). I would be happy to pass a URL with arguments from a client notebook to the server in the cloud, if I could get intelligible results.

Any ideas/help??

Thanks!

NOTEBOOK OUTPUT FROM URLExecute[]:

SIGNIN_CATCH

Warning!

The browser you are using is not supported at this time.
Please try the latest version of one of these browsers.

Chrome

Firefox

Safari
That's OK, I'm willing to risk it.

Continue

Using Wolfram Cloud via mobile browsers is not yet fully supported.
Some features may not work as expected.

I understand.

Continue

Sign In

To be able to use Wolfram Cloud, you need to enable JavaScript in \ your browser.

Wolfram ID (your email address)
Password

Sign In Forgot your password?

Don't have a Wolfram ID?
Create Account Learn about Wolfram Cloud »
© 2014 Wolfram Terms of Use | Privacy Policy | Contact Support

POSTED BY: Brian Galvin
3 Replies

First, apologies to Jesse; I realized when I went to get the sample that I had moved on to a different (NOT better) approach, and lost the sample.

Anyway, thanks Chad for the post; I will try it and reply with results, good or bad.

This is not my day job, so I only work on this in evenings usually…

POSTED BY: Brian Galvin

The URLExecute is returning a login page, as expected. To return a result, you have to provide credentials. The simplest way to do this is to wrap CloudObject around the url when you are connected to the cloud ($CloudConnected is True).

URLExecute[CloudObject[-url-],{"param1"->"value1",....},...]

In the case of your clients, there are a couple of options currently implemented. Perhaps more options will be available soon.

First, you can set the Permissions of the deployed APIFunction to "Public". But this will allow anyone to access your function (so long as they know the url).

Alternatively, you can specify who has permissions to evaluate the function. Currently, these users need to have a WolframCloud account.

POSTED BY: Chad Knutson

Can you post the URLExecute function you're using? The problem might be that the arguments aren't properly formatted.

POSTED BY: Jesse Friedman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract