Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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 2742 times)
0 Members and 1 Guest are viewing this topic.
Offline Serethos

Junior Devvie

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.:


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 Devvie

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

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

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 Devvie

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  

EgonOlsen (60 views)
2018-06-10 19:43:48

EgonOlsen (42 views)
2018-06-10 19:43:44

EgonOlsen (61 views)
2018-06-10 19:43:20

DesertCoockie (241 views)
2018-05-13 18:23:11

nelsongames (142 views)
2018-04-24 18:15:36

nelsongames (141 views)
2018-04-24 18:14:32

ivj94 (883 views)
2018-03-24 14:47:39

ivj94 (144 views)
2018-03-24 14:46:31

ivj94 (795 views)
2018-03-24 14:43:53

Solater (159 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!