I have one misunderstanding with Deepstream.io. It has both NodeJS SDK (which can make client for deepstreamHub from my node application) and NodeApi, which allows to install deepstreamHub as npm package. Why do we need both of this options? When should I use each of the option?
For example, I have existing realtime node app, which uses socket.io as transport layer. And I want rewrite app and migrate from socket.io. What option should I use? Install deepstream as a package in existing app and call my app logic in RPC callbacks, or install standalone server on computer, then install deepstream.io-client-js in my app and also register my app logic as RPC callbacks, using ds.rpc.provide ? I do not understand difference of two approaches
It looks like there is a misunderstanding between deepstreamHub[1] (the cloud platform) and deepstream[2] (the standalone server).
If using deepstream the server, you'll likely need to host it yourself on a cloud provider (AWS, Azure, etc). With deepstreamHub you get given an application endpoint which you can connect to and a dashboard to manage your application permissions, authentication methods and data.
Either way you'll need to install the deepstream.io-client-js module in your application, you can then connect to your server or your application endpoint (if using deepstreamHub).
After this you can register app logic as RPC endpoints and proceed to write your app logic as normal.
[1] (https://deepstreamhub.com/)
[2] (https://deepstreamhub.com/open-source/)