2
$\begingroup$

I know it's possible to evaluate expressions using Mathematica kernel that's on my computer using J/Link. Is it possible to do the same but use the remote kernel that my Mathematica Online uses?

$\endgroup$
  • $\begingroup$ I would be surprised if you could. For one: Do you know where the remore kernel runs? Do you have access to it by something like rsh? $\endgroup$ – Sjoerd C. de Vries Aug 10 '15 at 19:39
  • $\begingroup$ @SjoerdC.deVries But CloudEvaluate can do it from Mathematica, so why wouldn't it be possible from Java? $\endgroup$ – Szabolcs Aug 12 '15 at 20:56
2
$\begingroup$

The Wolfram Programming Cloud allows you to evaluate expressions, my guess would be in the same cloud in which the Mathematica Online runs. You can make a simple program that runs in the cloud and responses to an expression with an evaluation. To make this web API, run the following code in the Wolfram Programming Cloud:

CloudDeploy[APIFunction[{"expression"-> "String"},ToExpression[#]&,"String"]]

When you go to the returned URL and add an expression attribute to the end, the page shows the attributes value evaluated as an expression. For example the url https://www.wolframcloud.com/objects/something-specific-to-you?expression=Solve%5Bx-1%3D%3D0%2Cx%5D (remember to url encode the expression)
returns: <|expression -> {{x -> 1}}|>

You have to remember though that each API call costs one Wolfram Cloud Credit. With current prices a thousand calls costs 0.30$. https://www.wolfram.com/cloud-credits/

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.