<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pakakeh.go, branch v0.48.0</title>
<subtitle>Collections of packages and tools for working with Go programming language.</subtitle>
<id>http://git.kilabit.info/pakakeh.go/atom?h=v0.48.0</id>
<link rel='self' href='http://git.kilabit.info/pakakeh.go/atom?h=v0.48.0'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/'/>
<updated>2023-07-07T12:28:38Z</updated>
<entry>
<title>Release share v0.48.0 (2023-07-07)</title>
<updated>2023-07-07T12:28:38Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-07-03T13:05:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=8755d82aceb53131d3feb8080ad6cec5ca12d48c'/>
<id>urn:sha1:8755d82aceb53131d3feb8080ad6cec5ca12d48c</id>
<content type='text'>
This release bring many enhancements to lib/websocket including timeout,
handling upgrade and read/write concurrently using goroutine.

=== Breaking changes

* lib/net: changes the WaitRead/Event model on Poll

=== Bug fixes

* lib/websocket: call Quit when handshake contains close or invalid frame
* lib/websocket: revert maxBuffer back to 1024

=== New features

* lib/ascii: add type Set
* lib/net: implement generic PollEvent

=== Enhancements

* lib/websocket: add option to set read/write timeout on Server
* lib/websocket: handle concurrent upgrade using goroutine
* lib/websocket: handle concurrent Server read using goroutines
* lib/websocket: handle concurrent ping using goroutines

=== Chores

* websocket/testdata: rewrite autobahn test using container
</content>
</entry>
<entry>
<title>lib/memfs: fix missing default case in select</title>
<updated>2023-07-03T19:02:16Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-07-03T18:54:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=8683dfc01f04019e2a9a75090f2c73502ae6a8f6'/>
<id>urn:sha1:8683dfc01f04019e2a9a75090f2c73502ae6a8f6</id>
<content type='text'>
While at it, fix flaky test on DirWatcher due to race condition when
accessing dirKeys.
</content>
</entry>
<entry>
<title>websocket/examples: enhance the server and client</title>
<updated>2023-07-03T16:16:23Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-07-03T15:44:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=462ba23cd4b2e425e65e18c38e5b39c479a6cb9d'/>
<id>urn:sha1:462ba23cd4b2e425e65e18c38e5b39c479a6cb9d</id>
<content type='text'>
In the server, change the listen port to 9101 to prevent conflict
with autobahn test suite.

In the client, add command "chat" and "chatbot".
The "chat" command run client chart as before.
The "chatbot" command create client for all known accounts and send
N messages continuously.
</content>
</entry>
<entry>
<title>lib/websocket: stop goroutines when no queue received after N duration</title>
<updated>2023-07-03T16:10:38Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-07-03T15:27:30Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=e94de9a9b7a474c092aeccaf91bb43ecb35f6acb'/>
<id>urn:sha1:e94de9a9b7a474c092aeccaf91bb43ecb35f6acb</id>
<content type='text'>
When the goroutine for upgrade, reader, or pinger does not receive
any input from its queue after N duration, stop it.
Currently, N equal to ServerOptions ReadWriteTimeout.
This allow unused goroutines released back to system, minimizing
resources usage.
</content>
</entry>
<entry>
<title>lib/websocket: reformat comments and documentation</title>
<updated>2023-07-01T10:25:15Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-07-01T07:46:38Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=7b01a3fc41b8611aa26c7d5d0f5c0f2bcd012ee0'/>
<id>urn:sha1:7b01a3fc41b8611aa26c7d5d0f5c0f2bcd012ee0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>lib/websocket: handle concurrent ping using goroutines</title>
<updated>2023-07-01T10:25:15Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-06-30T18:34:25Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=b9f69e549f1ecde42f34cc2dab6437bb62c42fe6'/>
<id>urn:sha1:b9f69e549f1ecde42f34cc2dab6437bb62c42fe6</id>
<content type='text'>
The maximum goroutines is quarter of max queue.
The new goroutine for pinger will be dispatched when no goroutine can
consume the current processed connection.
</content>
</entry>
<entry>
<title>lib/websocket: prefix the error with function or method names</title>
<updated>2023-07-01T10:25:15Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-06-29T14:24:44Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=091751a2e0e4f162454275e511a718d15ebf3886'/>
<id>urn:sha1:091751a2e0e4f162454275e511a718d15ebf3886</id>
<content type='text'>
Adding prefix provide better way to locate and debug the error in the
future.
</content>
</entry>
<entry>
<title>lib/net: changes the WaitRead/Event model on Poll</title>
<updated>2023-07-01T10:24:30Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-06-29T14:20:39Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=90203c3603bfbf01b5517fa9da49e276a506b733'/>
<id>urn:sha1:90203c3603bfbf01b5517fa9da49e276a506b733</id>
<content type='text'>
Previously, the Pool's WaitRead and WaitReadEVent methods return list of
file descriptor (fd) and keeps the fd in the pool.
In case we want to process the returned fd concurrently, by running it
in different goroutine, the next call WaitRead may return the same fd
if its goroutine not fast enought to read from fd.

This changes fix this issue by removing list of fd from poll and set the
fd flag to blocking mode again after returning it from WaitRead or
WaitReadEvent.

This changes also remove the ReregisterRead and ReregisterEvent methods
since it is not applicable anymore.
</content>
</entry>
<entry>
<title>lib/websocket: handle concurrent Server read using goroutines</title>
<updated>2023-07-01T10:23:26Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-06-27T16:36:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=1570b3182b534c5a0a952e54531fff9769430930'/>
<id>urn:sha1:1570b3182b534c5a0a952e54531fff9769430930</id>
<content type='text'>
The Server now dispatch a goroutine to consume event from poll reader
for each client connection that is ready to read.
The maximum number of goroutine is defined in ServerOptions
maxGoroutineReader, which currently set to 1024.
</content>
</entry>
<entry>
<title>lib/net: implement generic PollEvent</title>
<updated>2023-07-01T10:23:26Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-06-26T18:59:03Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/pakakeh.go/commit/?id=1623f171f048a0580474a41832dcdf409f63c0fe'/>
<id>urn:sha1:1623f171f048a0580474a41832dcdf409f63c0fe</id>
<content type='text'>
The PollEvent contains file descriptor and the underlying event
based on OS, unix.EpollEvent on Linux or unix.Kevent_t on BSD.

The Poll interface provides two APIs to works with PollEvent,
WaitReadEvents that return list of PollEvent ready for read, and
ReregisterEvent to register the event back to poll (only for Linux).
</content>
</entry>
</feed>
