Posts
Generative Adversarial network
Adversarial training is the coolest thing since sliced bread.
–Yan LeCun (Quora Session)
Little preface:
A little background first. Traditional neural networks have an interconnected layer of computing nodes where in the first layer various input signals of the training data are fed and in the final layer are select number of nodes(each representing a class/category) each representing the probability of given data being into that certain category. Between the first and the last layer are n numbers of additional layers where input signals flow from one layer to another based on some cost function and other computations that follow along the connections (represented by weight of the connection).
read morePosts
Message Queuing (Kafka and Zookeeper) for Microservices and ML Solutions Pipelines
Microservice architecture is a philosophy of decoupling an otherwise large monolithic application into different independent modules (applications) interconnected with one another as well as external data sources using APIs. Message queuing comes into play in order to handle these inter-microservice and microservices-external-source communications, be it API calls or intensive data processing, blocking threads for which using synchronous model would render the entire application unresponsive.
Apache Kafka is one such platform. Officially, it’s known as a distributed stream processing platform with high resilience and fault tolerance.
read morePosts
Autowiring Generics In Spring
@Autowired is heavily used in Spring for injecting dependencies. By entrusting the framework itself to inject dependencies (eg: repositories interface) programmer can rest assurred and focus on core business logic of the application.
We can also use @Autowired in order to initialize java collections which use Generics. Let’s say we have an interface which could be implemented by a given number of classes. We can Register each of those classes in Spring Context with @Context annotation.
read morePosts
Equals and HashCode in Java
The parent of all ‘Object’ classes in Java has, among many, two notable methods: equals and hashCode. For the most of the part, we can go about without tinkering/overriding these methods, but they play a significant role when we are dealing with any kind of data structure whose implementation depends on hashing. Maps, Sets, and their various derivatives and implementations of the Java Collection framework depend on the hashing of objects.
read morePosts
Leveraging Lombok Annotations to spice up Java
Java is heavily criticized and hated for its verbosity. Even for things such as reading/writing files we have to ceremoniously write a lot of generic stuff. The increasingly popular Java library Lombok has been hugely successful in addressing this issue. It’s an annotation based Java library that plugs itself into editors, IDE, and build tools at compile time, facilitating the generation of boilerplate code and making the code clean and more readable.
read morePosts
SSH tunnelling using ngrok!
So, what if you want to expose your locally running server to the bigger world wide web (WWW)? The answer: “port forwarding on your router and time setting up dynamic DNS solutions”. I am glad that there is a tool now which allows developers to expose their local server to the internet using a single command with a plethora of options: over secure channel, with authentication enabled and also live inspection of the requests coming to the server to name a few.
read morePosts
Database Connection Pooling
DB Connections are expensive Normally following things happen when your backend service talks to a database:
service initiates a connection to DB using the database driver db does the authentication and establishes a network session (tcp) if succeeded program/service performs some db operation (CRUD) which follows authorization (if user/role is allowed to perform the requested operation) Now if the service decides to close the connection, it has to do these all over again which is quite an expensive process.
read more