• services

    From MCMLXXIX@VERT/MDJ to Digital Man on Thu Oct 8 10:55:06 2009
    I'm working on this gaming service, and I'm a bit confused about a few things.

    Assuming my BBS is acting as the HUB, how can the service access other connections to send data between two NODES?

    For example:

    Digital man runs chess.js on Vertrauen, it connects to the HUB via the gaming service...

    Deuce runs chess.js on Synchronix, it also connects..

    Now I've got two clients connected to the HUB, who need to be able to communicate with each other.

    Are service client connections stored in an array somewhere?

    I think I'm missing something obvious.


    ---
    þ Synchronet þ The BRoKEN BuBBLE (MDJ.ATH.CX)
  • From Digital Man@VERT to MCMLXXIX on Thu Oct 8 17:54:47 2009
    Re: services
    By: MCMLXXIX to Digital Man on Thu Oct 08 2009 10:55 am

    I'm working on this gaming service, and I'm a bit confused about a few things.
    Assuming my BBS is acting as the HUB, how can the service access other connections to send data between two NODES?

    For example:

    Digital man runs chess.js on Vertrauen, it connects to the HUB via the gaming service...

    Deuce runs chess.js on Synchronix, it also connects..

    Now I've got two clients connected to the HUB, who need to be able to communicate with each other.

    Are service client connections stored in an array somewhere?

    I think I'm missing something obvious.

    There are 2 types of Synchronet services:

    Dynamic (or normal) Services:
    These services are the simplest to write and the Synchronet Services module does most of the work for you (opening the socket, binding the port, accepting incoming connections). For each incoming connection, there is a separate instance of the JavaScript (or native executable) to handle the client. Multiple concurrent clients means multiple concurrent instances of the service. fingerservice.js, gopherservice.js, nntpservice.js are examples of dynamic services.

    Static Services:
    These services are executed when the Synchronet Services module starts up and stay running through-out the life of the services module (or they may be executed stand-alone via JSexec). Static services are responsible for accepting their own connections and only one instance of the service script (or executable) exists to handle all simultaneous client connections.
    ircd.js and staticservice.js are examples of static services.

    digital man

    Snapple "Real Fact" #5:
    Camels have 3 eyelids.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Mcmlxxix@VERT/SYNCNIX to Digital Man on Thu Oct 8 19:03:05 2009
    Re: services
    By: Digital Man to MCMLXXIX on Thu Oct 08 2009 05:54 pm

    There are 2 types of Synchronet services:

    Dynamic (or normal) Services:
    These services are the simplest to write and the Synchronet Services module does most of the work for you (opening the socket, binding the port, accepting incoming connections). For each incoming connection, there is a separate instance of the JavaScript (or native executable) to handle the client. Multiple concurrent clients means multiple concurrent instances of the service. fingerservice.js, gopherservice.js, nntpservice.js are
    examples of dynamic services.

    Static Services:
    These services are executed when the Synchronet Services module starts up and stay running through-out the life of the services module (or they may
    be executed stand-alone via JSexec). Static services are responsible for accepting their own connections and only one instance of the service script (or executable) exists to handle all simultaneous client connections. ircd.js and staticservice.js are examples of static services.


    Ok.. based on the above I'm guessing I didn't look hard enough for that documentation, so I apologisze... but that does mostly answer the question, so thank you.

    It seems I need to make use of the latter "static service" as I'll need all of the socket connections to communicate with one another. I'll probably hit another wall shortly after starting down that road, so don't be surprised if im back on here tomorrow with more.

    -M@

    ---
    þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Digital Man@VERT to Mcmlxxix on Thu Oct 8 22:59:03 2009
    Re: services
    By: Mcmlxxix to Digital Man on Thu Oct 08 2009 07:03 pm

    Re: services
    By: Digital Man to MCMLXXIX on Thu Oct 08 2009 05:54 pm

    There are 2 types of Synchronet services:

    Dynamic (or normal) Services:
    These services are the simplest to write and the Synchronet Services module does most of the work for you (opening the socket, binding the port, accepting incoming connections). For each incoming connection, there is a separate instance of the JavaScript (or native executable) to handle the client. Multiple concurrent clients means multiple concurrent instances of the service. fingerservice.js, gopherservice.js, nntpservice.js are examples of dynamic services.

    Static Services:
    These services are executed when the Synchronet Services module starts
    up and stay running through-out the life of the services module (or they may be executed stand-alone via JSexec). Static services are responsible for accepting their own connections and only one instance of the service script (or executable) exists to handle all simultaneous client connections. ircd.js and staticservice.js are examples of static services.


    Ok.. based on the above I'm guessing I didn't look hard enough for that documentation, so I apologisze... but that does mostly answer the question, so thank you.

    Um, I just wrote that "documentation" in the post. :-) Think of it like a Wiki. :-)

    It seems I need to make use of the latter "static service" as I'll need all of the socket connections to communicate with one another. I'll probably
    hit another wall shortly after starting down that road, so don't be surprised if im back on here tomorrow with more.

    You could have dynamic service instances communicate with eachother as well (using Queues, Sockets, or disk I/O). You don't *have* to use a static service.

    digital man

    Snapple "Real Fact" #169:
    The first human-made object to break the sound barrier was a whip.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Mcmlxxix@VERT/SYNCNIX to Digital Man on Fri Oct 9 19:06:29 2009
    Re: services
    By: Digital Man to Mcmlxxix on Thu Oct 08 2009 10:59 pm

    Um, I just wrote that "documentation" in the post. :-) Think of it like a Wiki. :-)


    well it was so neatly printed, I figured you cut and pasted it. It made me panic, since that last thing I want to be is another Phil.

    You could have dynamic service instances communicate with eachother as well (using Queues, Sockets, or disk I/O). You don't *have* to use a static service.

    well, it seems that would be more of a hacky way of doing it. I've done enough things the "less right" way, so I'd like to avoid that if I can. It's starting to look more and more like I should try to work this all into qengine.js and run it as a static service, since that wuold keep everything together a lot better.

    I've got a hell of a lot of code in chateng.js and qengine.js already, so if I've done something the wrong way it's going to suck a major set of balls to have to rework everything.


    ---
    þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Tracker1@VERT/TRN to MCMLXXIX on Sat Oct 10 21:41:36 2009
    On 10/8/2009 7:55 AM, MCMLXXIX wrote:
    Now I've got two clients connected to the HUB, who need to be able to communicate with each other.

    Are service client connections stored in an array somewhere?

    I think I'm missing something obvious.

    probably an overly complicated example, but look at the irc js stuff, since it handles multiple clients, etc...

    --
    Michael J. Ryan - http://tracker1.info/

    ... B5: We all believe in something... greater than ourselves, even if it's just the blind forces of chance.

    ---
    þ Synchronet þ Roughneck BBS - telnet://roughneckbbs.com - www.roughneckbbs.com