[gambit-list] UDP

Dimitris Vyzovitis vyzo at hackzen.org
Sat Aug 12 02:28:40 EDT 2017


Just to clarify this last one a bit.

I was referring to the classic byte/character/object port abstraction.

With the introduction of raw devices, we have a new base class of ports,
which are the waitable ports.
These objects are i/o objects managed by the Gambit runtime and integrated
with the Gambit scheduler.
The idea is that there exist i/o objects that don't fit the stream
abstraction, and we would like to do i/o on them using specialized (ffi)
methods while integrating with the Gambit scheduler.

UDP sockets is perfect example of such a device: they are not streams of
bytes, so they don't fit the classic port abstraction. But they are i/o
objects, on which you can do i/o with specialized ffi methods and you want
to integrate with the Gambit scheduler to avoid blocking or spinning.

-- vyzo



On Sat, Aug 12, 2017 at 8:55 AM, Dimitris Vyzovitis <vyzo at hackzen.org>
wrote:

> Ports are not the right abstraction for UDP -- UDP sockets are not streams
> of bytes, so userland ports are not relevant.
>
>
> --vyzo
>
> On Fri, Aug 11, 2017 at 9:28 PM, Adam <adam.mlmb at gmail.com> wrote:
>
>> Guillaume,
>>
>> For completeness - when there are userland ports, implementing UDP as a
>> module will be trivial.
>>
>> For more info see here https://github.com/gambit/gambit/issues/288 .
>>
>> Adam
>>
>> 2017-08-09 19:10 GMT+02:00 Dimitris Vyzovitis <vyzo at hackzen.org>:
>>
>>> > Regarding #2
>>>
>>> Yes, I implemented raw devices exactly for this reason.
>>> Gamsock could use the socket ffi from Gerbil to provide the same
>>> interface but integrated with the Gambit i/o scheduler,
>>>
>>> -- vyzo
>>>
>>> On Wed, Aug 9, 2017 at 6:48 PM, Guillaume Cartier <
>>> gcartier at jazzscheme.org> wrote:
>>>
>>>> Hey Jeff,
>>>>
>>>> I really like what I saw when I browsed Gamsock's code. The code looks
>>>> clean and well implemented.
>>>>
>>>> The two things I see missing, correct me if I'm wrong are:
>>>>
>>>> #1 Cross-platform support, mainly Windows
>>>> #2 Some way to block on reading the UDP port that is integrated with
>>>> the Gambit scheduler
>>>>
>>>> Regarding #1, it seems a bit wasteful to have to implement
>>>> cross-platform sockets as it is already done in Gambit's low-level C code,
>>>> so maybe some collaboration with Marc into exposing this code in some way
>>>>
>>>> Regarding #2, my understanding is that Marc added raw-device ports a
>>>> while ago to help vyzo do exactly that in Gerbil
>>>>
>>>>
>>>> On Fri, Aug 4, 2017 at 4:36 PM, Jeff Read <bitwize at gmail.com> wrote:
>>>>
>>>>> Gamsock maintainer here. Does Gamsock somehow not fit your needs? I'm
>>>>> open to bug reports or feature requests.
>>>>>
>>>>> On Aug 3, 2017 7:56 AM, "Guillaume Cartier" <gcartier at jazzscheme.org>
>>>>> wrote:
>>>>>
>>>>>> Hi everyone,
>>>>>>
>>>>>> What is the current state of UDP in Gambit?
>>>>>>
>>>>>> I found
>>>>>> - an old post where Marc says he has preliminary support and
>>>>>> - https://github.com/bitwize/gamsock which looks interesting but
>>>>>> hasn't been updated in years
>>>>>>
>>>>>> Anything else available if I need to integrate UDP in my Gambit
>>>>>> application?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> _______________________________________________
>>>>>> Gambit-list mailing list
>>>>>> Gambit-list at iro.umontreal.ca
>>>>>> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>>>>>>
>>>>>>
>>>>
>>>> _______________________________________________
>>>> Gambit-list mailing list
>>>> Gambit-list at iro.umontreal.ca
>>>> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Gambit-list mailing list
>>> Gambit-list at iro.umontreal.ca
>>> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20170812/6cef99aa/attachment.htm>


More information about the Gambit-list mailing list