Viser innlegg med etiketten NGINX. Vis alle innlegg
Viser innlegg med etiketten NGINX. Vis alle innlegg

onsdag 13. april 2016

Android app for weather and local air quality - now updated with feedback UI!

For my BA project I'm making a contextual app for Android 2.3+ that targets the users context (time and place). It shows the forecast and weather now as well as local air quality.

Weather is shown for the entire globe where as the air quality is limited to stations in Norway. It uses my service bus that runs on a LEMP server with Redis for key/value storage.

My App asks my servicebus for the closest stations, the service bus runs geospatial queries and then query the API's if it's not already stored in Redis.

The user can then enrichen the data by submitting how the local weather is, as some times it's not the closest station that is most correct (maybe you live at a different elevation, maybe there is a mountain between you and the closest station or other factors that would mean that other stations should be weighted above the closest ones.).

Current data sources:

søndag 7. februar 2016

5$ VPS rocks the boat!

I'm fairly impressed by the 5$ VPS by Digital Ocean (DO), which gives you real SSD storage, 512 Mb RAM and 1 core, 1Tb traffic out. The fact that I got 10$ after signing up (for free) is also nice.

Digital Ocean has a lot of guides about everything you can imagine and they have a place where the community helps out. I even figured out they pay people to write guides!

You can get a lot done on Linux even with half a gigabyte of RAM. In a couple of days I've set up Ubuntu Server 14.04 (LTS), NGINX, PHP7, MySQL, Redis and grade A+ HTTPS using letscrypt.com.

A+ with let's crypt :-)

Redis caching WordPress objects
Redis caches all objects from my Wordpress instance, also it will cache my API calls from third parties (though with expiration). NGINX does both static file cache, also gzip compression etc.

In comparison of my previous webhotel, can now do "what I want" (within reason). Let's say I want a failover cluster, then I just make a new "droplet" (virtual server) and I do some configuraion for a failover cluster. I moved my domain to theire DNS, so I can have full control in one place.

NGINX is a great server, but I would also like to try this setup:
NGINX (reverse proxy) > Openlightspeed > Redis

OR:
NGINX (reverse proxy) > Apache > Redis
In my latest example I would want to use mod_pagespeed in apache, as this is pluggable. In NGINX you have to compile it your self, so it's a bit more work when you are upgrading NGINX and have to compile dependencies.

I'm running NGINX with HTTP/2, compression, cache etc. It flies! It's so much faster than regular hosting deals. Of course it's more work to get it up and running than just uploading files to a shared webhost.

If you want to try digital ocean today, use my referral link please :-)

>> Digital Ocean (DO), <<

Also remember to find your place with lowest ping:
http://speedtest-sfo1.digitalocean.com/

For me AMS2 was fastest and had lowest ping, ping is by all means the most important factor when it comes to internet services, as a high latency will give a slow page even though it's very light and optimized to fly.