Use Android Push Notifications in Local Area Network - python

So, we are building a solution which is containerised using docker-compose and we have a flutter app with it. We plan to use it both on the web as well as on a local server away from the internet. Are there any ways to set up notifications to the application without having to rely on an outside service ? Ie , a notification service that can be dockerized and run without an internet. The mobile app can shift between the main server and local server , so what way can we achieve this?

Related

django , node js, php website hosting and domain information

I would like to about Django, node js, and PHP hosting along with MySQL database.
how can we host them online, please suggest to me some websites for that? can I host the Django website with MySQL on GoDaddy, Bluehost or do I need to use cloud services like AWS Azure, etc?
how to set up a domain for these websites.
what is the difference in hosting the website using
can you host these website on a Cpanel and is there any other way also to host
The choice is really yours, you can install all of them on a single VPS server which
should be powerful enough to run them and you need to configure your Nginx or Apache2 to access them on a proxy level or with a different subdomains, or you can host them on separate servers, when you will get the domain you need to point it to your server(s) or create a reverse proxy which in turn will reflect another domain. Platforms like Azure provide more control over DevOps. Cpanel is just a tool that allows you to have more simple the process of hosting a web site. Some platforms like Heroku make the hosting process much more easier, you just deploy your code and its running like a charm no need to configure anything or install certificates, the only downside is that when you would want to scale your app the resources are stupid expensive at Heroku. I would prefer a VPS server over all of these, because of more control and flexibility.

Making django web application accessible from other machines without deploying to a cloud

I have a django web application and normally, it works on AWS but one of our customers wants to use this web application on localhost because of the security. Also he wants to use this application with more than one computer on the same host. How to make a roadmap for that without sharing source code?

How to connect to flask server from flutter app after build?

I have my flask app which would serve my flutter app using HTTP requests. Everything is okay when the mobile phone is connected to the PC. But once after we deploy the app to the mobile phone and detach it from the PC, how would the flask app serve the flutter app?
Is there any way which would start the python script when the flutter app is launched in the mobile phone?
for testing purpose you can use ngrok to deploy your flask server, for more info ngrok
Your phone when connected to the PC is accessing a Flask app via 'localhost'. You have two options to make it work (i.e. access Flask based REST APIs from the mobile when not connected to the PC).
Expose Flask app to the network. And make sure both PC and the mobile phone are on the same wifi. This link might help for that.
Deploy the Flask based APIs somewhere. There are few free web servers available out there (e.g. MS Azure). This or this link might help.

How do I update my web app features in the linux server? web app is build with Python, Flask, uwsgi and server nginx

I am new to Python development. I am building a test Python app and already deployed into a web server and accessing it through public IP. Now I have updated the source(that is added some more models and templates), Now I want my public IP under port 80 should show updated code.
How do I do this?
if you have used any sort of version control, it's just commit and push/pull to the server.
if not, you have to copy the code, paste it in the server, restart the application and it work's with new code.
best approach is make a service, deploy the code with git version control, run the service and you are good to go. service will start automatically in case of system-restart and such.

Connecting iOS app to Windows/Linux apps

Background:
I am just about to start development on an mobile and desktop app. They will both be connected to a local wifi network (no internet connection) and will need to communicate with one another. At the outset we are targeting iOS and Windows as the two platforms, with the intention of adding Linux, OSX, and Android support in that order. The desktop app will largely be a database server/notification center for receiving updates from the iOS apps and sending out the data to other iOS apps. There may be a front end to the desktop app, but we could also incorporate it into the iOS app if needed.
For the moment we just want the iOS app to automatically detect when it is on the same network as the server and then display the data that is sent by that server (bonjour like).
As far as I see it there are two paths we could take to implement this
Create a completely native app for each platform (Windows, Linux, OSX).
Pro: We like the ideas of having native apps for performance and ease of install.
Con: I know absolutely nothing about Windows or Linux development.
Create an app that is built using web technologies (probably python) and create an easy to use installer that will create a local server out of the desktop machine which the mobile apps can communicate with.
Pro: Most of the development would be cross-platform and the installer should be easy enough to port.
Con: If we do want to add a front-end to the server app it will not be platform native and would be using a css+html+javascript GUI.
Question:
My question is how would implement the connection between the iOS app and server app in each circumstance.
How would I receive and send notifications over a local network.
How could I connect to the server using NSURLConnection if it does not have a static ip?
I hope this is clear. If not please ask and I will clarify.
Update 09/06/2013
Hopefully this will clear things up. I need to have a desktop app that will manage a database, this app will connect to iOS devices on a local wireless network that is not connected to the internet. I can do this with either the http protocol (preferably with a flask app) or by using a direct socket connection between the apps and the server. My question is which of the above two choices is best? My preference would be for a web-based app using Python+Flask, but I would have no idea how to connect the iOS app to a flask app running on a local network with out a static ip. Any advice on this would be appreciated.
Without any details of the application or frameworks its hard to be more than vague and point you in the right direction. If you have already explored Bonjour/Zeroconf to connect the iPhone to the server, I'd keep looking down that path.
The first place to look is PyBonjour for how to broadcast the server from Python. Although there are a few issues in how to configure this on Windows vs. Mac vs. Linux, this will be slight. For example, for windows the user will need to install Bonjour for Windows, where as Linux users will need Avahi, but most of this can be setup durin install.
Secondly, look at the Bonjour documentation for iOS, which will be much easier as its all built into the system and APIs. From here both server and client are discoverable to each other.
The last issue is determining if you want the iPhone to connect to the server or vice versa, and how. These however are basic networking decisions that more or less subjective.
Since you've indicated a preference for web development, you could easily have the iPhone connect to the Flask server and retrieve details from the server using HTTP/HTML technologies.
With regards to notifications, unless a change in data by client A means that client B absolutely needs to know about the change in data, I would not worry. The next time client B connects to the server, the correct data can be push through at that point rather than worrying with notification services. If another client does need to know about a change, another solution may just be regular old email that advices them, and prompts them to open the app.
I would definitely suggest a webapp. And the answer to your questions are given below:
How would I receive and send notifications over a local network.
Use a REST based web service to communicate with the server.
You have to use polling to receive data:-(
How could I connect to the server using NSURLConnection if it does not have a static ip?
If possible configure a domain name in your network which points to server ip. (Configure local DHCP to give same IP to your server every time based on mac address!)
Have a IP Range and when the app starts, try to reach a specific URL and check if it is responding.
Ask the user to enter the server IP every time the app starts!

Categories

Resources