i must write small java database application with several tables. With this i've some experience and may get it done. That might be on a single machine.

From somewhere on internet, using their company machine it will need to be easy to connect and inspect some database queries in SWING GUI. That network part is by using what i don't have experience. What might be best method to accomplish this task? I want some general directions here and perhaps good quality links with good examples to review. Issue is i'm kinda short as time passes here.

From the browsing i saw probably the most simplest option would be for connecting direcly from distant machine directly with JDBC with ip:port way. Like 111.111.111.111:55 But that leaves DB really unsecure.

I have find out about electrical sockets, however i dont observe how that can help.

Now, i have seen people mention Hibernate and VPN however i thinks that's large amount of work. Yet others mention web servers, however i have absoulutely no clue how that actually works.

So, what's optimal solution inside your oppinion? Ideas, suggestions, recommendations?

Thanks ahead of time, Martin.

JDBC motorists might have different arguments for his or her databases based on if you are using file encryption for that connection.

For example, MySQL enables you to employ an SSL connection, as well as includes a section in the manual for this. Other databases can vary.

Most probably, the application can also get its very own account information to be delivered to the remote DB server.

Some degree of security is going to be provided using a database login and password. If you're short promptly then web services, or electrical sockets aren't likely to be quick to get. Unless of course you actually need the safety only use JDBC for the time being.

You most likely wish to write an internet plan to expose your computer data rather than letting a person connect straight to the DB on the internet. Ideally that web services are on the physically seperate machine in the database, to ensure that the database isn't uncovered to internet directly.

Person <--> internet <--> Web Service <--> database

It truly is dependent on how you feel optimal.

Have you got zero concern for security?

if you are subjecting a database directly online, you are going to need to open ports on firewall/etc and secure your database, and pray you've got no other insecure services uncovered to the web.

There are several options.

  • RMI this enables an item running in a single Java virtual machine to invoke techniques with an object running in another Java virtual machine.
  • CORBA Common Object Request Broker Architecture, is really a standard architecture for distributed object systems. It enables a distributed, heterogeneous assortment of objects to interoperate.
  • Sockets
  • HTTP server. You should use Servlets or some framework like Struts, Spring etc. for that server side and merely call the servlet out of your client using Apache HttpClient

Since you do not have enough time I'd discard RMI and CORBA and concentrate on Electrical sockets or even the http server solution.

Because you authored that you do not have knowledge about web programs I'd opt for electrical sockets.

With java you may create a server and client super easy using electrical sockets here is really a fundamental example and Here is an extremely good tutorial that utilizes Swing.