Parse to parse server end to end documentation - heroku

Here I would like to document the steps involved to migrate from Parse.com to parse server which includes database migration, password reset, cloud code, push notifications etc.
There were few minor issues which are covered in this step documents. Any different suggestions are welcome

I’ve recently did migration for my apps which were hosted on the Parse.com, so thought to put all steps together here for different parts of the migrations. Parse itself has great documentation on Github, with some minor changes, you should be able to use that documentation. Here I’m covering the parts which may be questions for newbies who don’t know much about Node.js or overall backend and any issues I came across during migration. I covered below topics, each one of the link will take to detailed step document I've written on the blog.
Migrate from Parse.com to Parse server on Heroku & mLab
Hosting Parse Dashboard
Password reset & Email verification using Parse Server
Cloud code on Parse server
Push notification using Parse Server

Related

Is there a Heroku webhook for Heroku Postgres credential rotation?

I'm following the instructions in the Heroku Postgres docs for creating an external application that connects to Heroku Postgres for its data layer. The instructions mention that the credentials are automatically rotated and I must handle this myself.
I read more docs to learn about webhooks existing to help notify the rest of your system that changes have happened in your Heroku services. This made sense to me to be an area where the Heroku devs would have implemented this. There must be a webhook that exists that I could use to be notified when the credential rotation happens. I found that there was the api:addon webhook which had the update event. I tested this webhook, expecting this to be what I was looking for, but I found that it was not fired upon credential rotation. It was only fired when I provisioned or deleted more Heroku Postgres add-ons.
Since the webhook I need doesn't exist, I coded a workaround where I expect a PostgreSQL library auth error to be thrown while my AWS Lambda executes. If an error is thrown, I assume it's from the rotation and I have the still running Lambda function fetch new credentials using the Heroku API and try the PostgreSQL query again, at which point it works unless there are other errors. I tested this while manually rotating my credentials and it worked okay, but it's kind of ugly code. See here for a detailed example.
So at this point, I'm wondering if the webhook I'm looking for does exist and I just wasn't able to find it. Or, if it doesn't exist, I would like to request it as a new feature. I understand that the Heroku team may not want people picking their add-ons a la carte, and they want people to use the entire Heroku platform, but I think it would add a lot of value to the Heroku platform. Personally, I've enjoyed getting into more and more cloud services as I learn since I'm usually able to choose them a la carte. For example, AWS doesn't forbid me from only using S3 and nothing else from them. They do as much as they can to make it easy for me to link my applications to it, no matter what other cloud services I use.
I contacted Heroku directly to ask if this type of webhook existed and I received a useful response from them:
There isn't a webhook specifically for credential rotations, although
with a bit of logic you can sort of recreate the same thing. Whenever
you Postgres credentials rotate, it will trigger a new release, which
does trigger a webhook. You can use that to inspect the release via
the API to determine if the values changed.

How to set local database for google safe browsing update API (v4)?

I am building a service for checking for phishing or malware URLs for one of my applications. This service will be running on google app engine. Now, I want to use google safe browsing's Update API (v4) to have local database of URL hashes. But I am having hard time to understand the setup process of the local database they have mentioned.
https://developers.google.com/safe-browsing/v4/local-databases
They do provide a Go source code to do something of this sort but its not descriptive enough to have my own implementation.
I want to setup the db on google cloud itself. Can anyone point me to any good documentation or some ways to do the same if you have tried this before.
you can use:
"https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?key=" + apiKey;
to download hash version database.
you may need send a post request to get the database according to https://developers.google.com/safe-browsing/v4/reference/rest/v4/threatListUpdates/fetch

Migrate parse installation object to firebase

