0

I am working on a client-server simulation software. And I want the client to be implemented on the web, and also require that the client can do computations like matrix multiplication, random number generation etc., which framework can I use? And also I hope that the client side and server side communicate using simple socket, because the server code is implemented with c++. Any suggestions are really appreciated!!

Thanks

Simon

1
  • What do you mean by 'the client to be implemented on the web'? Commented Mar 27, 2011 at 6:41

2 Answers 2

1

I'm assuming "on the web" means "HTTP", i.e. via an AJAX-like interface.

The relevant Python built-in libraries are httplib (HTTP client) and random (random numbers; may be better in NumPy). For matrix multiplication, you'll want the third-party library NumPy. You may want to look into SciPy as well.

Sign up to request clarification or add additional context in comments.

5 Comments

On the web means the client is build with a web GUI. My question is how to confine mathematical computations on the client side rather than done by the web-server?
So the client is a browser? Are you wanting the math to be done on-browser with JavaScript? Where does Python come into this?
Yes, I am curious to see if there are libraries to help me do this? Can I compile python to javascript, such as this tool http://pyjs.org/?
@Simon Guo: At best Pyjamas would compile an arbitrary pure Python code to javascript. numpy and scipy are not pure Python libraries (parts are written in C, Cython, Fortran).
If you are going to run something on the user's browser, your first choice should be to write it in JavaScript. Modern browsers take great pains to make JS run fast. Failing that, you might want to consider writing in Java or Jython, but that requires your client to have a Java runtime installed.
0

Matrix manipulation is in NumPy. Everything else listed in in the standard library. You may want to look into something like Twisted in order to mediate the network access though.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.