java - send data from raspberry to spring web application remotely -


i want have architecture.... http://i.stack.imgur.com/hhbpb.png

can me? can't understand how should send data respberry web server. have spring mvc webapplication...user should able measure something(for example temperature) , senf through web application interface(jsp page). can write webservice post data form webserver. how should send data raspberry form? or there better solution?

between pi , spring app use rest (like post, methods json/xml representation). can either make raspberry pi spam spring application data per x time or make raspberry pi server spring send requests raspberry pi , raspberry pi return data. second way requires building restful api on raspberry.

first way.

pi: here temperature (post /temperature) pi: here temperature (post /temperature) pi: here temperature (post /temperature) pi: here temperature (post /temperature) pi: here temperature (post /temperature) 

second way.

spring: give me temperature (get /temperature) pi: here temperature (returns json) spring retrives data json , saves database. 

you can learn how build restful web service here: spring guide , how consume restful web service: spring guide.

remember can use java on raspberry pi can write spring application pi4j.

after done buidling data database , present user.

note: if want transport lot of data small delay should consider using typical tcp/udp connection.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -