is there a multiplatform library to connect to a r...
# multiplatform
d
is there a multiplatform library to connect to a remote mysql database?
j
Over what protocol?
d
I don't have any specific requirements, but I guess TCP/IP should do?
I guess it's not the most secure way. Any alternative for a multiplatform client? Currently I am querying the database from a webservice, and my multiplatform client connects to the webservice with basic authentication. Considering it's a CMS with very few individual users, I was considering removing the webservice layer and connect to the mysql database directly from the client.
o
Don’t do that. Don’t expose a database to the internet. Keep your attack surface as small as possible.
d
Yes, I guess you are right, there are security implications. I was really thrilled by the idea of removing the webservices layer, and make the architecture much simpler, especially now that Kotlin Multiplatform makes it so simple to build even for non-web platforms. But probably not the smartest idea.
o
It's tempting to do stuff like that, as it can reduce moving parts of an application. But databases are often complex beasts and notoriously hard to secure.