Discussion:
[gambit-list] UDP
Guillaume Cartier
2017-08-03 11:56:34 UTC
Permalink
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
Dimitris Vyzovitis
2017-08-03 12:01:16 UTC
Permalink
You can use UDP sockets through raw devices and ffi.

There is a pretty comprehensive socket ffi in Gerbil which you can use with
raw Gambit code:
https://github.com/vyzo/gerbil/blob/master/src/std/os/_socket.scm

Of course you may want to try out Gerbil in full, which has quite good
support for sockets with a high level interface:
https://github.com/vyzo/gerbil/blob/master/src/std/os/socket.ss

-- vyzo
Post by Guillaume Cartier
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
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Jeff Read
2017-08-04 20:36:22 UTC
Permalink
Gamsock maintainer here. Does Gamsock somehow not fit your needs? I'm open
to bug reports or feature requests.
Post by Guillaume Cartier
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
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Guillaume Cartier
2017-08-09 15:48:37 UTC
Permalink
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
Post by Jeff Read
Gamsock maintainer here. Does Gamsock somehow not fit your needs? I'm open
to bug reports or feature requests.
Post by Guillaume Cartier
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
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Dimitris Vyzovitis
2017-08-09 17:10:26 UTC
Permalink
Post by Guillaume Cartier
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
Post by Guillaume Cartier
Hey Jeff,
I really like what I saw when I browsed Gamsock's code. The code looks
clean and well implemented.
#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
Post by Jeff Read
Gamsock maintainer here. Does Gamsock somehow not fit your needs? I'm
open to bug reports or feature requests.
Post by Guillaume Cartier
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
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
_______________________________________________
Gambit-list mailing list
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Adam
2017-08-11 18:28:21 UTC
Permalink
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
Post by Dimitris Vyzovitis
Post by Guillaume Cartier
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
Post by Guillaume Cartier
Hey Jeff,
I really like what I saw when I browsed Gamsock's code. The code looks
clean and well implemented.
#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
Post by Jeff Read
Gamsock maintainer here. Does Gamsock somehow not fit your needs? I'm
open to bug reports or feature requests.
Post by Guillaume Cartier
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
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
_______________________________________________
Gambit-list mailing list
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
_______________________________________________
Gambit-list mailing list
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Dimitris Vyzovitis
2017-08-12 05:55:01 UTC
Permalink
Ports are not the right abstraction for UDP -- UDP sockets are not streams
of bytes, so userland ports are not relevant.


--vyzo
Post by Adam
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
Post by Dimitris Vyzovitis
Post by Guillaume Cartier
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 <
Post by Guillaume Cartier
Hey Jeff,
I really like what I saw when I browsed Gamsock's code. The code looks
clean and well implemented.
#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
Post by Jeff Read
Gamsock maintainer here. Does Gamsock somehow not fit your needs? I'm
open to bug reports or feature requests.
Post by Guillaume Cartier
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
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
_______________________________________________
Gambit-list mailing list
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
_______________________________________________
Gambit-list mailing list
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Dimitris Vyzovitis
2017-08-12 06:28:40 UTC
Permalink
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
Post by Dimitris Vyzovitis
Ports are not the right abstraction for UDP -- UDP sockets are not streams
of bytes, so userland ports are not relevant.
--vyzo
Post by Adam
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
Post by Dimitris Vyzovitis
Post by Guillaume Cartier
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 <
Post by Guillaume Cartier
Hey Jeff,
I really like what I saw when I browsed Gamsock's code. The code looks
clean and well implemented.
#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
Post by Jeff Read
Gamsock maintainer here. Does Gamsock somehow not fit your needs? I'm
open to bug reports or feature requests.
Post by Guillaume Cartier
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
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
_______________________________________________
Gambit-list mailing list
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
_______________________________________________
Gambit-list mailing list
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Dimitris Vyzovitis
2017-08-12 06:35:31 UTC
Permalink
And to conclude this rant, I shall be blunt.
Post by Adam
For completeness - when there are userland ports, implementing UDP as a
module will be trivial.

UDP is already done with raw devices.

There is an ffi module you can use for sockets in Gerbil, which is
distributed with the same license as Gambit and you can use in your Gambit
programs without waiting for whatever these userland ports are.

Similarly, Gamsock can also be easily updated to use raw devices with the
it's existing interface but without the spinning.

-- vyzo
Post by Adam
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
Post by Dimitris Vyzovitis
Ports are not the right abstraction for UDP -- UDP sockets are not
streams of bytes, so userland ports are not relevant.
--vyzo
Post by Adam
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
Post by Dimitris Vyzovitis
Post by Guillaume Cartier
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 <
Post by Guillaume Cartier
Hey Jeff,
I really like what I saw when I browsed Gamsock's code. The code looks
clean and well implemented.
#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
Post by Jeff Read
Gamsock maintainer here. Does Gamsock somehow not fit your needs? I'm
open to bug reports or feature requests.
Post by Guillaume Cartier
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
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
_______________________________________________
Gambit-list mailing list
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
_______________________________________________
Gambit-list mailing list
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Loading...