Is it possible to transfer data from a server to a client (phone, computer) without OS integration

is there any way for the server to push some data to the client, wirelessly and smoothly, what could be a Windows (Phone), iPhone, Mac or Android device without any OS integration?

If so, what is the best design template for this and what are the best technologies for this?

+4
source share
6 answers

Push technology is simply a server methodology that initiates data transfer, not a client requesting a server from it.

Apple makes push technology relatively easy to use by providing such functionality built into the OS. And also Android through Google Cloud Messaging for Android . Windows, however, does not.

Apple push notifications and Google messaging for Android seem like magic and / or functionality that the OS should handle; however, this is not necessarily the case. The advantage of being “integrated” into the OS is that the infrastructure handles the functions for you.


Technically speaking, push technology is a long-term connection from a client to a server that receives messages. These messages will be considered migrated messages because the client did not make an individual request for them.

The main thing to keep in mind when implementing push technology is that the client responsible for the maximum possible preservation of this long-lived compound. Because client IP addresses can change between disconnections, servers do not guarantee that the client address will be constant on disconnection. In addition, clients can connect because of the firewall, which makes it impossible for the client to access the client.

In comparison, pull is a more traditional process of connecting a client to a server and requesting data.


Your best bet for Apple iOS will use the push notification service .

For Android devices, you must use Google Cloud Messaging for Android . In addition, you can create your own background service for processing messages; here is the guide .

For Windows (at least for desktop computers) must create his own service to fulfill this obligation. Here's the MSDN guide explaining how to create a Windows service using Visual Studio (VB and C #). It is possible that frameworks have already been created that process such messages in Windows, but I don’t know anything.

+1
source

If by "OS integration" you mean "write special code for each platform", then the answer will be negative.

As you mentioned, you need file system access and background processing. This combination is currently not available in a cross-platform manner.

If as a result of "OS integration" you meant "not waiting for Apple / google / ms to provide an opportunity," then the answer will be yes / possible.

All popular platforms have support for push notifications and support for background processing, if you encode it as each platform expects.

But access to the file system will be limited by the restrictions that the platform imposes on you. For example, in ios and win8 (phone), there is no need to write or read a file outside the native file structure of native applications. For security reasons, you cannot access the file system of other applications.

UPDATE:

The general template here is to release an application for each platform that you want to support. The application will register using the appropriate platform push notification service.

You will write generic server-side code to receive the data that you want to click on all your client devices. You will then call the appropriate push API for each platform you support, causing client devices to wake up and run the application that you provided for a response.

When the application opens, you will receive an application to contact your server and download the full data "push notification is just a call for your application"

This way, you can easily determine how your devices received data.

Each specific application on the platform must store data in its local storage and provide a way to share data using methods supported by the corresponding platform.

On iOS, it can be as simple as supporting the Open In .. paradigm. On W8Phone, you will have to publish data through one of the available “sharing agreements”, and so on for each platform that you want to support.

This is a common template at the moment. There are some reservations. On iOS, the application will automatically launch when a push notification is received. This means that your application will only download all data when the application is opened by the user.

The mobile application also cannot work in the background indefinitely. This means that after the application starts, you have a limited window for push notifications, which will be automatically processed by your application. After the allowed "background time". The application will close, and any push notifications will sound the device, but will not open the application until the user closes one of the notifications or opens the application directly.

+1
source

Use WebSocket (with or without socket.io ). In the future, you can use WebRTC.

Using Websockets is very easy to set up. The client (a user agent, such as a browser or WebView) connects to the Websocket server via http (s) (less problems with firewalls) and that it is. There is a bidirectional socket with an event-based API.

+1
source

Technically, you can use XMPP Libraries designed to implement a chat system (msn, gtalk, facebook chat, etc.), but it can work well as a push message system because it is open source and well built to handle all cases you never thought of. You can also host your own server and send a push message this way ...

0
source

Why not use a web service? In my previous project, I used webservice to deliver data from mysql database. The web service I used was nusoap. On the client side, I used the kSoap library for Android. Hope this helps.

0
source

if you want to receive and send real-time communication between the server and the client (regardless of the device or OS), I highly recommend using XMPP technology, because it is designed for those things that you are asking for.

Extensible Messaging and Presence Protocol (XMPP) is an Extensible Markup Language [XML] application profile that allows real-time structured but extensible data exchange between any two or more network entities. The core XMPP functions defined in [XMPP-CORE] are the building blocks for many types of real-time applications that can be overlaid on top of the kernel by sending application-specific data in specific XML namespaces.

http://xmpp.org/rfcs/rfc6121.html#intro is the last RFC to give you a good starting point.

0
source

All Articles