I am trying to get my local sqlite db up and running on GAE. According to this post, there is no way for me to get my local db up there directly. That's why I would like to do something like this:
I get the sqlite db up and running on my dev server with this: http://code.google.com/p/gae-sqlite/
Locally, I translate the db scheme into django model and migrate the db into GAE db.
I use google's way to get my data up to GAE.
So here comes my question. Is there any project that is able to directly translate sqlite db scheme into django model directly?
If not, I guess I will have to write up a code gen.
Thanks
gae-sqlite (now superceded by built-in sqlite support) is designed to run the development appserver backend on sqlite for speed and reduced memory consumption. It doesn't let you import or use your own sqlite schema in App Engine.
You need to dump your data to CSV files, and use the App Engine bulkloader (which you linked to) to bulkload them into the dev_appserver and production environments. Alternately, it is possible to bulkload direct from the sqlite database, but that's a lot more involved, and probably not worth the effort.
Related
I made a website that uses a sqlite3 database, and I'm trying to get my program on AWS using elastic beanstalk. I've been googling, but can't find any instructions/tutorials on how to get a sqlite3 database running on AWS. Does AWS support sqlite3? Is there some trick to making it work? And if not, what do you recommend? Many thanks.
You can refer to the documentation below which will help you to get to the Beanstalk console and add the SQLite3 to the AWS. This is for the MySQL but you can change the database engine to SQLite3 from Database settings.
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.db.html
I am not entirely sure whether this is possible because I have not done it before, but I'll point you in the right direction.
There is documentation that shows you how to get started with a custom Amazon Machine Image (AMI) for your elastic beanstalk environment. So what I would recommend doing is:
install sqlite3 on an EC2 instance,
configure sqlite3 to your requirements,
ensure the instance starts the sqlite3 service on boot,
create an AMI of the instance,
follow this documentation:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.customenv.html
Please let me know how you go and I may be able to help if you get stuck along the way.
It would be epic if AWS released a service/ intermediate server for it. I love SQLite.
However, the problem is that SQLite ~ does not support transactions over NFS. I actually tried storing SQLite on AWS EFS and then mounting EFS from both AWS Lambda & Batch, so I hit this wall organically.
Given that cloud environments are largely multi-machine/node, you really start to see the benefit of a server-based approach like PostgreSQL.
I have a simple question if someone can use the H2 Database while development with spring boot and Spring Data JPA and after completing the development, shifting to database like oracle .?
You can use the in-memory database for production considering the limitations.
From Spring Docs (31.1.1),
It is often convenient to develop applications by using an in-memory embedded database. Obviously, in-memory databases do not provide persistent storage. You need to populate your database when your application starts and be prepared to throw away data when your application ends.
https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-sql.html
It is IMHO OK until you need to do some performance testing. Performance of H2 is worse than that of, e.g., PostgreSQL and Oracle.
I'm trying to make a facebook application that stores some user data in a database. What kind of databases can I use if I'm using Heroku? Can I use SQLite?
SQLite is the one database you can't use.
Heroku will give you a 5Mb Postgres database for free with your application (assuming it's a rails application). There are addon providers for mySQL, Redis etc or you're free to connect to you own database outside of Heroku but beware of the latency that you will experience.
I have a database in SQLite format in my local HD. I would like to get the database up to GAE so that I can use it to create certain cool web-apps. I have browsed around for a way to do it. However, mostly the projects available are to backup the database in GAE to my local HD. Is there an existing way to get the local Sqlite db up to GAE already?
There is no way that you can do it directly on appengine, as writing to a file is restricted in appengine . I would say, you should export your sqlite database file to some common format like csv , design the model similar to sqlite table schema. Then write a script to load all those sqlite records into dev_sever (development env included in sdk), Then you can easily upload the data from local developement server to google appengine. Have a look at this to know how to export development server data to appengine.
You can do this with the Google Cloud Storage service (https://developers.google.com/storage/). Your application can read write to files stored in the Google cloud storage, so it is possible to put sqlite files there and read from and write to them.
I am creating an application using Grails Framework for which I plan to use the database which is provided by Grails.
Just wanted to be sure of the advantages/disadvantages before proceeding.
Does using the internal database invite issues?
Thanks!
By default, Grails has an in-memory database, which means, that whenever you shut down your application, all your data is lost... probably not what you want.
You could change this to a file-database, and this file-database would by default end up in your Grails application root. If you deploy this to an app server and undeploy again, your data is lost... again, probably not what you want.
I would recomend installing a MySql database. It's easy, and you have your data separate from your application.
The internal database is an in-memory database, so all your data disappears when the server is restarted. It seems very unlikely that you would want this behaviour for a real application, so I recommend MySQL, Postgres (or similar) instead.