Go Down

Topic: Facebook Real-time Updates with ArduinoUNO+EthernetShield (Read 728 times) previous topic - next topic

Jul 20, 2011, 10:14 am Last Edit: Jul 20, 2011, 10:30 am by magdasanchez Reason: 1
Hello all, I hope anyone can give me a suggestion on how to solve the problem I am having.

I have set up the following client-server scenario:

Client: ArduinoUno connected to internet and requesting information to my WebServer, the obtained information is showed on a led display.
Server: my WebServer is subscribed to Facebook real-time updates, so every time a facebook page is liked it then the Facebook server updates some info on my WebServer.

The problem with this architecture is that: eventhough I have set up real-time updates between my WebServer and Facebook, ArduinoUno still has to be continuously polling my WebServer to get the updates.

So, any idea to avoid ArduinoUno to be continuously polling the WebServer?

Thanks a million!
Magda

PaulS

Why not run the Arduino in client mode, and have your web server call it when it has something new?

Jeffrey Sun

I guess it should be [font=Verdana]Server [/font]mode.

You can get the example named WebServer.pde from the Ethernet library.

PaulS

Quote
I guess it should be Server mode.

Duh.

Note to self: no posting until after the tea is done.

#4
Jul 20, 2011, 06:18 pm Last Edit: Jul 20, 2011, 06:25 pm by magdasanchez Reason: 1
Hi guys, thanks for your replies.

Correct me if I am wrong but my understanding is that when Arduino is working as client mode then it makes POST and GET requests to the web server and depending on the case it will get data back from it. This means that the client will be polling the server in order to get new updates on the data.

If Arduino works as a server then the real-time updates approach might work but I am still worried about how the Arduino Unit can be seen on the internet, do I need a static IP address? in a LAN is easy but what about having the Arduino as a WebServer on a WAN network?

Thanks again!

zoomkat

Quote
do I need a static IP address?


No, you can use a dynamic IP service like no-ip.com and have a router port foward incomming traffic to the arduino on your lan.
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

Thanks for the info!!

one last question... do you know anything about server push-notifications? it would be easier to leave the arduino as client and to configure some sort of server push-notifications according to Facebook status.

great forum BTW!

many thanks!

Go Up