I understand the Web Platform to be a good always-on server solution for non-processing tasks. As a hobbiest I would like to take advantage of offloading a personal web server onto something the size of a business card. I was wondering about the capabilities before I order one though.
I searched the wiki and I read. I found a few guides, but nothing really detailed. I don't know if the web platform is right for me.
Here's what I'd like it to be able to do...
1. Serve dynamic content from RSS feeds (my blogs, things I'm interested in).
2. Have a predefined login/password screen which will allow access to the next items, which will wait a few minutes between invalid password attempts and log the IP of anyone who performs an invalid password attempt.
3. Be able to modify my router's routing tables by sending a http/POST request to my router like this:
http://username:password@192.168.1.1/apply?name1="foo"
then 30 minutes later execute another command to reenable my firewall. (this way I can login-in, then use SSH, VNC or RDP without having the ports always open).
4. Be able to pull those routing tables from a text file.
5. make use of Linux command line applications.. like Expect, SSH or Telnet for scripting other computers actions.[/list]
If 5 is not possible, it would not be a deal breaker. I am just looking for a web server I can log onto and have it perform remedial actions on my network to take down my firewall.
These would be the things I'd like to make my webplatform do if I bought one. Are they feasable? On a scale of 1-10, how difficult would they be for someone who is proficient in java, bash, arduino, and somewhat familiar with other languages including html?
Hey Adam,
I'd say no, the web platform isn't right. I use it for pull internet stuff, like the twitter controlled christmas tree, and the thermal printer that's printing our Twitter mentions on live stream right now. #1 alone is probably way beyond the abilities of the web platform, and it would take a lot of effort to program all that from scratch because it doesn't run an OS and no such utilities are available.
#2 - kinda,the Mircochip demo has a http authenticate example.
#3 - yeah, that should be possible
#4 - that should be ok too
#5 - not locally, there is no OS, the primary way to make an app is in C. You might be able to interface those apps on another server though (like scripted actions on another computer from a remote terminal).
I'd say go for a netbook or small box with a linux live CD, it would be way easier and there's way more support for it.
alix boards running linux are great for that type of tasks... on the other hand, alix board can also replace your router :)
Or go with a dd- or open-wrt router. You should be able to find something used that is able to run openwrt. I personally like the Asus w500-gp.
if you go with w500-gp or alike device it will work great as a router but that's it .. running alix board (for e.g. my favorite is ALIX 2D13 (http://http://pcengines.ch/alix2d13.htm) (availble locally for ~100eur + 10eur for metal case and psu) and when I use them as routers I run zero shell (http://http://www.zeroshell.net/eng/) on them (linux with great web interface for configuring all router/firewall options, but still a full fledged linux that you can customize and add any package you want) ... board also have usart, usb and i2c that you can use to control / talk to other appliances (I assume 3 eth ports will be used for other stuff :D like wan, lan ..). I used uart and usb, never tried i2c on these boards but should be straight forward as it is supported on linux
[quote author="ian"]
I'd say no, the web platform isn't right. I use it for pull internet stuff, like the twitter controlled christmas tree, and the thermal printer that's printing our Twitter mentions on live stream right now. #1 alone is probably way beyond the abilities of the web platform, and it would take a lot of effort to program all that from scratch because it doesn't run an OS and no such utilities are available.
...
I'd say go for a netbook or small box with a linux live CD, it would be way easier and there's way more support for it.[/quote]
Hrm... You said you use it to pull internet stuff... It wouldn't be able to pull several RSS feeds and parse the first entry every 15 minutes, then return a link to a web page? Maybe have a table with content pulled from another website or computer on my network? It seems very possible. However, it does seem like it would be more effort then it's worth...
I was planning on maybe referring people to adamoutler.com and showing them that this website is powered by my web platform, displaying basic content like on the website demo, and serving up content pulled from RSS. It would be like an internet business card, in a physical form factor of a business card. From what you're saying it should be possible... I'm not really good in C++ though... I know wiring, but that's not the same. If this were Java, I'd be all over it. I think you're right, I should look at a different platform...
Maybe some of these ideas could go into Web Platform V2... It would be awesome to have a Java-style interface which gets translated to C then compiled. You must surely agree that C is somewhat of a lost art these days with options like C++, Java, and Visual Studio available. Maybe some shortcut APIs or a chip which runs nothing but a Java VM, or a modified version of Apache... Don't slay me here, I'm just thinking of things that would make this platform useful to me.
[quote author="arhi"]if you go with w500-gp or alike device it will work great as a router but that's it .. running alix board (for e.g. my favorite is ALIX 2D13 (http://http://pcengines.ch/alix2d13.htm) (availble locally for ~100eur + 10eur for metal case and psu) and when I use them as routers I run zero shell (http://http://www.zeroshell.net/eng/) on them (linux with great web interface for configuring all router/firewall options, but still a full fledged linux that you can customize and add any package you want) ... board also have usart, usb and i2c that you can use to control / talk to other appliances (I assume 3 eth ports will be used for other stuff :D like wan, lan ..). I used uart and usb, never tried i2c on these boards but should be straight forward as it is supported on linux[/quote]
That's alot more hardware then required for what I want to do. A bit more pricey as well. I'm really looking to toy around and have a hacked website running on something which noone would look at and say "hey, that's a server". I really want something custom like this web platform, but I guess it's beyond my abilities.
if you want a business card web server and you want to use wiring interface to program it - here ya go (http://http://arduino.cc/en/Tutorial/WebServer)
That would work... It's a bit large though... very limited flash rom.. basically it would be programmed to just send a block of pre-programmed text and possibly make decisions based on inputs received...
Arduino nano: http://www.bizoner.com/arduino-nano-30- ... p-240.html (http://www.bizoner.com/arduino-nano-30-atmel-atmega328-miniusb-board-with-usb-cable-p-240.html)
SPI Ethernet module: http://iteadstudio.com/store/index.php? ... ilhpflclh7 (http://iteadstudio.com/store/index.php?main_page=product_info&products_id=224&zenid=46qdvppdci0o976bilhpflclh7)
Overall cost $37, same price as web platform. However, Arduinos are such general purpose hardware that it's hard to find a good job for them. To me,leaving them in a project doesn't seem right because they're repurposeable.... Like it's still in prototype mode. I like the idea of a hackable "web platform".. just not enough to pick up the books and learn another programming language.
I will wait and see what version 2 brings.
you do not need arudino device ...
there is a schematic of the arduino, there is a schematic of that shield, just splash them on a single board, get it made by seeed fusionpcb, solder stuff on it, burn in the arduino bootloader and there ya go .. it can be same size as the business card no problem, the only serious issue there is the ethernet connector as that's big ...
For the RSS feeds, it would be doable, but because of the limited embedded resources it is a messy, thankless job :) Check out the nasty code I wrote to parse Twitter JSON:
http://code.google.com/p/dangerous-prot ... 265&r=1265 (http://code.google.com/p/dangerous-prototypes-open-hardware/source/browse/trunk/Web_Platform/firmware/Thermal_Tweet/tweet_treev1.c?spec=svn1265&r=1265)