SunnyX
asked on
Using Tomcat as raspberry pi java app server
Hi dear Experts,
Please tell me using Tomcat as raspberry pi java app server is a good idea ?
I need just run a simple project computing pi on server side by using Leibniz Formula For PI . From the client side on ( PC Win 8.1 Java GUI ) enter input parameters like number iterations and number or threads. And perform computation on server side by using 3 notes ( rpi0 ( master ) rpi1, rpi2 ) . Right now the notes able to compute pi in multi-threading through the MPI.
What should I do in order to connect my laptop to raspberry pi for this purpose ?
Regards,
Sunny
Please tell me using Tomcat as raspberry pi java app server is a good idea ?
I need just run a simple project computing pi on server side by using Leibniz Formula For PI . From the client side on ( PC Win 8.1 Java GUI ) enter input parameters like number iterations and number or threads. And perform computation on server side by using 3 notes ( rpi0 ( master ) rpi1, rpi2 ) . Right now the notes able to compute pi in multi-threading through the MPI.
What should I do in order to connect my laptop to raspberry pi for this purpose ?
Regards,
Sunny
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
So the server simply returns one single value when done and nothing in the meantime?
ASKER
If the raspberry pi could return computed pi value to my desktop ( Win8.1 ) java app it will be great starting point for me. However, the server should perform computation of the pi in multi-threading ( once again it already do it through MPI ) The output look like this.
rpi-multi-threading-output.jpg
rpi-multi-threading-output.jpg
ASKER
I don't care about performance or disk space... I just need that it simply works at the first place. I mean such client-server communication.
Probably the very simplest you could do is return the result via netcat, having made a socket connection to the Pi from Java
http://linux.die.net/man/1/nc
http://linux.die.net/man/1/nc
ASKER
Are there any opportunity to write down this output from the terminal line to the some data base and then Java client app read from this data base ? At least tell me how does it will be called ( I mean what key words will be ) ?
I thought you wanted to do client-server? Using a database is just an unnecessary complication
ASKER
Let say that yes, I would like to use data base in this case. Please give me your advice and sorry that I answer with such delay.
You might use a 'light' database. I recently used MySql under FreeBSD on a Pi and was surprised at how it taxed memory
ASKER
Thx for your advice !
ASKER
I will try
ASKER
thx for your pieces of advice and sorry for delay !
ASKER
Let me describe what I need to do
I would like to make a simple project. Let me describe it :
1. I would like to make simple LapTop GUI java app on JavaFX ( client side )
1.1. The app will be calc pi by using Leibniz Formula For PI
1.2. Of course Button "start" to compute and I also can write down the input parameter like number of iteration
1.3. So on client side LapTop app (Win 8.1. ) I will enter the number iterations and transfer this to the server side.
2. After I press " start " button, the input parameter ( number or iteration ) go to the server side where:
2.1. the computation will be executed
2.2. return to my LapTop app the answer ( pi = 3.1415 .... and error ) .
What I already done :
1. made parallel computation of pi on raspberry pi ( server side only )
2. I feel I can make the desktop GUI on javafx and eclipse mars
So my questions are :
I don't know how to what technology should I use in order to outsource the computation of the pi from my LapTop to the RaspBerry Pi. What should I use ?
If I execute computation on server side through the MPI will this MPI communicate with my java app ? Does it will be optimal solution or Java has their own analog of MPI technology ?
Once again, I using Eclipse Mars ( last edition ).
Thanks in advance
Regards,
Sunny