Results 1 to 2 of 2
  1. #1
    Vampire5 is offline Member
    Join Date
    Aug 2012
    Posts
    20
    Rep Power
    0

    Question Online Accounts (server-side)

    I've been learning a bit about Java net programming, and I've made a simple text client and server. I am now trying to create a client and server for user accounts. I figured that each user account would have a username and a password at the very least, and that this information would have to be saved to a file on the server. What I'm on here for is to ask, how would I organize the files for the accounts on the server and access them? Considering that I would have to loop through the files to make sure usernames aren't repeated.

    Any suggestions? As I said, I'm just looking for a way to organize this and loop through accounts (even if the user is not online).

  2. #2
    kneitzel is offline Senior Member
    Join Date
    Feb 2014
    Posts
    447
    Rep Power
    1

    Default Re: Online Accounts (server-side)

    Hi,
    First of all I want to point out that this is a typical database thing. So instead of using single files per user you could have one file which is a database (e.g. using sqlite or hsqldb)

    If you want your own implementstion then you should think about the requirements. You could use the username as filename. Then you can quickly access single users.
    Or you could use index files which you could load quickly.
    But reinventing the wheel might not be a good solution ....

Similar Threads

  1. Replies: 0
    Last Post: 10-06-2013, 03:30 PM
  2. Client-side or server-side XML parsing?
    By noodle_variation_187-X in forum JavaServer Pages (JSP) and JSTL
    Replies: 11
    Last Post: 05-31-2012, 09:06 AM
  3. Server side project
    By tj_wolf2 in forum New To Java
    Replies: 0
    Last Post: 03-14-2011, 03:23 PM
  4. how to countdown on server side
    By BigBear in forum Java Servlet
    Replies: 3
    Last Post: 04-26-2010, 10:33 PM
  5. Replies: 1
    Last Post: 03-20-2010, 07:03 PM

Tags for this Thread

Posting Permissions

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