Android Question MySQL best practices

udg

Expert
Licensed User
Longtime User
Hi all,
less than a week ago I downloaded the trial version of B4A and found it a superb RAD tool (now I can finally figure out a few uses for my tablet..).
Following several threads devoted to the use of MySql remote databases I'm now facing a tough decision: which method should I use? which is the "best" approach to interact with a remote MySQL db?

I saw references to:

1. Remote Database Server (ok, not yet realesed but sounds like the way to go)
2. Remote Database Connection (actually the suggested approach?)
3. HttpUtils2 + PHP (older but widely used)
4. Contributed libraries/modules: DBMySQL+MySql Tunnel, MySQL library..

I understand that each problem has its "best" solution, but what I really need to know is on which of the above methods I should spend my time over the next few weeks. (BTW, I know that I need to buy the full product to use any of the above solutions, but that is an easy step since I surely will!).

TIA for any comment/suggestion

udg
 

realblue

Member
Licensed User
Longtime User
Hi udg,

I use web service to access remote database (either Oracle or MS SQL Server). In order to use web service I use HttpUtils2 library. Basically you form your SOAP request, submit it and in the JobDone event get the JSON result.

So if you use this approach first you need to implement a web service which there are some examples in this forum too.

Hope this gives you some idea, happy programming.
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Upvote 0

udg

Expert
Licensed User
Longtime User
Well, thank you for clarifying the point.
And many thanks to realblue too, who shared his experience with me.

Now I only need to place my order for the full product...
 
Upvote 0

coslad

Well-Known Member
Licensed User
Longtime User
Hi udg,
Consider that Java server have a cost, not less than 200$ /year, instead php solution is in most case free.
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Hi coslad,
good point. I believe we should discriminate based on the app goal and audience.
For testing I generally use a free webhosting solution where a HttpUtils2+PHP will be easy to deploy.
Maybe for something more "pro-like" an hosting providing java server could be a better approach expecially since erel seems to favor this solution in terms of efficiency and speed.

Anyway, just googling for "hosting java server" I found a $6/mo (http://www.mochahost.com/java.php?gclid=CML8rsDjibkCFYdf3godT3IA0g) that should fit the RDC requirements. Is there anything special I've to look for?

TIA
ps: Moderator,please, if references to product/services are not allowed in the forum, just wipe that out. Thanks.
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
You should make sure that they provide SSH access. Without it it will be difficult to run RDC.

mochahost states:

WE SUPPORT SSH ACCESS (RESTRICTED, ADDITIONAL RULES APPLY)

We allow SSH access only after review of the request which needs to have valid reason.

In addition before we can activate SSH we require:

  1. Valid reason for granting SSH for your account
  2. Copy of government issued ID faxed to 1 408 351 0116
  3. IP from which the SSH will be used
  4. We support SSH only for IP based - Business & Mocha & all Reseller plans
  5. Telnet connections to our servers are not allowed
Please note that this is a temporary access only - the maximum allowed time is 24 hours.


We need SSH to start the server and edit config file?



 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can edit the config file locally and update it with FTP. However you will need SSH to start it.

You should ask them if you can somehow start a Java process without SSH. You will also need to open the relevant port in the firewall software.

A single VPS server can be used with multiple RDCs. Maybe you can group together and take a VPS account.
 
  • Like
Reactions: udg
Upvote 0

Harris

Expert
Licensed User
Longtime User
One last thing...

Does RDC server need to be stop/started after each config change, or will it load the config on each connection?

Thanks
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Maybe you can group together and take a VPS account.

Maybe you could host a VPS and charge us for sign up? I would be willing to pay (reasonable amount) for a developer account. It would be small and just for testing and development purposes.

Of course, I would need to load my MySQL database and have my config file to match. "A single VPS server can be used with multiple RDCs" - but how many? When we are ready, we shall purchase our own hosting domain.

Something to consider... I for one certainly like the concept of RDC. Simple, secure and fast.

Thanks
 
Upvote 0

dualznz

Member
Licensed User
Longtime User
thank god i never hit this stage i just went ahead and got a VPS server, best thing you can do ever, no shared nonsense and limited access
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
thank god i never hit this stage i just went ahead and got a VPS server, best thing you can do ever, no shared nonsense and limited access

Who did you go with? How much do they charge? Can you manage it with SSH? Is it a Windows or Linux server?
I have my own WAMP for testing here at home.
 
Upvote 0

dualznz

Member
Licensed User
Longtime User
the servers that i have are all linux based vps with full root access.
but i pay big amounts of money as im hosting a few servers.

but i also run servers here at home as well which alot of my android and IOS stuff talks to, mainly MSSQL
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Erel, Harris (and others interested),
if you ever come to setup a VPS to test RDC-based apps count me among its users.
Coslad, in message #7, referred about an hypothetical (I guess) $200/year fee for a java server and since the MochaHost's offer is about $6/mo it will suffice to have three or four of us adhering to such a service to cover the costs.
What I mean is someone very competent (you know who I'm tinking about..) could buy/setup a server for the rest of us and this should cost him about $200/yr so with just 3 or 4 users his costs will be covered and from that point on each cent more is pure earnings.
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
[quote="From my experience it should cost at least $40 per month."[/quote]

Starting New Thread.. "Who Wants to Share a Development (or production) VPS?"
 
Upvote 0
Top