Chat, multi user and DB functions without a server?

Hi all,

I am fairly new to Corona and coding in Lua. I have been looking around and researching the topic of doing a multi player game with a chat box, and of course database functionality.

I have checked out Parse and the Together service etc.

I guess my question is (in summary) isn’t there a way to have this functionality through PHP and Corona? Also, why can’t I seem to find anything on that subject? Am I barking up the wrong tree? Kind of lost here…

On all of the services and posts I’ve read so far it seems as though you need a dedicated server with root access etc. which I don;t have (Yet - will and can get if I HAVE to).

Anyway, just checking - I also am just learning SQL and PHP all at the same time :) 

Cheers!

Just a quick follow up - I am leaning toward using Digital Ocean and Noobhub, however before signing up I just thought I would ask if there was a way to do multi user and chat through PHP instead.

Thanks.  :wacko:

Hi.

So, i think i have all things what you need to use. (Own server, lot of own api for corona, scoreboard, chat plugins with api, etc…)

We can make a deal, because seems like you can use few of my services, and all time i need testers. (For other services also).

So just write to me what exactly you want to create, and we can develope your own api, i can give a server access for you. And maybe you can also help to me with other testings/usings…

But, shortly the answer to your question: i think one server is needed, and few api (php, mysql access), then without any problem - can work online - multi (node) and chat…

PHP is simply web scripting.  You send an HTTP request.  The PHP script does what it does and sends back data.  The start up time for HTTP requests is fairly long in networking terms.  It’s also a Connect-do work-disconnect type service and you are constantly paying a high price for that initial connectivity.  Even then PHP needs a “service” to connect to that would handle figuring out what other users are supposed to see the messages.  PHP can do this communications but it’s not necessarily the best way.

Services like noob hub, pubnub, Photon Cloud are designed for that kind of real time data passing.  Corona SDK should be able to connect directly to their servers, bypassing the need to do this with PHP.  If you really want to write socket level code, then you can.  Corona supports Lua sockets.

Rob

@service()

Hi thanks but we now have a server and thanks to Rob’s REST API tutorial :

http://omnigeek.robmiracle.com/2012/04/15/using-corona-sdk-with-rest-api-services/

I was able to set up the database and a few other simple PHP things.

However, a live chat still eludes me… if you have some sort of chat API I would like to take a look at it. I would like to be able to do a chat without having to subscribe to a “service”  :stuck_out_tongue:

Let me know!

Cheers.

@Rob

So the “start-up” time for HTTP requests is already causing a *slight* lag on my app, although I think it is fine - I’m just being picky - maybe!?  :wink:

Yes noob hub, pubnub, Photon Cloud are sounding better all the time, I don;t know if I wan to get into the whole LUA Sockets end of things quite yet. But perhaps I will look more into it… how hard could it be right!?  :huh: 

Cheers!

What if it wasn’t “real-time” per se just saved on a remote server / database and kind of “fed” to the chat window in it’s own sweet time, using a sort of timestamp or index in the database? I don’t know  - just thinking “out-loud” here.

I suppose anything is possible (as I am learning more and more about Corona - AWESOME! by the way!), but perhaps this would put a really large undue stress on the App’s performance?

LOL

Just a quick follow up - I am leaning toward using Digital Ocean and Noobhub, however before signing up I just thought I would ask if there was a way to do multi user and chat through PHP instead.

Thanks.  :wacko:

Hi.

So, i think i have all things what you need to use. (Own server, lot of own api for corona, scoreboard, chat plugins with api, etc…)

We can make a deal, because seems like you can use few of my services, and all time i need testers. (For other services also).

So just write to me what exactly you want to create, and we can develope your own api, i can give a server access for you. And maybe you can also help to me with other testings/usings…

But, shortly the answer to your question: i think one server is needed, and few api (php, mysql access), then without any problem - can work online - multi (node) and chat…

PHP is simply web scripting.  You send an HTTP request.  The PHP script does what it does and sends back data.  The start up time for HTTP requests is fairly long in networking terms.  It’s also a Connect-do work-disconnect type service and you are constantly paying a high price for that initial connectivity.  Even then PHP needs a “service” to connect to that would handle figuring out what other users are supposed to see the messages.  PHP can do this communications but it’s not necessarily the best way.

Services like noob hub, pubnub, Photon Cloud are designed for that kind of real time data passing.  Corona SDK should be able to connect directly to their servers, bypassing the need to do this with PHP.  If you really want to write socket level code, then you can.  Corona supports Lua sockets.

Rob

@service()

Hi thanks but we now have a server and thanks to Rob’s REST API tutorial :

http://omnigeek.robmiracle.com/2012/04/15/using-corona-sdk-with-rest-api-services/

I was able to set up the database and a few other simple PHP things.

However, a live chat still eludes me… if you have some sort of chat API I would like to take a look at it. I would like to be able to do a chat without having to subscribe to a “service”  :stuck_out_tongue:

Let me know!

Cheers.

@Rob

So the “start-up” time for HTTP requests is already causing a *slight* lag on my app, although I think it is fine - I’m just being picky - maybe!?  :wink:

Yes noob hub, pubnub, Photon Cloud are sounding better all the time, I don;t know if I wan to get into the whole LUA Sockets end of things quite yet. But perhaps I will look more into it… how hard could it be right!?  :huh: 

Cheers!

What if it wasn’t “real-time” per se just saved on a remote server / database and kind of “fed” to the chat window in it’s own sweet time, using a sort of timestamp or index in the database? I don’t know  - just thinking “out-loud” here.

I suppose anything is possible (as I am learning more and more about Corona - AWESOME! by the way!), but perhaps this would put a really large undue stress on the App’s performance?

LOL