Parse-server: Can we use Parse Server for Real-time app?

Created on 6 Mar 2016  路  17Comments  路  Source: parse-community/parse-server

As the tile said, please let me know if I can use parse server for real-time app?

Most helpful comment

I am still waiting for LiveQuery for Android. Do you have any plan for it?

All 17 comments

Yes IMO you can. Parse has beforeSave - afterSave hooks. You can for example easily send a push notification. However I think some real-time features are missing. I would like to see in the SDKs a way to be immediately notified when an event occurred (using web socket - socket.io ? )

Hi @lastMove I have used beforeSave/afterSave in my cloud code but sending a push is not really "real-time". And yes, I was asking about real-time like socket.io. Do you have any idea?

As far as I know, this isn't really Parse-Server's problem space. Although now that you can set up your own parse server, it's quite easy to integrate a separate real-time service like Pusher or PubNub. And of course, this would integrate well with events happening on your Parse Server like object saves etc. Or if you want to host your own, since Parse Server uses Node as long as you have control of that environment you could setup your own socket.io based service.

Yes you can do it this way. However in Parse there isn't _yet_ true real-time features.
If you are searching a mbaas mainly for real-time features you may like firebase (It the main - only ? - advantage of Firebase over Parse).
Hope it helps.

I wonder if we can use parse server and install real-time package? I don't want to use other service (E.g: firebase)

+1 for websocket integration. I think a websocket feature would add an essential functionality for modern apps as realtime is becoming more important with tighter social integrations. Also for scaling apps it is push over pull for resource efficiency. While websocket integration is possible today by integrating another service additionally and using existing Parse cloud code triggers, it may be too complicated for beginning developers, which were attracted to Parse in the first place because of the easy integration.

@mtrezza Yes+ I'm doing a messaging app. Push notifications just aren't realtime enough. I want to grow with parse since I started mobile dev with it. Needs to support realtime functionality asap. Today's apps demand it.

I believe with the Parse Live queries, you can now: https://github.com/ParsePlatform/parse-server/wiki/Parse-LiveQuery

Yep! With the launch of Live Queries it's now possible to make real-time apps with Parse Server

is Live Queries functionality a scalable solution? How many requests it can handle ?

@gowridev you can horizontally scale parse-server and the live query, as described here in the wiki:
https://github.com/ParsePlatform/parse-server/wiki/Parse-LiveQuery#scalability

Is Live Queries an elegant solution for real time messaging iOS app that needs to support push notification (while app not in use) and messaging feature like "user is typing", "seen" ? and what about real time audio and video chat ? If not is there any good third party SDK for real time chat (text, video, audio, images...) that works (tested) with self hosted parse server ?

@tunidev Live Queries can very well be used for a "user is typing" indication. It is designed as an instrument to push changes of any collection or field of your Parse Server tables to your client instead of the client continuously pulling for changes.

It is no substitute for push notifications because Live Queries require the app (and it's web socket listener) to be in an executing state. Live Queries is also not a tool for live audio or video chat / streaming as this requires specific components such as STUN or TURN servers. There are a number of 3rd party SDKs for live audio / video chat for various platforms. They should work with Parse Server since many of they require little to no integration of other services to work, e.g. with twillio.com or sinch.com.

@mtrezza Thank you for your useful replay, Let's say I will go ahead with sinch, does using Live Queries makes sense in this situation, and how to coordinate with both of them, should I still store the messages and user and all the data with parse and use Sinch for real time communication ?

@tunidev How you use these instruments and where you store your user/chat data depends an many factors, e.g. your application logic, limitations of 3rd party features, cost aspects, migratability, etc.

Maybe a good approach for you is to separate your app idea into single features. Then think about what are the essential features that you need to get together to create a minimum viable product that you can launch. Then compare the available SDKs in terms of prices, scalability, extensibility, etc. and what makes sense based on features you might want to add later on.

If you want to build a simple video call application you will probably not even need Parse Server or Live Queries because some SDKs allow you to store user login information as a feature. Same for chat messages, some SDKs offer that including the storage of chat messages and a "user is typing" indication as a feature. That's why it's important that you first figure out exactly what you want to build and then look for the right tools.

I am still waiting for LiveQuery for Android. Do you have any plan for it?

Hi, I am trying to write an app in the .NET Framework that lets users chat to one another in real-time. I have explored many ways to try and do this, such as Rx.NET and other services that allow for constant operations to occur indefinitely at a time interval, but I need a more elegant solution, because executing a time interval by definition is not "real-time", and also, the operation hogs a hefty amount of system resources in certain cases, which is generally unwanted. How would I be able to use live queries and cloud code to make real-time a possibility for my app? I know people earlier in this issue thread have mentioned that they have created such apps, but how? I could not find any relevant client-side documentation. Thanks!

Was this page helpful?
0 / 5 - 0 ratings