Re: erlang text://protocol server?

Loïc Hoguin <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Organization Nine Nines
Message-ID <[email protected]>
On 09/04/2021 22:34, Petite Abeille wrote:
> 
> 
>> On Apr 9, 2021, at 21:57, Jesper Louis Andersen <[email protected]> wrote:
>>
>> Yes to both!
>>
>> There's a couple of things one has to do w.r.t asking the socket for information rather than relying on that being set in the os environment, etc. But you should have a fairly straightforward time, especially if you take the same approach the lua code is taking. Just exploit the heck out of pattern matching, and you can fold most of the asserts and substring checks into them. Look up binary pattern matching as well.
>>
>> And if something doesn't match, just crash the server. You can always do the error handling later if need be.
> 
> Fantastic. Thanks for the guidance.
> 
> QQ: Ranch mentions transport interfaces — namely TCP & TLS. [1]
> 
> How would something like QUIC fit in the picture?

It wouldn't fit because it doesn't work the same. While QUIC does have a 
concept of connections, it doesn't have the same ordering requirements 
and streams make a simple "recv" no longer possible. QUIC will need its 
own interface.

That's fine though, projects can use both Ranch and QUIC separately if 
needed.

Cheers,

-- 
Loïc Hoguin
https://ninenines.eu
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.