Comments: Game server or App server?

Definitely would want IN, but dont want to use your testing slots while I cant dedicate enough time to it. Hopefully next week. Kerem’s been great at letting us know the progress

Hey, you guys are just too nice. I’m just like a kid in a candy (can I still use the word without being sued? :slight_smile: store.

Its great to work work with Coronium. I still have to learn more about the core Coronium features. So far I’ve been toying around with the MySQL integration and I am more than impressed. Floored is more like it. It is unbelievable how much time and headache it saves you if you used the traditional route of writing PHP code which executed an SQL statement and returned JSON which you downloaded in your app and decoded etc. Coronium is gold. :slight_smile:  

@develephant is certainly onto something real big here. Thank you very much for putting in all this effort. It is much appreciated. 

Well, a group of us is working on a turn based MP game for almost a year now. We were considering parse or photon, but decided to go with parse because photon is far too expensive for a small indie developers.

Parse basically offers all we need, from custom game logic on their servers, to cloud storage, leaderboards, etc.

I can only speak for myself, but I would love to use something like parse but in Lua lang. That service would have to provide for custom code at least for us to switch.

Anyway, Corona Cloud should have been all that, but they dropped it. I really hope you make something out of your project, but I’m just looking what’s right for me. And that would be great for me, and for my team as well :slight_smile:

@c0ppo Please feel free to leave your “wishlist” in the Coronium Google group.  At the very least I’ll try to provide a tutorial for it.  More specifically though I can get you a test instance if you want to play with the cloud code and storage features.  If you’re slightly interested in using it in your project, I’ll be happy to help in any way. 

Thanks for the feedback.

Cheers.

I’ve already joined. And I’m gonna contact you via pm here in about 20-30mins about my project, since cornium seems like an ideal platform in my case. Parse is excellent, but not so easy to get everything working the way I want it to :slight_smile:

FWIW - Apache HTTPD supports using Lua as a language, too.

http://httpd.apache.org/docs/trunk/mod/mod_lua.html

I use it for my game server. I do everything in Lua server side. Uses MOD_DBD - so you can use any datastore.

Basically, if you can do it on Apache HTTPD, you can do it with mod_lua.

What’s really cool about this is since its httpd, you can throw your game server onto Heroku.

I run httpd locally with mysql under it - I use Lua Glider as my editor; and have the server files in the same editor.

I can use local file storage, etc.

Just thought I’d offer this up - Coronium could be a really nice object library to run under httpd if you saw fit. It’s a heck of a lot easier than forklifting this from scratch.

The Coronium object could abstract from the storage and the presentation layer; rendering results in JSON (what I do, personally) or hand it to a view controller.

In apache, the flow happens in a function call “handle” that passes the request object in. You output to it (versus print), and return a status OK.

I do this today, now. Want to use your LUA code as REST server? See mod_rewrite.

RewriteRule ^/api.\*$ /api/handler.lua?%{QUERY\_STRING} [L]

Here’s what the code looks like. My implementation is much more complex, but you get an idea of how easy it is… and more importantly, flexible. You get Apache HTTPD + Lua. The rest is libraries.

 

function handle(req) -- Do with the request object as you see fit here -- such as lfs = require("lfs") md5 = require("md5") zip = require("zip") stringx = require("string\_ext") json = require("json\_pure") https = require("https") ssl = require("ssl") smtp = require("socket.smtp") ltn12 = require("ltn12") socket = require("socket") local responseData = {} responseData.verifyIwork = "Hello World!" if req.method=='GET' then responseData.value = 5 responseData.detail = {value=6, name="joe"} elseif req.method=='POST' then -- send to your data storage class here elseif req.method=='PUT' then -- take action on PUT method elseif req.method=='DELETE' then -- take action on DELETE method end req:puts( json:encode(responseData) ) return apache2.OK end

It has it’s quirks, since it’s a (relatively) new Apache HTTPD feature - but building on top of Apache HTTPD is likely to go a long way.

You can also do things like this:
 

local myfunction function myfunction(sTemp)     return sTemp .. " altered" end function handle(req)     local responseData = {}     responseData.verifyIwork = "Hello World!"     if req.method=='GET' then         responseData.value = 5         responseData.detail = {value=6, name="joe"}         responseData.fromFunction = myfunction("testing")     end          req:puts( json:encode(responseData) )     return apache2.OK end

@marble68 mod_lua was a almost a first choice, but I spent some time researching and the nginx implementation of Lua is production ready and much simpler IMHO.

But you are correct that the libraries are what will make it interesting. :wink:

Cheers.

So why not OpenResty?

Of course OpenResty. :slight_smile:

Coronium is more focused on being a library and server configuration that will give you the same power of something like Parse.  The other aspect is integrating systems like MySQL and PHP.  Of course Coronium gives the developer the power to use it without API restrictions, and allow for much more flexibility.

The push server, which is forthcoming, will be using PHP_GCM and easyapns as part of the stack.  The Coronium library will unify all of the pieces and make it very simple to have a powerful Lua application stack matched with a client side module.

The base stack will be open sourced as well.

Best.

I’ve joined the google group because I’m very interested to see it in action and potentially contribute. I have some libs done that once I’m done with this project, I could potentially adapt into Coronium.

I get it. Do you already have a git repository for the source?

FYI - you might also reach out to the Corona Labs team  - see if they will grant you access to the source code to Corona Cloud - the solution they used to offer. There might be one or two things in there of value to you. It’s on Git.

@marble68 Yeah, I came on kind of late, so I was never familiar with the Corona Cloud service.  I’ll take a look.  Thank you for that.

I would love to have your feedback and framework ideas on Coronium, especially since you have experience using server-side Lua code.  Can I set you up an instance?

Best.

I don’t have much time currently - I’m sprinting to finish my current project (which lives under Apache on top of MySql).

When I can spend more time I’ll get more involved.

@marble68 Excellent.  Anytime, just shoot me a message.

Best of luck with your project.  Got any links you can share yet?

Cheers.

For the most up to date discussions please use the Coronium thread.  Thanks!

Cheers.

Not quite yet - :slight_smile: I’m almost in alpha playtest right now. then a graphic brushup, then a round two; then move public exposure. 

I have to do consulting and stuff on the side to eat; so sometimes those eat into delivery.

Check out http://webscript.io for something that’s pretty much exactly this. (I’m not affiliated with those guys; I just find them really easy to work with.)

@ted89 That looks great. I wish it would have come up in my original Google search for Lua based cloud code.  Could have saved me a lot of time.  :wink:

The price is right too.  Thanks for sharing.

Cheers.

There is a Leaderboard and Tic Tac Toe example as well.  For people who have been looking for something like that.

Cheers.