Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8861735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:33:26+00:00 2026-06-14T15:33:26+00:00

I’m working on a Swing GUI application that among other things, functions as a

  • 0

I’m working on a Swing GUI application that among other things, functions as a database client that reads and writes to a MySQL database.
Currently I implemented the interaction with the database using JDBC (as instructed here: http://www.kitebird.com/articles/jdbc.html), which directly connects to the database by specifying the explicit database host name (IP address).

This works fine as long as I run the GUI client application on a PC which is a part of the organization’s local network, and thus I can reach the MySQL database by specifying the IP address of the machine it’s deployed on.

But I wonder what is the proper way of implementing the interaction with the database if the GUI client application to be run on a computer that’s outside of the organization’s network (communicating over the internet)?

The two ways I could think of are:

  1. Configure the database server machine to be available on MySQL’s default port (3306) over the internet, and then I would be able to continue connecting to the database from the GUI client application by specifying the database server’s IP address.

  2. Create a web service (probably REST API based), that would run on the database server machine, and function as a middleman between the GUI client and the MySQL database.

I suspect the correct way is the second option, using a web service, but I don’t have any experience in implementing any.

So my bottom line question is:

What is the correct way to implement communication with a database over the internet, and if it involves using web services, where should I start? What are the common libraries or frameworks that are used for implementing such things?

Thanks a lot to anyone who had the patience to read all this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T15:33:27+00:00Added an answer on June 14, 2026 at 3:33 pm

    Sounds like a big task, and I’m not sure there are any easy answers. You most certainly should not expose connections to your database to the internet, as that would be a powerful vector for potential attackers.

    A web service would be a very good solution to this. The Java standard for RESTful webservices is JCR (JSR-170), the reference implementation for which is Apache Jackrabbit (http://jackrabbit.apache.org/). Its pretty easy to set up, and there are various options for securing such a service.

    Edit: No thats wrong! I meant JAX-RS and Jersey (http://jersey.java.net/). Sorry!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
Let's say I'm outputting a post title and in our database, it's Hello Y’all
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.