longlostnick / chatosaur Goto Github PK
View Code? Open in Web Editor NEWdistributed system chat client
distributed system chat client
make sure when clients/servers connect and disconnect, that their threads are handled properly and killed.
not sure how I feel about this yet.
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.
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.
since the form uses ajax, it doesn't remember previous urls... dang.
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.
if you exit before starting the server you get an error because the log hasn't been created/opened for writing yet.
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.
We can use the catch blocks for this as outlined in issue #7
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.
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.
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
Now that the server lists are being sent between connected servers, the clients need to be able to get a current copy of the list when they connect to any given server.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.