Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (113)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Architecture of a Chat  (Read 1466 times)
0 Members and 1 Guest are viewing this topic.
Offline Serethos

Junior Member




Java games rock!


« Posted 2003-09-25 07:35:45 »

ive written a little chat system, but would like to discuss the organisation.
the chat is serverbased. all clients have to connect to the server via tcp/ip and then they get an overview about the other clients (but no direct connection). so all actions (color changes etc) and messages are first sent to the server and then directed to the other clients.

the messages are concatenated with a command, e.g.:

change_color||red
say||greetings!

and cut into command - operation via stringtokenizer.

so my questions:
the work for my server is very hard, he has to accept EVERY action. situations like one client doesnt want to hear another is handled with a filter system by the server,
so he gets messages, which are perhaps obsolete.

is this the normal chat-architecture ?
or should i code only a server which arranges the direct-connections between the clients, so if a clients logs into the network it gets all ips from the other clients for connection ?


Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #1 - Posted 2003-09-25 08:18:02 »

There are many possibilities depending on the needs and scale of that thing.

ICQ-like chats cannot be handled by a server bc. there are millions of users. But the 'filter' states that each user only talks to a verylimited number of other. So a client-client connection is feasable.

For a all-vs-all scenario, the server is a must, bc. a single client cannot open and maintain thousands of connections.
Depending on the expected use of filters, you could think of client-side filtering to release the server from that load.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #2 - Posted 2003-09-29 08:44:53 »

Quote
ive written a little chat system, but would like to discuss the organisation.


One question: why aren't you using IRC?

I assume you wanted to learn about networking as you went along, or something...If so, the best bet now is to look at IRC in detail and compare and contrast. My initial reaction is to wonder why you care about efficiency of messages - are you having problems with performance? If not, why worry?

If you look at IRC you'll see how they solved the problems, and if it works, and whether users complain about the way they chose to do it.

malloc will be first against the wall when the revolution comes...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Serethos

Junior Member




Java games rock!


« Reply #3 - Posted 2003-09-29 18:10:27 »

ohh yes, indeed it is very important to know, that my chat is only for learning purposes. so i want to get the problems and  
to think about them critically.
my goal is not create a water-proof system, more interesting are questions which ask for the "why" of the solutions.

but perhaps it is not a too bad idea to look into irc ...
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (16 views)
2014-09-12 09:08:26

Norakomi (50 views)
2014-09-10 13:57:51

TehJavaDev (58 views)
2014-09-10 06:39:09

Tekkerue (27 views)
2014-09-09 02:24:56

mitcheeb (50 views)
2014-09-08 06:06:29

BurntPizza (34 views)
2014-09-07 01:13:42

Longarmx (20 views)
2014-09-07 01:12:14

Longarmx (23 views)
2014-09-07 01:11:22

Longarmx (22 views)
2014-09-07 01:10:19

mitcheeb (31 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!