Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm currently using Firebase as a prototyping tool to showcase a front end design for a documentation tool. In the process we've come to really like the real-time power of Firebase, and are exploring the potential to use it for our production instance of an open source/community version.
The first challenge is version control. Our legacy project used Hibernate/Envers in a Java stack, and we were previously looking at Gitlab as a way to move into a more "familiar" git environment.
This way?
Is there a way to timestamp and version control the data being saved? And thoughts on how to best recall this data without redesigning the wheel (e.g. any open source modules?)?
The real-time aspect of something like Firepad is great for documentation, but we require the means to commit or otherwise distinctly timestamp the state or save of a document.
Or?
Or is it best to use Firebase only for the realtime functionality, and implement Gitlab to commit the instance to a non-realtime database. In other words abstracting the version control entirely out to a more traditional relationship to a db?
Thoughts?
Both options you offer are valid, and feasible. In general, I'd suggest you to use firebase only as your real-time stack (data sync). And connect it to your own backend (gitlib or custom-db).
I've went that path, and find the best solution is to integrate your own backend db with firebase on top. Depend on firebase exclusively for everything, and you'll hit walls sooner or later..
The best solution is to keep full control on your data structure, security and access models, and use firebase where needed to keep clients in sync (online and offline). The integration is simple.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm sorry since I'm new to this.. I'm currently working on my startup which basically like food delivery system and I used Flutter for my app. I learned Flutter using Firebase as a backend. However, there are many sources that recommend use MongoDB as a backend database which I have zero knowledge about it. But I think that MongoDB just only offer for database crud operation. So I think for the database crud operation my app should use MongoDB. However, I think MongoDB is quite complicated when it involves authentication. So, which is better approach for me? should I use Firebase for authentication and MongoDB as the database or is it better to use only one platform for the backend whether its a Firebase or MongoDB? If I mix these two, does it will affect the pricing? Is there any ways that can make me clear which to choose.
MongoDB is an open source NoSQL database management program, which is quite useful for working with large sets of distributed data. It is mostly useful for big data applications and other processing jobs involving data that doesn't fit well in a rigid relational model.
It is an absolutely right approach to use Firebase Auth for just login or signup and the rest on MongoDB. There are 2 ways you can implement the Firebase Auth:
1. Using the SDK provided by Firebase
2. Using the Admin Auth API
You may select any of the above two approaches to save your UID on your custom Backend which might be MongoDB.
Contrarily, Firebase can also be used as backend. It provides the back-end server, a great database and analytics solution, and useful integrations with other Google products. Its free to use, affordable subscription options, wisely designed backend solution guarantees project scalability and data security makes it a great choice for backend.
However, for the vast majority of apps and use-cases, Firebase is an excellent choice. You can start with its free tier and don’t need to worry about maintenance or scalability. It’s great for small to medium developers as it allows them to lower initial costs while focusing on providing the best user experience.
When working on a heavy real-time app like chat, or some other highly collaborative experience, Firebase is still an option, though it might be a bit pricey.
However, the recommendation is always to consider your budget, the required feature set, and how much maintenance you’re willing to do on your own before making a decision.
You might also refer to this documentation, which will guide you with the pros and cons of choosing Firebase as backend.
Flutter: can I mix Firebase Auth with Mongodb Databases?
Check this similar post. If you still have doubts, feel free to ask.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Today I read about how DocDb now supports MongoDB api's. Does that mean we will be able to use it as the backend for a Meteor project?
I know from seeing some of the user list traffic that getting Meteor to accept any other database than MongoDB is quite problematic. However, now that there is another vendor selling the same api, perhaps we can get some competition into the mix?
http://techcrunch.com/2016/03/31/microsofts-documentdb-now-lets-you-use-your-mad-mongodb-skills/
I assume that you are asking because DocumentDB just came out with MongoDB driver-level protocol support. However, I don't think that's enough to use DocumentDB for Meteor Apps, at least not in production. The main reason why not has to do with the way Meteor uses MongoDB's oplog tailing. A Meteor application installs itself as another "secondary", that way, changes that are written to the primary are automatically sent to the Meteor app which then decides what end users need what updates and sends them using the real-time transport mechanism built into Meteor. It's very efficient and results in getting real-time user behavior for free.
Since that particular interface of MongoDB's is undocumented and essentially unsupported, DocumentDB does not implement it.
That said, there is a fall-back mode for Meteor that does not use oplog tailing. It's not considered appropriate for production, but it just might work with you plugging DocumentDB in on the back end using MongoDB driver support. It all depends upon whether or not DocumentDB implements all of the MongoDB protocol features used by this Meteor fall-back mode.
Also, there are several other experiments to plug in different back ends to Meteor. I think all of require low-level modifications to Meteor itself (as opposed to just a plugin) and I don't know of any that are used in production. And, if you got it to work, without some eventing system (like MongoDB's oplog tailing), it would never be performant.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
My boss asked me to develop an order system for our company's salesmen. Our company has almost 100,000 items to sale. In order to improve the performance, we will ask salesmen to download all data from sql server to iPhone local sqllite one time per week, and build index.
I'm a windows mobile developer, and it's very easy to use RDA to download data from sql server to local sqlce. The size in windows mobile device is about 20M.Now I need to do the same thing in iPhone.
I'm a newbie at iPhone development. Please give me some ideas about this project.Any input will be appreciated
Here is some information on using SQLite in iOS: iOS offline data storage tutorial
You'll probably need to export the DB as SQL and download it from the server, then import the SQL into SQLite.
As another answerer suggested, you could expose a REST interface on the server--assuming your server is setup to export the contents of the entire product database. Then there are any number of third party tools for importing JSON data (eg: via REST) into CoreData. Or if your REST data isn't too complicated it's not hard to parse it and directly add it to CoreData.
I personally recommend CoreData rather than using sqlite directly--iOS makes it very easy to do so. But it's also a matter of personal choice and I know lots of people prefer to use sqlite directly (especially if they want to build some cross-platform code, eg: to make an Android version which shares the same DB schema and logic).
There's probably many ways to do this, but I would go with build a rest api for the server data. Then on the iPhone side of things, make a network call to access the data.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
The goal is to build a concise SQL script to alter/update tables since changes have been made to the schema between any two points in time.
For example, I develop on one machine and on Day "A" I used the dump & restore utilities to install a database on a production machine. Then on Day "B" after making some changes on my development machine and testing them, I need to get those changes to my schema onto my production server.
Short of writing every single command I make to my schema (some of which may be experimental and undone), what is a good way to manage upgrading a schema from point A to point B (or point B to point F for that matter)?
Update:
It seems that diff-like concepts for databases are very much frowned upon with good reason. So this leaves me with new questions.
What is a simple method to distinctly manage your experimental changes from your production-worthy changes? Just keep restoring your dev database to a last known good state when you do something unfavorable?
Can postgresql be configured to log all of your actions in a way that can be pulled out as used as an update script? The reason I ask is that I enjoy working with PgAdminIII, and I would rather use that to work than to write update scripts for building or experimenting.
Short of writing every single command I make to my schema
If you want to do it in a controlled and "professional" way, there is no way around that. You should consider using a schema management tool to help you organize and run those migration scripts:
Liquibase
Flyway
Our experience with Liquibase is very good. We use it for migrations on Oracle, DB2 and PostgreSQL.
For a Postgres specific solution you might want to have a look at Sqitch
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
At work we have 4 people working together on a few different projects. For each project we each have a local copy we work on and then there is a development, staging, and live deployment, along with any branches we have (we use subversion). Our database is MySQL.
So my question is, what is a good way to manage which revisions to the database have been made to each deployment (and for the developers their local copies). Right now each change goes into a text file that is timestamped in the name and put into a folder under the project. This isn't working very well to be honest.. I need a solution that will help keep track of what has been applied where.
http://odetocode.com/Blogs/scott/archive/2008/01/30/11702.aspx
The above blog brought us to our current database version control system. Simply put, no DB changes are made without an update script and all update scripts are in our source control repository.
We only manage schema changes but you may also be able/willing to consider keeping dumps of your data available in version control as well; creating such files is a pretty trivial exercise using mysqldump.
Our solution differs from the solution presented in the blog in one key manner: it's not automated. We have to hand apply database updates, etc. Though this can be slightly time consuming, it postponed some of the effort a fully automated system would have required. One thing we did automate however, was the db version tracking in the software: this was pretty simple and it ensures that our software is aware of the database it's running against and will ONLY run if it knows the schema it's working with.
The hardest part of our solution was how to merge updates from our branches into our trunk. We spent some time to develop a workflow to address the possibility of two developers trying to merge branches with DB updates at the same time and how to handle it. We eventually settled on locking a file in version control (the file in question for us is actually a table mapping software version to db version which assists in our manual management strategy), much like you would a thread's critical section, and the developer who gets the lock goes about their update of the trunk. When completed, the other developer would be able to lock and it is their responsibility to make any changes necessary to their scripts to ensure that expected version collisions and other bad juju are avoided.
We keep all of our database scripts (data and schema/ddl) in version control. We also keep a central catalog of the changes. When a developer makes a change to a schema/DDL file or adds a script that changes the data in some way, those files are added to the catalog, along with the SVN commit number.
We have put together a small utility in-house that reads the catalog changes and builds a large update script based on the contents of the catalog by grabbing the contents from each revision in the catalog and applying them. The concept is pretty similar to the DBDeploy tool, which I believe originally came from Thoughtworks, so you may be able to utilize it. It will at least give you a good place to start, from which point you can customize a solution more directly suited to your needs.
Best of luck!
If your database maps nicely to a set of data access objects, consider using 'migrations'. The idea is to store your data model as application code with steps for moving forward and backward through each database version.
I believe Rails did it first.
Java has at least one project.
And here's a .NET migration library.
To change versions, you run a simple script that steps through all of the up or down versions to get you to the version you want. The beauty of it is, you check your migrations into the same source repository as your app code - it's all in one place.
Maybe others can suggest other migration libraries.
Cheers.
Edit: See also https://stackoverflow.com/questions/313/net-migrations-engine and .NET database migration tool roundup (from above post).