I've just set up my vps, and thus decided its time to dig into that misterious world of RDC and databases...
So, from what I could gather, I have two choices...
RDC
PHP
The first implies running an extra server that will listen to incoming requests, the second is somewhat more limited in its capabilities... (please correct me if needed...)
So for a completely novice in this kind of stuff, I need you to help me help myself...
Based on your description it sounds like you have implemented something similar to RDC. RDC is useful if you want to connect clients to a remote database.
You just need to set the SQL commands in the configuration file and it will work.
There is nothing wrong with using a different or custom implementation (or if you want to reinvent the wheel ). Use whichever tool you like...
- There are B4A, B4i and B4J clients available.
- Can also work with B4R over MQTT.
- Tested and used by many users.
- Supports queries and batch inserts.
- Supports many column types.
- Clients can parse the data asynchronously (https://www.b4x.com/android/forum/threads/demo-rdc-v2-fully-asynchronous.61775/#content)
- Can be extended as it is a simple B4J program.
Thanks Erel. The only problem suffered so far was the DB disconnection due to inactivity, solved following your indication to use ConnectionPool.
I really hoped in a good excuse to start experimenting with RDC.. ok, I'll find something else to play with in Xmas days!
No, it's not time yet to unwrap B4i
UPDT: I should have waited a couple of minutes more before posting..eheh
I think the best solution depends on what you want to achieve. RDC is good if you are able to keep all your code within the B4X environment. If however you want your server to support multiple clients using different platforms then a bespoke approach implementing restful web services and using JSON (for example) is a better approach.
If however you want your server to support multiple clients using different platforms then a bespoke approach implementing restful web services and using JSON (for example) is a better approach.
RDC (jRDC2) is a regular web server implemented with B4J. If you want to support non-B4X clients then you can easily extend it and use JSON or whichever format you like.
The thread title is a bit confusing. It should have been B4J web server vs PHP.
RDC (jRDC2) is a regular web server implemented with B4J. If you want to support non-B4X clients then you can easily extend it and use JSON or whichever format you like.
The thread title is a bit confusing. It should have been B4J web server vs PHP.
I think I need to update my project to jRDC2. Just need to find the time and inspiration. It works fine with original RDC from B4A. Why fix what isn't broke?
I see the benefits... If only I could clone myself to help out - like Erel has (somehow)...