As you may already know, Parse has announced that it is winding down its service, and it will be fully retired on January 28,, 2017. This gives Developers plenty of time to move away from the Parse hosted solution. The Parse team has also released Parse Server, an open source Parse API Server which makes it possible to serve the Parse API from any infrastructure that can host Node.js applications. Parse Server provides a way for you to keep your application running without major changes in the client-side code and also lets you use the Parse client SDKs with entirely new applications that have no dependency on the Parse hosted services.
With all these resources to make migration as straightforward as possible, many developers are still left with headaches as they now have to wrangle with the complexities of server-side infrastructure, configuring the Parse Server and updating it with bug fixes and also managing and scaling databases and indexes. If you are one of the thousands of developers in this situation, don’t worry, as you can continue to run your Parse applications same way you are used to with NodeChef’s platform.
In simple terms, NodeChef’s managed Parse Server is like Parse’s hosted solution. No prior experience with managing a Node.js application and MongoDB in production environment is required. NodeChef takes care of everything required to run and maintain peak performance for your app.
Follow the steps below to migrate from Parse’s hosted solution to NodeChef’s Parse Server hosted solution.
Step 1. Create an account
The first thing you need to get started with NodeChef is sign up for a free account. You will receive an email to confirm your account. Click on the link in the email to activate your account.
Step 2. Deploy your Parse Server
- After you have activated your account, Login to the Dashboard.
- In the dashboard, Click on ‘Deploy’
- Complete the Parse Server form with the name of your application. If you want to keep your existing Master Key and Application ID from Parse, you can provide these values. If you leave the fields blank, new IDs will be generated for your app. Client Keys are not a requirement for the Parse Server.
- Click ‘Launch Parse Server’ button at the bottom of the page. NodeChef will automatically request cluster set up, provision cluster resources and create your Parse Server.
Step 3. Export your data from Parse to NodeChef
- To migrate your data, you’ll need the MongoDB connection string to your app. Navigate to the Task Manager in the NodeChef dashboard. In the Actions column, Click ‘Database Connect’.
Check the Enable SSL button and click Save Changes. After the operation completes successfully, retrieve the connection string from the dialog box and use it to migrate data into your new cloud database. An SSL enabled connection string will end with the sequence "?ssl=true".
On startup, the parse server creates the classes _SCHEMA and _USER in your mongodb database. You will have to truncate the database before you can proceed with the migration as parse.com will not migrate any data to a database already containing these collections. You can truncate your database by clicking DB actions and then truncate database.
- Go to the new Parse dashboard > “App Settings” and click on “Migrate to external database”.
Provide the connection string from Step 3 above.
Click the “Begin the migration” button.
You may get a warning message that the latency between Parse and your self-hosted MongoDB is more than 20ms. Be not alarmed by this message. Our databases are also hosted in the US East geographic region, just not in the same datacenter as Parse. You will not experience any performance issues.
The tool first takes a snapshot of your existing data and transfers it to your NodeChef hosted database. Next, it will pause to allow manual verification, while continuing to keep things in sync with writes that are coming in from your live app. While you are in this state, your app continues to read and write from your Parse hosted database.
Once the database is migrated, connect to your NodeChef hosted database and browse through the collections. Check the collection counts and do a few spot checks to ensure that your data migrated successfully.
Use the web-based, Parse Dashboard for powerful data browsing and manipulation. Navigate to the Task Manager. Locate the ‘Actions’ column, then click on the App Actions drop down. Locate the ‘Parse Dashboard’ link and click it. This will open the Parse Dashboard in a new tab.
Step 4. Point client to your NodeChef Parse Server
Update your client to point to the location of the API that was set up for you in Step 2 above. To retrieve your API endpoints, navigate to the Task Manager. Under Actions column, click on 'Keys' to display information about API and hosting endpoint, as well as your Master Key and Application IDs
Step 5. Test your app
Test your app now that it uses the NodeChef backend.
Step 6. Publish your app
You can now publish your app, which utilizes the NodeChef backend. You should encourage users to update to the new version of your app.
We urge users to carefully read through the documentation on configuring Authentication, Push and NodeChef CLI, Cloud Code hosting, Static Asset hosting, Setting up routing and redirects, setting up custom domains, Requesting Lets encrypt SSL certificates, uploading custom SSL certificates, integrating NodeChef add-ons like Advanced Search, building reactive apps using NodeChef query tailing, and SQL select for analytics.
NodeChef is here to support the Parse community, and we will continue to monitor and vet best practices and new tools. As these expand, we will also be expanding this tutorial, and other resources to help users adapt to the new landscape. If you are interested in getting help with this process, or learning more about your options with NodeChef hosted Parse Server, our professional services team is here to speak with you.