I'll help. I know Python really well, and I've used the Reddit API before too.
This flair bot should be running all the time, right? So we should put it on a server, preferably a reliable and free one. I propose using Google App Engine: https://developers.google.com/appengine/
Can someone please create a list of all possible genres, and all their possible permutations?
Coding this up seems fairly straightforward (famous last words), but I'll need a couple days to get it complete (I'm off and on busy today and this weekend). I could probably have it working by Sunday night, or latest early next week.
You must download the source files and put them in a folder named 'tweepy' in the home directory (i.e., the same directory as your app.yaml file). It'll work then.
As a side note, the only libraries that app engine supports without you having to use the source are listed here. Libraries that are not in this list must be pure python in order to work with GAE.
Hope this helps!
Consider Google App Engine. I don't use but go read does!
It's well integrated into a powerfull framework and free for small projects.
One thing to note about GAE is that the resources scale with the traffic. The resources allocated are for every frontend instance. After you start seeing latency because of concurrent requests, additional instances will be spun up. When you are renting a virtual server, you are capped at the size of the server itself.
Don't forget about the free GAE quotas. You only end up paying when you exceed the free quotas.
With regards to platform fit, it can take some time to get larger applications running on GAE because of some of the platform restrictions. If you have anything that runs longer than 60 seconds, you may need to use a backend or a task queue, which each have their own learning curve.
When you say you have lat/long for a location, do you mean GPS coords, city, or something else?
For converting lat/long to a city use Google's API. And an example.
edit: read the question wrong
edit again: put original response back
Check out Google App Engine
All Google users get 10 free web apps, and you can build them in many different languages (Python is fantastic, and easy to learn).
I'm working on a similar project. I'm using the mit app inventor and the google app engine with python.
The server takes post requests, and stores a name and value in a database and in memcache. When it takes get requests, it returns the value queried in the get request. That's all it does. (in your case, you would simply add a button in an HTML form, super simple)
If you don't have an android device, a simple python script could do this: The App Inventor app simply, using a get request, "asks" the server for a value that was stored (once every second, like snicker7 suggested) It then sends that value to whatever Bluetooth device it is paired with, such an an Arduino.
The next step is to build a GUI that sends the post requests to the cloud app. In yor case it would be a simple button in an HTML form.
The PHP option may be a bit simpler, but I just love GAE. Let me know if you want to see my code, or my app inventor project.
I thinks its here in their billing page - 'SNI SSL certificate slots are offered for no additional charge for accounts that have billing activated. Free accounts are limited to 5 certificates.' https://developers.google.com/appengine/pricing
"App Engine supports the following certificate types:
Single Domain/Hostname
Self-signed
Wildcard
Subject Alternative Name (SAN) / Multi Domain"
https://developers.google.com/appengine/docs/ssl#certificate_requirements
If you don't mind having <string>@<appid>.appspotmail.com in your email address - all you need is to listen for incoming emails and forward them to your primary one (not as scary as it sounds, 5-10 lines of code).
See more: https://developers.google.com/appengine/docs/python/mail/
If you do need to keep your "someFakeDomain.com" domain (which you own or have access to DNS settings) then you can signup with services like SendGrid, again listen for incoming emails and forward them to your primary one.
See more: https://developers.google.com/appengine/docs/python/mail/sendgrid
Python can be used to generate dynamic webpages and web applications. For example, if you want a customised home page for each user depending on his/her preferences, you can write a python program that reads the preferences from a cookie/user account data that will generate custom HTML/CSS/JavaScript to be sent to the user. A really good example of this for end users is Facebook. Google App Engine is a really good way to get started for this kind of stuff as well.
He personally wrote some of the core parts of the Python AppEngine SDK, such as ndb. IIRC his time was a 50/50 split between BDFLing Python and building things for Google.
> I suggest you ask the admins for help.
Which admins? The reddit admins? Done, I hope they get back to me.
Appspot com isn't my domain. appspot is the domain for all Google App Engine servers. Basically a hosting site. You can use it for free which, I why I chose it, but apparently spammers have been using it for the same reason :(
> However, if it is because you want to post links to your own domain, they are not likely to be sympathetic: reddit takes a dim view of self-promotion.
That's not my intention. I'm just trying to get feedback on my game in a thread that's for that purpose. The mods wouldn't be manually approving me each time if I were spamming or doing something inappropriate.
It'll cost me money to stop redirecting to appspot com. Is there any way to know if that will get me off the banned list? Or, in other words, is it possible to see if chainofheroes com is explicitly on the ban list, or is it just any site that redirects to appspot com?
Give Google AppEngine a look as well.
They're free up to certain quotas, which is great while you're in development, and they scale automagically.
I have a few apps on there. Nothing huge, they serve 5000-8000 daily visitors each, but it's really nice not having to worry about scaling. And because they have data centers all over the world, load balancing, caching and geolocation is taken care of as well. All you need to do is build the app, publish, and Google does the rest.
They're a bit pricey when you do get huge, but at the point where that becomes an issue, you should be making more than enough money to pay for a group of specialists to set up your own network (to give an example, Snapchat is considering moving off GAE to conserve cost).
To my understanding the app might have to be running off of Google App Engine API in order to use Google's mail server. I've used it with Python and it works great if you can get it set up with your application.
I suggest you use a scheduled task with cron to cache. This will simplify code and separate concerns. One script caches, cron runs it ever 10 minutes. Another delivers the cached rss to the client. https://developers.google.com/appengine/docs/php/config/cron
> what kind of costs can i expect for something like this?
Without seeing the app, it looks like you'll mostly be using data transfer quota sending the cached rss to the app. You're not remotely touching the fetch quota limit. So long as one instance can handle the number of requests for the cached rss you'll not be paying for extra instance hours either. You'll likely need quite a bit of user growth before hitting free quota limits. Assuming the app is written to not devour resources needlessly of course.
Here are some docs: https://developers.google.com/appengine/pricing
I built my android app using it. Yes it is built to be scalable and is free for at least thousands of users into the tens of thousands and then it increases slightly as you gain more users.
Just to add on: instead of using dropbox to host this page, you could look into hosting it on Google App Engine which has free daily quotas (which are probably higher than dropbox's allocation).
Not so sure about that - here are two good tutorials I've used before (I've got a small GAE site and my main side project is in bottle.py):
GAE "Getting Started Tutorial for Python 2.7": link
Bottle.py tutorial with sample application link
Both can get you to a sample application that you can start hacking around on within a couple of hours of starting. At the conclusion of either tutorial, you're doing "monkey see, monkey do" coding but you will learn enough about why stuff works (in these simple frameworks) that you can start tweaking things. If you do decide to go ahead and use python, check out the module of the week series link which is an absolute goldmine of potential building blocks...
Important: this is not a full "theoretical" CS education... this is a more pragmatic "street hacker" approach to learning how to code, focused around writing specific apps vs. learning about algorithms and theory. My main goal here is to get you to go build something that you will want to play with and improve...once that dynamic is set in motion, you will eventually learn to code by building up practical experience...
1-GAE would probably be enough, please read over https://developers.google.com/appengine/docs/quotas to make sure.
Even paid applications on GAE have certain limits in particular categories.
2-AWS would definitely be better for this type of application. AWS is scalable as well as you can spin up new instances and as many instances as you need whenever you want (for a price of course)
What have you done so far? Which docs have you read?
I search for "google app engine", clicked the first link, then went to Python->Storing Data in the navigation. Have you been here yet?
Yes, I have a couple of small apps on app engine and one runs regular cron tasks to process and cache remote data.
Edit to add doc links:
Interesting, didn't think of this. I know nothing about uploading and saving user images, but it appears that App Engine (which this program uses to check for versions) has a decent API for it, but sounds heavy traffic-wise.
I'll add it to the TODO, and if there's enough request for this feature, I'll look even more into it.
Iba a usar heroku, pero se agotaria la cuota del dyno free si lo dejo corriendo constantemente. Lo que voy a hacer es setear en Google App Engine una aplicacion que corra con un schedule: https://developers.google.com/appengine/docs/java/config/cron?hl=es
I just did this yesterday. I started with
https://developers.google.com/appengine/docs/go/#Go_Introduction
to get Go and AppEngine up and running locally.
Then I installed Gorilla Mux http://www.gorillatoolkit.org/pkg/mux to help with the routing. Then you can begin building out your API. I can try to help if you have more specific questions. Good luck!
I would recommend starting with Google App Engine. It's a free Platform as a Service, which means it handles all the server setup and maintenance for you. You're only concern is your code.
It uses a framework called webapp2 but you can switch to Django in the future if you want.
Whatever server/framework you use, you will need to use HTML to create a user interface.
Try Codenvy. I found it because I was looking for a program that worked natively with Google App Engine, which it does. It's not perfect, but it does everything I could ever want. It stores all my files, allows me to easily back them up, I can login using Single Sign-On using my Google account, and it's one click to upload to Google App Engine. All from the browser, all for free.
Here's my thoughts on the different types of storage provided by Google App Engine:
Cloud SQL provides a relational database for the times you want MySQL features. Cloud SQL requires running servers just for storing your data, and therefore can be a lot more pricey.
Cloud Storage is more for storing immutable objects such as images and files.
Cloud Datastore is made for storing mutable objects like messages, users, etc. This interface provides a much easier way of storing dynamic data and is the main solution for your data storage needs on App Engine.
Since your project will be storing information such as text, you should go with the <strong>Datastore</strong> (Java). It's very easy to save/update/delete data and can be very customized with the design to be efficient for your application.
>Any recommendations on what should be a starting point for me to start learning how i can use App Engine
A starting point is the Google Developer docs. There is a ton of documentation on the Datastore and reading the documentation will get you familiar with it.
>needs to sync with a Website interface also
Is there any reason why you can't use App Engine for the interface too? You can use App Engine to design the entire web application as opposed to just storing the data.
Hope this helps! - Ben
I got frustrated with the varying and out of date documentation I was finding but I was finally able to get up and running following the guide here: https://developers.google.com/appengine/docs/java/endpoints/getstarted/backend/write_api. It will probably take a considerable investment to get everything wired properly, so be patient. It should work once you've got everything configured properly.
That's interesting, does sk automatically delete video after a set period of time or does it retain all uploaded user content? (sorry, not a user of sk)
Assuming monthly 20TB of network egress you're looking at monthly bandwidth costs of $1,955.84 on Google
I don't know how much data you have stored and the monthly costs of that, so I can't calculate that using gcs/s3.
I'll pluck a (lowball) number out of thin air and say you have 20TB of content in videos, images etc. And that you perform 10 milion each of class a and class b operations.. So, to store that on google cloud storage that's $642.48 per month.
For the web server i'd use google app engine, as then you don't have to get involved in the creation and maintenance of multiple web server vm's and it costs a lot less. For the db again i'd use google cloud sql as you again don't need to be messing around with all the headaches and it costs less.
As to that pricing, that's a bit hard to calculate without really being in your shoes. My best guess would be that in total everything together would be $5000 a month. (assuming a second dr site is not created with dns failover)
Fun stuff! Do you use aws exclusively for sk then or is it a mix of different providers? I've been mulling putting together a site myself for a few months now.
I have only used aws etc for mostly small work related projects as most of my work has been the hardware is bought for the project i'm on and hosted across a few data centres rather than use something like aws. (by the way, never use verizon caas... it's awful)
You could check out google app engine (I recommend the python backend). It requires some additional configuration for hosting webapps, but you'll also get some cool features (datastore, simple users implementation, templating, other python libraries, streamlined deployment and local testing, etc) and take advantage of Google's CDN. If your site doesn't have terribly high volumes of traffic it should be easy to stay on the free tier.
No love for Google App Engine? The power of Google's infrastructure is free to use 1GB up and down daily, see resource quotas. One of the most undervalued and underutilized PaaS in the space. I'd be happy to contribute to your resource page, just link me to the repo :)
This got me part of the way: https://developers.google.com/appengine/docs/python/cloud-sql/django
And this covered most of the rest: http://dev.pippi.im/2014/02/10/create-a-blog-in-minutes-on-app-engine-with-django/
How do you feel about newer technologies like Google Apps for Education? It's,
Free, even for 850 employees
Accounts for each and every student as well, if desired
30GB's of offsite storage for email/documents for each and every employee (and students)
Email, Calendars, Chat, Video Conferencing
Accessible everywhere on almost any device, only requires a web browser. No other software to install or maintain.
Marketplace of education apps
All controlled through a single web interface that allows for multiple subdomains. You can split up schools and then split up staff and students. You can then add departments within the subgroups.
Can easily be connected to Google App Engine applications which has access to Linux VM's, MySQL databases, and has the ability to program in Java, Python, and PHP.
Accounts can be controlled through the control panel, meaning you can whitelist, blacklist, set home pages, and even setup access to wifi and Google cloud ready printers.
The control panel can even be used to control Chrome O/S devices like Chromebooks and Chromeboxes. On managed devices, you can control almost every aspect, even whether or not the USB ports work.
For users that still need Windows to run certain software, just setup VM's and connect through Chrome Remote Desktop.
I can't imagine the amount of staff and time it takes to hold together the old Windows AD networks in a large distributed network, which you must have with 850 employees to manage. Do you feel that these newer technologies would eliminate to many IT jobs or that any idea of change would be instantly squashed by the older staff who want to retire before they have to learn something new?
Thanks for your reply.
I had tried both approaches OAuth tokens and directly with user name password but neither approach worked.
I think it is not possible to connect to google's servers from GAE using PHP as per:
https://developers.google.com/appengine/docs/php/sockets/
Under limitations it says:
"Private, broadcast, multicast, and Google IP ranges (except those whitelisted below), are blocked"
I gave up on GAE and used a regular hosting service
Thanks
I tried Go, it was just to unsupported in Google App Engine. Google App Engine's PHP implementation is incredible. I am currently working on two major projects both utilizing a Computer Engine and CloudSQL (just MySQL in the Cloud).
Hi there, I have solved the issue in the meantime.
First I used ext.api.files API (which is deprecated now) then i moved on to GoogleCloudStorageClient ( https://developers.google.com/appengine/docs/python/googlecloudstorageclient/), which has a lot more utility.
They also provide open() managers and retry handling, for tests everything needed is a urlfetch stub.
Hm. I know google app engine provides free web app hosting, but php support seems to be listed as a "Preview" feature. I'm unsure whether that means it's unavailable to everyone but you can look at the API which is subject to change, or it's available and the API is subject to change.
In addition, you would need to use google datastore, rather than mysql. It's a non-sql database, but you can access it with sql-like commands.
Take a look, it might be good enough.
EDIT: Just took a look at your post. Apparently you haven't coded it yet. So yeah, if you're willing to use Pyhon/Java and google's datastore database to make the webapp, this is exactly what you want.
The 5th one isn't free (Gondor) and one of the bigger options that is free isn't included (Google AppEngine). GAE even includes django for you.
I'd say check this out for AppEngine Database in Python: Tutorial.
The subdomain that it suggests is just a suggestion. You can definitely edit it if the one that perfectly matches your question is taken. Or is that not what you meant?
I did check it on a bunch of mobile devices. Thanks for finding a bug! What page doesn't look so good?
Can you use a deferred task? Those have a 10 minute time limit, instead of 60 seconds
If you need more than 10 minutes to run your process, you will either have to chain together tasks (re-queue itself before 10 minutes, or only process x number of records each requeue), or use a dedicated backend
For full-text search on Google App Engine, you should look into https://developers.google.com/appengine/docs/python/search/
Tutorial: https://developers.google.com/appengine/training/fts_intro/lesson2
Regarding scaling, since it's in Python/Django, you can probably host it on Google App Engine using django-nonrel. This would greatly simplify things like availability and scaling (though, you are beholden to Google's prices if it gets popular. But it wouldn't go down!).
I like the idea of making it Starbow-independent, too: there's no reason you can't use a similar system for Starjeweled teams, or that soccer strikers game.
I thought about doing this too, glad to see people acting towards it :D
It's on the Socket Python API overview in the announcement on the top and under limitations and restrictions. I may have been doing something wrong if you got it working. It worked locally, but when I uploaded it to appengine, I got a ton of errors.
The client end sends. That's linked above. Data can be encoded in the URL itself or in parameters appended to the URL.
Receiving and responding works pretty much the same way on any server framework, and if you really don't want one of those, you can do it in bare Python too. If you're totally new to this and have no idea what you're doing yet, I'd suggest Google App Engine, mostly because comprehensive, hand-holdy video lessons are awesome. If you don't want to go through that, the API is pretty simple too. Plus, hosting is built in.
They have a "Getting started" tutorial for each supported language. Here's the one for Python (others in sidebar).
The documentation can be kind of overwhelming I agree. I recommend just doing the tutorial and if there's anything you don't understand, skip it completely and come back to it later.
For example I initially looked at one of the pages for the datastore documentation and found the example code confusing. I looked at a different page on the site and the example code was fine.
Ignore the app engine interface/settings on the Google site for now. Download the SDK and run the App Engine Launcher. That will let you easily create and upload apps.
yes and no.
Throughout the app experience, I'm storing the game data in a javascript object, and that object gets serialized to JSON and stored in localStorage on every change.
There is a problem with localStorage in iOS 5.1 where it doesn't persist across a full app restart, though. The good news is that PhoneGap 1.5+ implemented a workaround where they persist localStorage elsewhere and restore it for you, and you don't need to do any additional work.
Finally, the app does have a currently-hidden feature where it can post and restore the JSON versions of games to a datastore on Google AppEngine . It works, but it is currently disabled because I haven't implemented any form of authentication yet - so all games would be public/shared right now if it were on.
I think I can use memcached. Would that make a huge difference?
I am a little worried about hitting the max MySQL db connection if I looked up the DB everytime someone requested a page. If I store the result in a file, would it take significantly longer to parse?
Do you know if I can use Google App Engine to handle the database work for me?
I have a reseller account on a shared server. The service has been really great in the last six months, 99.9% uptime, 150ms response time on average.