Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By gimbal2

Thread: Very simple sever question

  1. #1
    TacoManStan is offline Member
    Join Date
    Sep 2011
    Posts
    50
    Rep Power
    0

    Default Very simple sever question

    Sorry about the vague title, I didn't know how to compress this question into anything that would make sense.

    Note that if you don't want to read this long thing just go to the last line of text in this post and I ask my question specifically.

    At any rate, I am starting to look into servers. Right now my client-server socket connection works perfectly, and all is well. I know that theoretically I could just save XML files on the server computer and read from those, using locks and keys and what not to control when they are accessed to make sure nothing stupid happens. But for obvious reasons, I'm not going down that road.

    A bit more information before I ask my actual question: To save data effectively on a server, to have it all be managed concurrently for me (which I'm assuming both of the following API's do), which would be better? Apache or SQL? That could be an incredibly stupid question, I have no idea. For all I know I could have just asked "which is better, Javascript or HTML?" (Which obviously makes no sense as the two work together). I don't even know what they are, and I would rather not spend hours learning one of them only to find out that the other is infinitely better.

    MY ACTUAL QUESTION (Well there are actually 4 related questions):
    1. To store data on a server concurrently, which is better to use, SQL or Apache?
    2. If Apache is better, what is Apache Tomcat (for Java obviously), and should I use it?
    3. If SQL is better, what is MySQL, and should I use it?
    4. Right now I send all of my information from the server to my clients using a standard Socket object, using InputStreams and OutputStreams. I have a new Thread created for each client connected. There could potentially be thousands of clients connected. I also have no idea if the Socket class with InputStreams and OutputStreams are designed for professional use, which is what I am using them for.

    EDIT:
    I'm actually going to change my main question: Where can I go to learn all of this? Being self taught, I have looked around the internet, and to someone who is totally ignorant to the way a server works, it is all very confusing. The word "server" means so many different things, and there are so many different types of databases, I can't find something that actually makes sense to me. I don't know the difference between a database, SQL, Apache, any of it. All I want is to store data that I can access, and then reference that data from the computer where my program using ServerSocket is being run, if that makes any sense. That's all I need.
    Last edited by TacoManStan; 12-22-2013 at 09:23 PM.

  2. #2
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,874
    Rep Power
    5

    Default Re: Very simple sever question

    I don't even know what they are, and I would rather not spend hours learning one of them only to find out that the other is infinitely better.
    No? Then you're not really cut out for this business. It should be the other way around: you WANT to do research and figure stuff out. Research costs time, you should be willing to invest it.


    1. SQL is a database query language and Apache is a webserver (among other things they produce). Neither really have anything to do with storage.
    2. Should you use it? I don't know if YOU should use it.
    3. Should you use it? I don't know if YOU should use it. Comparing it to Apache Tomcat is totally wrong in any case, you might use the both of them together.
    4. That's not even a question!

    Where can I go learn all this
    But you already stated that you don't want to do that, you want to come here and be told what you need to do. I can't help you with that. The way -I- learned it was by reading books and experimenting.
    quad64bit likes this.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    zFollette is offline ▼ dafuq did I do?
    Join Date
    Dec 2013
    Posts
    203
    Rep Power
    0

    Default Re: Very simple sever question

    I am also self taught so I will give you an answer you can hopefully appreciate. I am not big on server/client interactions, but the way you're handling it now would be fine if you have the hardware for it. (Honestly I have no idea)

    EDIT: Hardware meaning a good server computer.

  4. #4
    TacoManStan is offline Member
    Join Date
    Sep 2011
    Posts
    50
    Rep Power
    0

    Default Re: Very simple sever question

    Quote Originally Posted by TacoManStan View Post
    Apache or SQL? That could be an incredibly stupid question, I have no idea. For all I know I could have just asked "which is better, Javascript or HTML?" (Which obviously makes no sense as the two work together).
    Quote Originally Posted by gimbal2 View Post
    No? Then you're not really cut out for this business. It should be the other way around: you WANT to do research and figure stuff out. Research costs time, you should be willing to invest it.
    As I said before, I don't know what they are. So thank you for the incredibly degrading response instead of anything productive.

    The point I was making is, for example, when I was first learning GUIs, I made an entire program strictly with AWT, because that was what I had found. I only later learned about the swing architecture, and I discovered that hours of the work I had done were meaningless. Now I know that is a bit different, but it is the same general concept.

    At any rate, I have since discovered my solution. I have a local Microsoft Access database being accessed by JDBC. Found a fantastic tutorial online that is exactly what I needed.

    Quote Originally Posted by zFollette View Post
    I am also self taught so I will give you an answer you can hopefully appreciate. I am not big on server/client interactions, but the way you're handling it now would be fine if you have the hardware for it. (Honestly I have no idea)

    EDIT: Hardware meaning a good server computer.
    Thank you for your help, that was actually very useful. I wanted to make sure I wasn't getting myself into something that wouldn't be effective or efficient later on. And as of now, I am running my server application on a very powerful desktop. But once I actually release anything, I'm going to purchase an actual server to run the application on. Reliability is always more important than speed for a server, obviously.

Similar Threads

  1. Java with sql sever 2005 connectivity?
    By K.A Naqvi in forum JDBC
    Replies: 3
    Last Post: 04-28-2013, 12:22 AM
  2. Running sever from Website
    By daytonellwanger in forum Networking
    Replies: 0
    Last Post: 12-15-2010, 02:35 AM
  3. Problem with Sever
    By ersachinjain in forum Networking
    Replies: 2
    Last Post: 01-11-2010, 03:10 PM
  4. Saving image to sever.
    By dudejonne in forum New To Java
    Replies: 5
    Last Post: 11-03-2009, 02:01 PM
  5. regarding client -sever
    By gobinathm in forum Advanced Java
    Replies: 0
    Last Post: 11-12-2007, 05:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •