My current setup:
Arduino -> IRC SERVER <-> Clients (PHP and custom software)
1 - Arduinos sends a special crafted string to the IRC server.
2 - IRC server has one channel per group of Arduinos. 3 - On every channel there's a bot, catching all the strings s开发者_Go百科ent, and saving them on a SQL database. 4 - I have a cron job, that moves the raw data from the 1st SQL table to another one, with data already parsed, pretty and nice. 5 - Clients, who may use PHP web based site, or a custom software connect to the server. 6 - If they need realtime data, the IRC server is choosen, a command is sent to the Arduino, and this, sends the string either to channel AND to the operator. Otherwise, they get the data from the 2nd SQL table with a simple query date based. 7 - Data is sent with 1 second interval (NEEDED) 8 - This was a quick and dirty hack to get things done. Now... I need to move from this arcaic system and get things done in the right way. I have a few notions of APE (Ajax Push Engine), Comet, REST, etc... The "almost real-time" is a must, so, my guess would be AJAX, right?! But, what would you use in a situation like this? What would be the most efficient way to have this upgraded? My limitation is on the side of Arduino, with the GPRS module, I can only send and receive simple ASCII strings. Please, Arduino haters, this is not an Arduino doubt/question, forget I even mention it. This is a simple call for help/ideas about what technology is more efficient to this project? BTW... I like KISS principle and simple modules, so that debuging won't take more time than the project itself :) Thanks to all.
精彩评论