Wedge

Public area => The Pub => Features => Topic started by: dorje on April 20th, 2011, 04:11 PM

Title: Chat
Post by: dorje on April 20th, 2011, 04:11 PM
I don't know if this is the correct section, since at actual developement state[1] this thread is more a suggestion request. :)

So, I'm planning to write a chat client that is *inexpensive* for the server running wedge[2]. Inexpensive, that means ideal for forums that are executed on a shared hosting server. :) The system in my mind is very simple: I defined a simple protocol  - something like:

Code: [Select]
[id_member_from:id_member_to:time]hello! :)

where id_member_to can be * for messages dedicated to all chat members and a valid ID for something like IRC query.

The only thing I need now is a free service that in some way can accept requests and store such formatted strings[3]. So the entire system will be done in javascript, with load only on the client side.

What suggestion I need? Well... I only wanted to know if someone knows for such a free service around on the web. :)
 1. I've not started coding yet :P
 2. ok, right, I've to write it for SMF now, but I prefer to write Wedge in this post! ;)
 3. I don't know if I can handle this with gmail, for example, where the subject is the header and the body is the phrase - but I prefer something more simple, like a free postit server or... I don't know!
Title: Re: Chat
Post by: Arantor on April 20th, 2011, 04:49 PM
The big factor is whether or not authentication is required for visibility. If it's not, there's a variety of things that might be suitable that can be just thrown in.

But if authentication is required, roundtrips to the server are inevitable.
Title: Re: Chat
Post by: dorje on April 20th, 2011, 04:55 PM
Quote from Arantor on April 20th, 2011, 04:49 PM
But if authentication is required, roundtrips to the server are inevitable.
But it will be enoug to load authentication credentials once. And... Yeah, I know that the credentials cannot be just stored in js. I'm just thinking how to solve that. :)
Title: Re: Chat
Post by: Arantor on April 20th, 2011, 04:57 PM
Well, it's still going to be via a server one way or another... unless you can figure out how to do peer to peer communication in a browser in JS (which doesn't work unless both sides are configured to receive HTTP requests)
Title: Re: Chat
Post by: dorje on April 20th, 2011, 04:59 PM
Quote from Arantor on April 20th, 2011, 04:57 PM
Well, it's still going to be via a server one way or another... unless you can figure out how to do peer to peer communication in a browser in JS (which doesn't work unless both sides are configured to receive HTTP requests)
Ok, I explained not well I think. *Inexpensive* for the hosting server, not for the server providing the "string storing" service[1].
 1. Hmmm... What about blogger?
Title: Re: Chat
Post by: Arantor on April 20th, 2011, 05:12 PM
There are so many problems that can be made through such a third party hosting; you're entirely relying on that third party never to change their API, authentication mechanism and so on, and it's particularly vulnerable because you'd have to supply the third party credentials to the Javascript which would have to live in the page all the time to keep requesting from the third party. Plus I can't think of a single non chat service that this wouldn't violate the TOS of.
Title: Re: Chat
Post by: Nao on April 20th, 2011, 05:27 PM
Quote from Arantor on April 20th, 2011, 05:12 PM
you're entirely relying on that third party never to change their API,
I'd like to use the opportunity to thank, from the bottom of my heart, all of the little f'ers who own video sites and changed their embed codes, breaking all sites embedding their stuff, and forcing me to update their embed code in Aeva Lite... Good thing I don't have to do that anymore.
And that's the simpliest of APIs :lol:
Title: Re: Chat
Post by: DoctorMalboro on April 20th, 2011, 10:40 PM
That happens when they think that bugs justify changing the entire code of an API...
Title: Re: Chat
Post by: Arantor on April 20th, 2011, 11:16 PM
Now why does that sound familiar?
Title: Re: Chat
Post by: dorje on April 20th, 2011, 11:24 PM
Quote from Arantor on April 20th, 2011, 11:16 PM
Now why does that sound familiar?
:eheh:
Title: Re: Chat
Post by: DoctorMalboro on April 21st, 2011, 12:41 AM
Well, it sounds like the time twitter start using other protocols for their API.
Title: Re: Chat
Post by: dorje on April 21st, 2011, 08:07 AM
Quote from Arantor on April 20th, 2011, 05:12 PM
There are so many problems that can be made through such a third party hosting; you're entirely relying on that third party never to change their API, authentication mechanism and so on, and it's particularly vulnerable because you'd have to supply the third party credentials to the Javascript which would have to live in the page all the time to keep requesting from the third party.
I've got the answer: pastebin.
Quote from Arantor on April 20th, 2011, 05:12 PM
Plus I can't think of a single non chat service that this wouldn't violate the TOS of.
And that's right, I've not considered that. :(

Ok, the project is in standby now: waiting the illumination! :thanks:
Title: Re: Chat
Post by: live627 on April 21st, 2011, 09:38 AM
Pastebin? So your solution to a potentially changing third-party API is to use another third party?
Title: Re: Chat
Post by: dorje on April 21st, 2011, 09:40 AM
No: to use a third party API that is relatively stable and very simple. :)

But nevermind, the TOS are very clear about not using pastebin that way...
Title: Re: Chat
Post by: live627 on April 21st, 2011, 09:44 AM
That's the thing: I've never used pastebin... only breezed through it once half a year ago.
Title: Re: Chat
Post by: dorje on April 21st, 2011, 10:52 AM
Quote from Arantor on April 20th, 2011, 04:57 PM
Well, it's still going to be via a server one way or another... unless you can figure out how to do peer to peer communication in a browser in JS (which doesn't work unless both sides are configured to receive HTTP requests)
What about that?

http://labs.adobe.com/technologies/cirrus/
Title: Re: Chat
Post by: Arantor on April 21st, 2011, 01:53 PM
Well, yes, it's fully peer to peer by Cirrus 2... but it requires Flash. If that works for you...
Title: Re: Chat
Post by: DoctorMalboro on April 21st, 2011, 08:50 PM
If it requires flash all I know that it's going to be a major PITA.
Title: Re: Chat
Post by: Rustybarnacle on April 22nd, 2011, 12:03 AM
Steve just friended you on FB.  :)