Pages: [1]   Go Down
Author Topic: Facebook Real-time Updates with ArduinoUNO+EthernetShield  (Read 686 times)
0 Members and 1 Guest are viewing this topic.
Spain
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: July 20, 2011, 03:30:17 am by magdasanchez » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 650
Posts: 50833
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

China
Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I guess it should be Server mode.

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

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 650
Posts: 50833
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I guess it should be Server mode.
Duh.

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

Spain
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
« Last Edit: July 20, 2011, 11:25:40 am by magdasanchez » Logged

0
Offline Offline
Tesla Member
***
Karma: 147
Posts: 9741
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Spain
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Pages: [1]   Go Up
Jump to: