7sharp9's blog
A cup of tea would restore my normality. - Douglas Adams
agents ast async concurrency csharp elixir elm fable fsharp functional-programming fuse games ios javascript mac mailboxprocessor metaprogramming microsoft mono monodevelop monogame monotouch myriad performance quotations running sockets threading tpl tpl-dataflow typeproviders videos xamarin youtube

© 2011 - 2020 7sharp9

Powered by Hugo with theme Dream.

Pipeline processing 3

Pipeline processing 3

Monday, Apr 4, 2011

@ 7sharp9

Ok so I have been offline for a while now, what with starting a new financial contract in London and not having any broadband access for a while. I have been working on something, honest! Since the last post I have been reflecting on the pipeline design and it had a distinct object orientated feel to it that I wasnt happy with, so I have amended the structure of the code and come up with the following which simplifies in some areas and expands in others…module Pipeline open System.
Sockets and Bockets 4

Sockets and Bockets 4

Friday, Jan 28, 2011

@ 7sharp9

Welcome to part 4 If you were looking forward to some exciting new F# code this time your going to be disappointed, however if you are like me and like looking at graphs and stats and digging in deeper into the code then your going to enjoy this, lets get started…I set up a 5 minute test with 50 clients connecting to the server with a 15ms interval between each one.
Sockets and Bockets 3

Sockets and Bockets 3

Thursday, Jan 20, 2011

@ 7sharp9

Welcome to part three! As promised heres a description of the inner workings. I’m sick to death of typing SocketAsyncEventArgs so from now on I will refer to it as SAEA.BocketPool The BocketPool has an interesting name and with it an interesting constructor! It takes the following parameters: number: The number of items to create in the BocketPool. size: The size of each buffer in bytes. callback: A callback function which is invoked whenever the SAEA object completes its operation.
Sockets and Bockets 2

Sockets and Bockets 2

Friday, Jan 14, 2011

@ 7sharp9

Welcome to part two Lets jump in at the deep end and take a look at some code… When you look at the method syntax for the xxxAsync methods you will notice they return a boolean value that indicates if the method completed synchronously, this means that you have to check the return value every time you use one of the methods and invoke the callback yourself if it completes synchronously.
Sockets and Bockets 1

Sockets and Bockets 1

Thursday, Jan 13, 2011

@ 7sharp9

Welcome to part 1 A while back I read an interesting article by Brian McNamara f-async-on-the-server-side which describes C# and F# versions of a simple asynchronous socket server, one of the driving forces behind the article was how F# can wrap the traditional asynchronous model with Asynchronous Workflows, this produces nice clean simple code compared to the C# version which uses lambda expressions, the code looks quite ugly in this style!

About Me

Hi, my name is Dave Thomas and Im a software engineer from the Uk. I work primarily in F# but also like to tinker with pretty much any interesting language. Im drawn to more functional languages like F#, Swift and Rust.

Have questions or suggestions? Feel free to ask me on Twitter.

Thanks for reading!

Dave Thomas