librelist archives

« back to archive

multi user environment

multi user environment

From:
Sebastjan Hribar
Date:
2013-09-26 @ 06:36
Hi,

I'd like to learn how to write multiuser application (maybe a simple 
chat program or something) but not using web frameworks. Can anyone 
direct me to such a shoes application they can share or know about so I 
can start learning from there. My question is probably noobish enough, 
but I haven't got any experience in this area yet...

Thank you.
kind regards,
seba

Re: [shoes] multi user environment

From:
Faraaz Ismail
Date:
2013-09-27 @ 01:22
Hey Seba,

Hm I think you'd have to use a web framework if you want to build a chat
program or something with the concept of multiple users. I'd suggest
looking at The Walkthrough and the Nobody Knows Shoes book on
http://shoesrb.com/tutorials.html to get a feel for what you can do with
Shoes.

You could also go through Michael Hartl's free web development
tutorial<http://ruby.railstutorial.org/> if
you want to build something with the concept of users, but that does
require using a web framework.

Hope that helps,

Faraaz


On Thu, Sep 26, 2013 at 1:36 AM, Sebastjan Hribar <
sebastjan.hribar@gmail.com> wrote:

> Hi,
>
> I'd like to learn how to write multiuser application (maybe a simple
> chat program or something) but not using web frameworks. Can anyone
> direct me to such a shoes application they can share or know about so I
> can start learning from there. My question is probably noobish enough,
> but I haven't got any experience in this area yet...
>
> Thank you.
> kind regards,
> seba
>

Re: [shoes] multi user environment

From:
Steven!
Date:
2013-09-27 @ 03:08
On Thu, Sep 26, 2013 at 08:36:25AM +0200, Sebastjan Hribar wrote:
> Hi,
> 
> I'd like to learn how to write multiuser application (maybe a simple 
> chat program or something) but not using web frameworks. Can anyone 
> direct me to such a shoes application they can share or know about so I 
> can start learning from there. My question is probably noobish enough, 
> but I haven't got any experience in this area yet...
> 
> Thank you.
> kind regards,
> seba

Hi Seba,

It can actually be really fun and brutally educational to try and write
a chat program that uses pure TCP instead of of HTTP or a higher level
transport protocol. Ruby's standard library has some pretty decent
socket facilities. The book Working with TCP Sockets by Jesse Storimer
is an excellent introduction to the world of socket programming. I
imagine you could probably write a pretty slick little chat program
using Shoes and the knowledge in that book.

You would have to think about whether or not you want one to one chat,
where I can talk to you and you can talk to me, or group chat, where
we're all talking to each other. Group chat probably requires that one
of the participants act as the "server" and share all the incoming
traffic with its clients.

I would suggest starting with one to one chat and then adding chat rooms
later after you've had some practice.

Definitely share your program with the shoes mailing list when you start
playing with it.

Good luck and happy hacking!

Re: [shoes] multi user environment

From:
Faraaz Ismail
Date:
2013-09-27 @ 03:34
Wow awesome, I'm glad you corrected me Steven. Thanks for pointing in the
right direction! That's very cool.


On Thu, Sep 26, 2013 at 10:08 PM, Steven! <steven@nuclearsandwich.com>wrote:

> On Thu, Sep 26, 2013 at 08:36:25AM +0200, Sebastjan Hribar wrote:
> > Hi,
> >
> > I'd like to learn how to write multiuser application (maybe a simple
> > chat program or something) but not using web frameworks. Can anyone
> > direct me to such a shoes application they can share or know about so I
> > can start learning from there. My question is probably noobish enough,
> > but I haven't got any experience in this area yet...
> >
> > Thank you.
> > kind regards,
> > seba
>
> Hi Seba,
>
> It can actually be really fun and brutally educational to try and write
> a chat program that uses pure TCP instead of of HTTP or a higher level
> transport protocol. Ruby's standard library has some pretty decent
> socket facilities. The book Working with TCP Sockets by Jesse Storimer
> is an excellent introduction to the world of socket programming. I
> imagine you could probably write a pretty slick little chat program
> using Shoes and the knowledge in that book.
>
> You would have to think about whether or not you want one to one chat,
> where I can talk to you and you can talk to me, or group chat, where
> we're all talking to each other. Group chat probably requires that one
> of the participants act as the "server" and share all the incoming
> traffic with its clients.
>
> I would suggest starting with one to one chat and then adding chat rooms
> later after you've had some practice.
>
> Definitely share your program with the shoes mailing list when you start
> playing with it.
>
> Good luck and happy hacking!
>

Re: [shoes] multi user environment

From:
Sebastjan Hribar
Date:
2013-09-27 @ 05:26
2013/9/27 Faraaz Ismail <faraaz.ismail@utexas.edu>

> Wow awesome, I'm glad you corrected me Steven. Thanks for pointing in the
> right direction! That's very cool.
>
>
Hi Faraaz,

thank you for help as well.

kind regards,
seba

Re: [shoes] multi user environment

From:
Arne Brasseur
Date:
2013-09-27 @ 10:41
Small tip : if you go down the tcp socket road, Ruby standard library
contains GServer, which makes writing the server component very easy.

On 27 September 2013 07:26, Sebastjan Hribar <sebastjan.hribar@gmail.com> wrote:
>
>
> 2013/9/27 Faraaz Ismail <faraaz.ismail@utexas.edu>
>>
>> Wow awesome, I'm glad you corrected me Steven. Thanks for pointing in the
>> right direction! That's very cool.
>>
>
> Hi Faraaz,
>
> thank you for help as well.
>
> kind regards,
> seba

Re: [shoes] multi user environment

From:
Sebastjan Hribar
Date:
2013-09-27 @ 05:24
> It can actually be really fun and brutally educational to try and write
> a chat program that uses pure TCP instead of of HTTP or a higher level
> transport protocol.


I thought as much when I got this idea and I am still not too keen on the
brutal part:)


> Ruby's standard library has some pretty decent
> socket facilities. The book Working with TCP Sockets by Jesse Storimer
> is an excellent introduction to the world of socket programming. I
> imagine you could probably write a pretty slick little chat program
> using Shoes and the knowledge in that book.
>
>
Thank you for this reference. In the meantime I've found a brief
description of Sockets on the Tutorials point which led me to the standard
Ruby library.


> You would have to think about whether or not you want one to one chat,
> where I can talk to you and you can talk to me, or group chat, where
> we're all talking to each other. Group chat probably requires that one
> of the participants act as the "server" and share all the incoming
> traffic with its clients.
>

I would suggest starting with one to one chat and then adding chat rooms
> later after you've had some practice.
>
> I'll go this way when I kick this off. Thank you.



> Definitely share your program with the shoes mailing list when you start
> playing with it.
>
You can bet on it as I'll sure need some help or suggestions:))
Not too sure when I'll start as this is only one of many items on the
beginner's learning list.



> Good luck and happy hacking!
>
Thank you and kind regards!
seba