I was creating an android app (actually a game) with customised Cocos2d and I was planning to add in a chat feature. kind of like a counter-strike where other players can send short IM to each other (I think the clash of clan's clan chat comes closest to what i want to make, you can get an idea from that)
I was trying to use AppWarp API to do this, but am finding it hard to do so. I liked appwarp because it handles server management on its own. I don't wanna get into implementing a XMPP/Smack customised code where scalability becomes an issue later on, because i dont know server management at all! (although i would love the freedom it gives me). Did i mention that its a two man team? Me and a friend :).
In my game in I need one global room (a static room) and an another special-group room (this will be dynamic, since its only created if the user selects to create the room).
But the problem with creating a dynamic group room in Appwarp is that it doesnt stay alive (remain persistent) after all the users in it have disconnected. According to the current implementation in the API, the dynamic group gets deleted if the last member logs out.
Q1) Is there a way for me to create a persistent/static room from client side? Q2) and if that isnt possible is there some way i can make the dynamic rooms persistent? Basically i'm asking anyone who has experience with Appwarp, If it requires some tweaking with the code can you please point me out in the right direction?, or is it not possible at all?
Q3) Also, i wanted to implement a chat history feature on the chat rooms. Is that already available via Appwarp API? or would I have to write a listener, so that each time a room receives a message it maintains a history file? Again this is only possible if the user can re-connect to the room.. Please guide me for this too.
Also,supposing i have to drop Appwarp idea (Gulp!) Q4) Can you please point me in the right direction to create a group-based chat with a similar api that can be integrated with an android app with cocos2D.
Currently creating static rooms through the API is not possible. However providing such flexibility is part of AppWarp's plan.
AppWarp doesn't maintain chat history on the server side currently. This is again something we are looking in to as it has been requested by other developers as well. Keep an eye on our blogs (http://blogs.shephertz.com) where we announce our updates.
We expect to release these features by early October.
Related
How can I show real time database changes in a flask website?
Like on_update and on_insert, the data will be pushed to the website for the user to see.
I want to get alert from an IOT device and insert it to the database and the users who are subbed to that device should get the real-time alerts.
So I thought
>IOT detects
>HTTP POST to database
>Flask App detects the database change
>push to clients on web app and android
I made a web app that queries the DB with flask-sqlalchemy but thats it, these are supposed to be real-time alerts! I'm so frustrated it's been a week. I am going nowhere and I feel so lost now.
>polling
>web sockets
>SSE
>flask sse
>use AJAX
>use JQUERY
HHHOOOOOWWWWW?????? Most of the examples are for chat apps, and I see NO method where you listen to database changes and send it to clients ;(
A very easy way to implement this is using an event SaaS like pusher.com. This should get you set up in no time. They have examples for many different languages and it should fit your need perfectly.
You mention that you see so many chat-apps as examples. This is pretty normal as they are almost the "hello-world" of event-based systems. And that's exactly what you are looking for. An event happens and you want to trigger something on that event.
For chats, the event is: "The user entered a message" and the triggered action is: "Display it to every connected/subscribed user".
Next to a hosted service like pusher.com, you can roll your own. All the required technology are free and open standards. You could use websockets or WebRTC for this. Websockets is easier but it's trickier if you have many open channels. On the other hand, WebRTC scales but it's a bit more complicated to set up. But you won't need video or audio which makes it easier.
You mention "polling" and I am not sure whether you mean "normal" polling or long-polling as in Comet. That is of course an option. It is the easiest solution, but not the cleanest.
SSE seems like a valid option as well. Although I have no personal experience with it yet. But it seems like it's designed for this use-case.
AJAX and jQuery are less related. AJAX is just an umbrella term for programming using XmlHTTPRequest and is used in all solutions mentioned above. jQuery is just a JS framework and is completely unrelated to the task.
long story short: All your mentioned options allow you to do this. I would suggest looking at pusher.com to get started. And their examples have exactly what you need. Their free plan is already really generous for personal projects. If your application outgrows the free plan you can either pay, or roll your own solution.
I am working on a review submission project on Tendermint in Windows.
I want to submit a tamper-proof review about a organisation and hence want to create a private block-chain network with no validators and say 5 users, who submit their review via android app through abci-cli to the private blockchain.
Can anyone guide me how to proceed with this. I am new to this whole topic and very confused about where to start.
I got this How to create a Tendermint local network with same ip
but want to run say 5 user accounts from different mobiles and Tendermint on 1 laptop(to create Blockchain). What I want to build is possible?
Any help is appreciated.
First of all, if you want to create a tamper-proof review system, you'll need as many validators as you can have, not just one. You need them because it's straightforward to hack one validator and exploit your system. But if you have many validators, it's not so easy (given they are independent - different data centers, racks, ..). The whole power of blockchains emerges from having a large number of separate machines which can't easily be hacked.
Second, you can have as many users as you want (of course, there is an upper limit on how many txs per second Tendermint can process).
Third, it's better if you use native Android API to send transactions. Tendermint has 3 HTTP endpoints for transactions (https://tendermint.github.io/slate/#broadcasttxsync).
I'm making a chess game,playable from both, an android device as well as a web browser.I will take input from user in a UI, & processing of that input-updating gamestate should happen at backend/application server.The response from server goes back to UI which displays the new gamestate.
Now my question is, what are possible options for application server I can explore to actually do this ?I'm not asking which is best or likewise....I just want to know what application servers are there which I can use to make my game.
I've made a similar application in netbeans using glassfish,but this time, I want an android device to be able to communicate with server too, so I'm confused how to approach this.
I've already tried google play services,but additional data about player,his statistics,etc needs to be stored client side,which I dont want.
Please suggest some alternatives.
The situation: I have many real life locations with specific information associated with them, and updated frequently. I am unsure of how to store this information for use in an android application.
My original thought was storing the data on some server/cloud source/database, reading from the server from each Activity in the app to make sure the info is up to date, and update the server with any changes that may or may not have been made.
For example: there are 200 people inside the library, one person leaves.
So we would read the number of people from the server, display this on the app, person leaves, subtract one, send the new number back to the server.
Would this be an incorrect approach? I'm fairly new to Android in general, and I really have no experience on how to approach this type of situation, what services to use, etc.
I would look into using Parse, its a pretty sweet way to power the backend, and their website is very detailed in explaining how to use it.
I am pretty new to the mobile end of development so forgive my naivety.
I would like to know if it's possible to have a structure/distribution model like the following:
Master App (has many "middle-man" instances)
!
!
Middle-man ( can customize data, look & feel, via web app and redistribute)
(has many end user viewers)
!
!
!
End User viewers( can download and install middle-man abc's app with middle-man's custom info)
Is this possible? I have searched around for quite a bit but perhaps I am searching the wrong terms?
I was thinking perhaps a couple options, let me know if it's sounds wrong.
Option 1 - Middle-man provides a special key code and end user types it in after installing the app to unlock it thereby storing the unique middle-man ID and displaying only their custom info. User only needs to enter code once. relation is stored in mysql perhaps??
Option 2 - create a build of the master template for each middle-man and provide the binary/install link along with a customized ini file to load correct ID? Or something to that effect.
Any better options out there? Something that allows for upgrades/new features to be passed down to all the instances easily.
Will this type of thing have any problems with the apple store if multiple middle men decide they want it on the app store?
Maybe I'm making it more complex than needed and could just use a simple "require login" for each end-user and the end user is tied to that middle man some how?
\The app could also be android app depending on middle-man requirements
Thanks in advance for any advice or links to helpful info.
If i had understood your question right, its a straight forward mobile app tied up with the backend.
User credentials for the middleman which shall associate with your
special key code.
Associate your actors(users) with roles and permission over accessing
content in the backend.
Your mobile app will pull the content only associated for the logged
in user.
Apart from this, you can store the content for offline etc.. Take phonegap approach and it pretty much does what you wanted to do.