I have an app which uses Parse and I want to migrate it to Firebase. I was extended the parse installation objects to send customized push notifications. I'm wondering if I can migrate these parse installation objects to Firebase and use it from Firebase.
There is no cookie cutter click-though way to import an app that uses Parse.com into Firebase. The products are too different for that.
There are however migration guides for developers looking to migrate their iOS and Android apps on the Firebase site: https://firebase.google.com/support/guides/#migrating_from_parse
There is also a repo with parse-migration-tools from Firebase: https://github.com/firebase/parse-migration-tools
Finally have a look at this question, where experienced developers chimed in already: How to migrate data from Parse.com to Firebase
[Disclaimer: Former lead of Parse Push. Author of parse-migration-tools]
I'm a bit nervous that you're out of luck if you're referring to "installation Ids". Firebase supports iOS and Android. Android devices aren't going to be easy to port for a few reasons, though iOS can be done without too much work. Let's break it down by the push backend:
Most people who talk about "installation Ids" are talking about Parse's self-hosted push network (PPNS or Parse Push Notification Service). This is hosted at push.parse.com and will go away in January. There's nothing anyone can do to keep those devices connected. As an FYI you'll also realy want to update your apps to disable PPNS because it will likely drain your customers' battery when they have a background service repeatedly trying to connect to a URI that isn't going to exist anymore.
If you're using GCM directly, you're still out of luck actually. Parse uses a version of GCM that's too old to work with Firebase. I tried to help fix it, but we weren't able to upgrade to GCM v4 and keep the Parse design style. The new Firebase SDK makes it possible to fix the issue and keep the Parse design requirements, but I'm far too overextended to build this right now. If someone wants to grab a shovel, I'd be glad to explain the right design.
iOS will actually work. I intended to make this turnkey in parse-migration-tools but won't have time until the end of the year. Firebase Cloud Messaging has a batchImport API for importing iOS tokens. I also wrote support for batchImport in parse-migration-tools to help you import your devices (and other data) faster. If I were migrating Parse Push from iOS, I would personally write a migration and bulkImport function that used batchImport to create GCM tokens and subscribed Parse Channels as FCM topics (note the batchAdd method; it may help you more efficiently do your initial import).
This should do the trick:
https://firebase.google.com/docs/cloud-messaging/ios/client#import_existing_user_apns_tokens
You can just importat all of the existing users device id's and FireBase will generate unique id's for them.

looking for Parse alternative server

I'm a hobby developer that use Parse.com as my database and website host, as Facebook is going to shutdown Parse.com, I'm now looking for alternative Parse server.
I use Parse's Cloud Code Hosting to build Dynamic Web App, and Parse itself to store data collected from the website I've build, with custom Cloud Code to help getting and managing data. I've build a Windows Phone app for myself to manage the data I've collected too.
Is there any alternative server that has my requirement?
Dynamic Website
Database host
Custom Cloud Code (with BeforeSave and AfterSave trigger)
with Windows Phone SDK (or REST API if doesn't have)
Very thank you for helping me!
Try out Hasura.
Hasura (http://www.hasura.io): Hasura is a neat PaaS + BaaS solution. It is now competing with Firebase, Kinvey, Heroku et al. There is a full comparison page here: Compare | Hasura (https://compare.beta.hasura.io) . The difference majorly lies in infra ownership as well as no tech lock-in due to open-source components(like docker, kubernetes,postgres) building the major chunk of the platform. Check it out. There is also an option to explore (https://explore.beta.hasura.io/) Hasura by building your own blog web app and a todo app in under 15 mins.
Hasura should fit in perfectly for your needs.
DISCLAIMER : Hasura Engineer here.
I'm using Simbla website application development. It doesn't support all of your requirments but it has great UI builder with a backend parse database.
You can try using the parse open source server it has cloud code and you can use a custom database with it.

Using Parse after Installing Parse Server

If I follow the directions and install the Parse server via Heroku and MongoDB, will I then be able to continue to use Parse commands in my code for current and new apps?
That is, will following these instructions allow me to continue using Parse for in-app purchases, data storage, and push notifications, or will I still have to learn the ins and outs of a different backend service?
Thanks,
Eli
After you set up the Parse Server via Heroku and MongoDB, you will be able to use most of your current code, with some slight modifications. In your client apps, you will have to point to the new server location in the Parse initialization.
As of right now, Parse server does not support in-app purchase verification, as far as I know. Right now it supports:
CRUD operations
Schema validation
Pointers
Users, including Facebook login and anonymous users
Files
Push Notifications
Installations
Sessions
Geopoints
Roles
Class-level Permissions
More information is available at the Official GitHub for Parse-Server including setup instructions and a quick setup button for Heroku

Resources