Thursday, January 16, 2014

Individual OBP Presentation - Server/GHSS Application



For my individual OBP, my original plan was to set up a Linux server to do all sorts of things from E-Mail to Cloud and many other things. I originally chose this because after doing a small amount of server and networking work for someone I know, I realized that servers and networks are areas that I didn't know all that much about, and I wanted to learn more.

After having the basics of the server set up, I decided to switch routes and go with a suggestion Perry had last year when my culminating was making an Android app, which was to make an Android app for GHSS. With what I learned about Android last year and what I learned about servers this year, I figured that this project would be possible for me to do now.

I started off with some basic pencil drawings of the layout of the app, planning where everything will go and what it will have, and so far I've stuck to the layout plan quite closely. After I had a good plan down, I started asking other students for feedback - if they would use it, and what they want in it, and through that I was able to get a few more ideas and suggestions.

The app so far has 4 sections - Home (News), Cafe, Extracurricular, and Health Clinic. Each section has text boxes and web views which retrieve text from a server. The text in each of them are changed easily and quickly from a set of forms on webpages on the server, that can be filled out and saved and instantly retrievable by the app.

Skills Used/Learned - I had to use my programming, graphic design, and networking/server set up skills to set up the server and the app. During this, I learned a huge amount more about how networks and servers work, how to program web pages using PHP and HTML, and improved my knowledge on Android app programming.

I've had quite a few problems I've run into during this project, one of the first and biggest ones being a problem where the app sometimes couldn't retrieve info from my server while on the school's WiFi. The issue was where I would start the app on the WiFi, and every time it would either fail to get info, get the info but somehow get outdated info that doesn't exist on my server anymore, or get the proper up to date info.
After a while of thinking, I came to the conclusion that the WiFi was giving me a cached (old, saved) version of my info, since my phone is on the "guest network" because it is not a school device, and therefore I only get the 'extra'/unused bandwidth from the school's connection, and then during times when school devices were heavily using the network, there was no bandwidth remaining so I'd receive a cached version instead. I figured my only solution to this was to have the app's server in the school somewhere, so the app could recognize when it's on the school's network and connect to the server locally instead of over the internet.

Some improvements I plan on making are:
- Having the app know all the order of periods for each day for the year
- Implementing a snow day alerter/checker
- Making a version for Apple devices

The app is still in development and still has a bit to go, but if anyone with an Android device would like to test this app and give feedback and problem/bug reports I can give invites that allow you to download the Alpha version from the Google Play Store.

Saturday, December 21, 2013

Switch to Creating An App - Progress and Problems

I have switched from constructing my Linux server to building an Android application for the school.

This app will be designed to retrieve daily-updated information from a server. The problem I'm having with this, is when I try to access testing info through the school's WiFi on the app from my server at home, it seems it will sometimes access a cached version (since it is retrieving a .txt file through a URL). I assume this is because all non-school devices on the WiFi go to the 'guest' network, which I'd think receives all the bandwidth that isn't being currently used (i.e. the guest devices get a lower priority than the school's devices), so when there's not enough to be able to connect to that URL for updates, it just accesses the cached version instead.

If this is what the problem is, I think my best solution is to set up the server at the school (as the plan was anyways) and have the app recognize when it is connected to the school's network, and if it is, connect to the server for updates through LAN instead of internet to (hopefully) avoid the caching problem.

After I solve this problem, I have to remake the interface to use a fragments system, which will allow a lot more design & navigational features, and then start coding the rest of the PHP forms that gets filled out to update the information the app gets from the server.

Tuesday, December 3, 2013

Progress Update

 

Got LAMP set up along with Webmin and a CMS (e107).

Though I've set these things up before on a different Linux distro, it was still a change since Debian can sometimes work with scripts and packages a little differently than distro's like Ubuntu (e.g. .deb's instead of .tar.gz's), so I learned a good bit more about working around with Debian.

I've been taking time to learn and work a lot more with BASH and Shell scripting. This wasn't for usage in any scenario with my server, but rather another situation with a different one that I help out with. I've learned that in many situations (usually where you require some sort of automation) BASH scripting can be incredibly useful, but also very different compared to how most object-oriented scripting and programming languages can work, so there's a lot more learning and tweaking involved.

In my time playing with BASH scripting, I learned an interesting thing about the way UNIX and Windows handle files with text in them differently, as I was having a weird problem with a script I was working on, and eventually found out that since the file was written on a Windows system, there were auto-added (and deeply hidden) symbols and characters in my scripts. I was able to remove these hidden items and change the formatting using something in Linux called vim.

As I mentioned in a previous post, even though there's not too much to do, there's a massive amount to learn from doing these (sometimes) small things. Just from what I've done so far I've learned a very large amount about servers and networks in general.

My next steps are to start doing more tweaking to my CMS and getting it fully set up, while I try to set up an FTP server (and see if I can actually get Samba to work for once).

Sunday, October 13, 2013

Final Checklist

In approximate order
Minimum Goal:
- LAMP
- Webmin
- CMS for LAMP (probably e107)
- Voice chat (probably TS3)
- FTP/Samba/Cloud
- Mail


Just optional extra things, ideas could be added/removed, listed in approximate order
Extra Tasks:
- More website customization (add a wiki or something, code/design some of my own pages, etc.)
- Start over, install Proxmox and have multiple virtual Linux server machines inside of it, split up the different software on each, have them communicate (if/where they're able to), basically have around 3 dedicated to do different things
- Create an Android application that lets me know the statuses of my servers (whether they're up or down, usages, etc.), if I got to this point I'd eventually try to make the app work on anyone's servers and then put it up on the Google Play store for others to make use of it


As I complete tasks, I'll record videos or take screenshots of it working and talk a little bit about what I did, what it does, what I learned, etcetera for each. I expect to pass the minimum goal quite quickly, but I still expect to learn a huge amount (as some things can be as simple as apt-get and then tweak some config files, but I find even from that, I still learn a lot). For some things, I may even just give the address to access what I've set up (e.g. website, voice chat server) along with showing video clips or screenshots.

Sunday, September 22, 2013

Project Description, Current Plans

Linux Server Project

For this project I am going to be making a Linux server, most likely using Debian, and setting up/configuring many different software for the server (e.g. Apache 2, Webmin). Since this could be done very quickly, even though I would still learn a lot, I plan to have extra tasks for after I finish setting up all the software I want. These extra tasks being things like doing things for my Apache website, like setting up a CMS or building my own kind of layout, or even a bit of both. If I were to finish that too I could try to create a "status report" application for my Android device, that allows me to check up on the status of my server wherever I go.

I chose this project because I don't know very much when it comes to servers and things in that kind of area. Since there is a lot of room for learning, no costs to do the project, and I'd get to keep everything after, I decided to do this as my project.

After researching a little more into servers and networking, I found out that the one thing I require before I'll be able to do this project from school is a static public IP address, which is not offered as an addon by my ISP, so I am currently in the process of switching to one that does.

While I wait for that to happen, I've slowely been thinking up a sort of "checklist" on what I'm going to do for the project and when I'm going to do it, and so far this is what I have:

Minimum Requirement/Goal:
- Set up the simple and basic things (Webmin, SSH, etc.)
- Set up a web server (LAMP)
- Mail server (Postfix?)
- Cloud server (ownCloud)
- DNS server (OpenDNS)

Extra Tasks:
- Customize website
- Create status app

There is still a bit of planning to do, but that shows the basic idea so far. I am also going to be getting some of my ideas for tasks from here.