Erlang/OTP 23.0 has been released

Erlang/OTP 23.0 is released, see http://erlang.org/news/140
For a deeper dive into some of the highlights you can read our blog http://blog.erlang.org/OTP-23-Highlights/

Erlang/OTP team at Ericsson

44 Likes

For me the biggest thing is socket-based gen_tcp implementation as this makes step towards socket activation in Erlang. This will make possible to listen on restricted sockets without giving more permissions to the VM and will allow for lazy starting Erlang applications using launchd and systemd.

17 Likes

Are there not enough unrestricted sockets available?

For some reason on Ubuntu it’s telling me that I need the libwxgtk3.0-dev library installed, but I can’t actually find or install it from anywhere. Any ideas?

Sometimes you want to implement something that has an assigned port, like an SSH server, an HTTP server, FTP, you name it.

If we can do this without having to run the VM as superuser, or without having to rely on a third party program that acts as a “proxy”, we are a huge step forward.

Its not that there are not enough unrestricted ports, its just that the restricted ports have a purpose which we want to fullfil.

8 Likes

Try the following:

# sudo apt -y install libwxgtk3.0-dev

# Ubuntu 20.04 LTS does not have this package for Erlang
# Need to install from source:
# https://www.wxwidgets.org/downloads/
# https://wiki.codelite.org/pmwiki.php/Main/WxWidgets31Binaries#toc2

sudo apt-add-repository 'deb https://repos.codelite.org/wx3.1.3/ubuntu/ eoan universe'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6856E1DB1AC82609
sudo apt update -y
sudo apt -y install libwxbase3.1-0-unofficial3 \
                 libwxbase3.1unofficial3-dev \
                 libwxgtk3.1-0-unofficial3 \
                 libwxgtk3.1unofficial3-dev \
                 wx3.1-headers \
                 wx-common
3 Likes

Anyone having issues using SSHKit on OTP-23?
(From windows connecting to SUN)

Is there new configuration needed?

This is important too:

CPU quotas are now taken into account when deciding the default number of online schedulers.

This should mean that people using the BEAM in containerised environments (like Kubernetes) get much better performance (with less throttling) out of the box, without having to learn about/tweak the various flags.

8 Likes

This works:

def ssh_test do

    SSHKit.SSH.connect('#{@server_ip}',

      port: @server_ssh_port,

      user: '#{@server_username}',

      password: '#{@server_password}',

      modify_algorithms: [prepend: [kex: [:"diffie-hellman-group1-sha1"]]]

    )

  end

Just had to restore the algo the server was expecting

Why do you think that the way you can listen to restricted sockets (ports as I understand it) will change because of the socket module and the possibility to run gen_tcp with the socket module as backend?

Because you will be able to use socket activation and pass already opened file descriptor to it. So you supervisor (systemd or launchd) will open privileged port for you and then you will just pass it to your web server. The same goes for UNIX socket where you will be able to create sockets in paths that you cannot write to. Currently we need to do some workarounds to make it work with ports.

Yes but that method is practiced already with the inet driver since it is possible to open sockets/Fds which are already bound. You can open and bind a file descriptor with one program and then passing it to the Erlang VM on the command line. See the OTP source tree $OTP_ROOT/etc/unix/setuid_socket_wrap.c

1 Like

Ok, I need to test this out, because last time I tried it was problematic and I have created ERL-1138 to resolve that.