in reply to Re: Re: Instant Messaging Protocol
in thread Instant Messaging Protocol

Though one of the big servers hosting hundreds of clients might not be simple, you probably don't need that. Net::Jabber::Server contains example code for creating a server, and it's about the same length as the client code above. The only change you'd need to make is to change $Server->Process() to while(1) { $Server->Process() } or similar (probably with some additional error checking).

If you're doing serious embedded work, why are you using Perl? It's a memory hog. Making your own IM protocol won't change that fact.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

: () { :|:& };:

Note: All code is untested, unless otherwise stated

Replies are listed 'Best First'.
Re: Re: Re: Re: Instant Messaging Protocol
by Eyck (Priest) on Jan 06, 2004 at 08:26 UTC

    I haven't seen that Net::Jabber::Server, it seems to solve the 'server' problem... but when you look a little closer, it appears that the bulk of information required for running Jabber server is still hidden in server.xml config file, so it's still solution that requires significant effort from server admin.

    I'm not doing any "serious" embedded work, but when it comes to sending messages you must think about all possible clients that would want to connect, and I do develop some little embeded machines that would need to communicate with the system. Of course I don't do embeded development in perl ( though actually it would fit on those toys, especially when stripped a bit ), but I don't control all the machines that would connect.

    That's why I'm looking for some sane 'protocol' - to enable different types of machines to talk to each other. And that's why using something like EasyTCP is out of question - it's very nice, but would put unreasonable burden on alien clients.

    So while 95% of the code will be perl, I can't be too selfish and put in protocol things that are easy in perl but hard on other platforms.

    And KISS should aply primary to things like protocols, neither Jabber nor Beep follow that prinicple. At first glance it looks like 'Spread' might be the correct solution.

    And please notice that by making sure that protocol is lightweight you can do things like r-postgresql which is built on spread. You wouldn't build something like that on top of Jabber.