Asynchronous Server Application Example – Java

Async Server

Asynchronous server application is not suspended while it waits for a connection from a client. If we spin up threads for each session, then the server waits for the IO operations which we don’t want. This example project shows handling tcp sockets Asynchronously without running separate threads for each session.

The example async socket server is available on github.

Continue reading

Apache Flink Stateful Streaming Example

Apache Flink Stateful Streaming

Today, We will create simple Apache Flink stateful streaming word count application to show you up how powerful apis it has and easy to write stateful applications. Stream processing is one of the most important component of modern data driven application pipelines. There is a nice article here which is more about the use cases, stateful term definitions and business values of it. In this article I want to focus more on stateful scenario .

Continue reading

Continuous Integration & Delivery vs Deployment


Continuous Integration


It is the practice that requires developers to integrate the code into a shared repository at least once a day. The integration is followed up by a build and test steps to solve problems quickly. Then you can fix the problems easily before they get serious. It would be hard to find and fix them on the repository where the developers don’t integrate their changes so often. When they do, they will be able to add new features instead of spending more time on debugging. Everyone can see what is happening on the repository. Unit and Integration tests have important roles on that pipeline. Overall, reduced risks, release more often and provide higher quality products.

“Continuous Integration doesn’t get rid of bugs, but it does make them dramatically easier to find and remove.”

— Martin Fowler, Chief Scientist, ThoughtWorks

Continue reading

.Net Core 2 IdentityServer4 Example – OpenId OAuth2

Since .netCore released I couldn’t find much information about how to implement either oauth2 or openId .I found identityServer4 easy to create an authorization server and did an example how to set it up. I hope this article will be helpful for some who is looking for what it is and how to implement identityserver4 along with refreshtoken on the .net core 2. So,what is IdentityServer4 ? IdentityServer4 is an OpenID Connect and OAuth 2.0 framework for ASP.NET Core. It is free and also has support for commercial uses.We’ll be creating hybrid authentication flow to implement refresh token using grant types Resource Owner Password Credentials(ROPC) and Refresh Token.  I won’t be explaining all protocols here. If you need further information you can checkout IdentityServer4  ,OAuth2 and OpenId. Let’s dig into some coding.

Continue reading

Simpson’s 3 8 Method C Code – Integration

Simpson’s 3 8 Method C Code

I will share the Simpson’s 3 8 Method C Code. There are other methods that can calculate the integration more accurate but today I’ll share one of my class notes which can be helpful who is looking for an easy implementation of this method. The function that I use for this program is ex whose integration is same as itself. You can implement your custom function easily overriding  f(double x) prototype. Program requires lower, upper bound of integration and the n ( part count ) as an input. You can get more accurate results when you give n is high enough. Because the method is applied each part independently. You can check out code of the program below. The method detailed information.

Continue reading

© 2021 Sinan Bir

Up ↑