Giter Club home page Giter Club logo

chatosaur's Introduction

I'm creating issues on here for things that need to be done. I'll be gone until thursday, but will have the entire evening to work on things and finish the project.

If you guys can work on it at some point and get one or two of the issues taken care of that would be awesome.

--Getting a single server/client running

1. clone the repo, duhhh
2. navigate one directory outside the repo (so if you have your repo in ~/chatosaur, you want to be in ~/)
3. run java chatosaur.server.Server to get the server started
4. do option one to get the server running on a port

5. navigate to that directory in another window and run java chatosaur.client.Client
6. use host=localhost and port=[the port you specified above]
7. you should now be chatting!

8. the server creates a log file "server_[port].log" you can tail to see what's going on

--Adding another server:

1. open a new window and run chatosaur.server.Server like before
2. hit option 1 and start the server on a different port
3. once the server is running hit option 2 on the OTHER server and enter in 'localhost' and the port of the new server to add it
4. if all goes well you should see the updated list propagate in the log to the new server.

--Compiling

I have just been using a text editor to work on this thing, but feel free to create a new branch and make a netbeans/eclipse project or w/e.

To compile the server run:

    javac chatosaur/server/*.java

To compile the client run:

    javac chatosaur/client/*.java

(remember to be one directory up from the repo again)

chatosaur's People

Contributors

longlostnick avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

tascony

chatosaur's Issues

Server should update other server's lists on graceful shutdown

When in the options menu on a server and you exit/shutdown the server, the server should be removed from the list and updated amongst other servers.

propagateList() in Server should be the method to use, just gotta remove the current server first.

Give user option to connect to a server in list on first connect

when the client connects to any server, it should first be prompted with a list of servers ("rooms") it can connect to before actually being throw in to the chat room mix.

This should be fairly reliable because the servers should have a pretty up to date server list.

Remove server from list if unresponsive (down)

this is a way to keep the server list up to par if a server disconnects without being shutdown gracefully.

We should have some way for a server to go through the list ever x minutes and ping each server in the list. If a server has disconnected, remove it from the list.

testConnection in Server should work for pinging, we just might have to set up a new thread class to continuously keep pinging the servers every so often.

This should hopefully help to mitigate the amount of bad servers in a client's list.

EDIT: Instead I think we should just automatically remove it from the list if we ever can't reach it. For example, if we are trying to send out a client's message to propagate on a server and it's not there, we should just remove that server from the list. Title changed appropriately.

Propagate messages over servers

with the current setup it turns out it's pretty easy to share messages over all servers. Making it one giant chat room instead of a bunch of smaller ones.

Clients should get updated list when server is added/removed

I am kinda unsure about this one because I don't really know how often we want to be sending out the list.

if the current server the client is on crashes/disconnects, the client should be able to choose a new one. If the list hasn't been updated, or the client doesn't have a current list, it should just say "this server isn't available" and let the client choose a new one.

So really it's just a matter of how updated we want to be. This is low priority.

change e.printStackTrace() in catch blocks to be more helpful

Right now for debugging I have e.printStackTrace() in most of the catch blocks. This should be changed to be more helpful in each case.

For example, In issue #5 we should:

-log a message saying a server isn't available or went down. (server.log.write("message"))
-remove the server from the list
-proceed without interruption

We can also use this to gracefully re-connect a client to a new server when their current one goes down.

save requests

make a button to save the current request to a nice shareable url (ex. curlosaur.us/bov8chq). This would also allow adding of social sharing buttons for facebook/twitter/etc.

-possibly add simple password protection option

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.