gRPC’s secret recipe lies in the way serialisation is handled. Internally gRPC uses binary messaging using protocol buffers which runs on top of HTTP/2. So gRPC is a strongly typed, polyglot communication protocol that allows us to build request – response , style synchronous communication, as well as we can use duplex streaming.
Previously, we have demonstrated how to implement a bi-directional gRPC streaming server using python. Once the server implementation is ready we will implement the client. In order to implement the client we will have to use the same proto file as the server as that acts as a data contract between server and client. Proto file as follows.
So today we will demonstrate how to setup a bi-directional server using python & gRPC. The very first step to setup any gRPC streaming is to create a data contract in the form of a protocol buffer file. In our demonstration, we will use a simple contract that should be able to create some resource entries to the server in the stream and expect a response in the form of a stream.
In our previous tutorial, we have built a server to handle the bi-directional streams. Here we will build a bi-directional streaming client for the same with NodeJS. In order to implement the following tutorial, we need to have NodeJS 14+ installed on your system and the bi-directional gRPC streaming server is running successfully on the system. As the server is running as a part of the prerequisite so we will assume that all the required dependencies have been installed on the system.
gRPC also provides a unique capability for bi-directional streaming which could be used for any use cases starting from Chat server, persistent service-to-service connection, and lots more. Today we will learn how to implement bi-directional streaming using gRPC with NodeJS. We will build a bi-directional streaming server and client to create an article management application that will allow us to create articles in bulk using streaming.
MongoDB is a document database with the scalability and flexibility that you want with the querying and indexing that you need. MongoDB’s document model is simple for developers to learn and use, while still providing all the capabilities needed to meet the most complex requirements at any scale. They provide drivers for 10+ languages, and the community has built dozens more.
HTTP/2 works very similarly from the client perspective. We can still make GET requests, POST requests etc, and also we are still using a single TCP connection. But here we ended up using this single TCP connection, very efficiently. The client in this scenario , shoves as many requests at the same time into this pipe .This is called multiplexing.
In modern web graph database became the part of most of the connected applications. This provides ease of creating and track relations between different entities of the business. It’s not only limited to social media applications but also different other domains e.g. Recruitment, Finance, Banking as lots more. Now let’s try to build our first graph application using the Neo4J graph database on Ubuntu 20.04 LTS 64 bit environment.
A GPU – Graphics Processing Unit is a specialised processor with dedicated memory that conventionally performs floating point operations (Mathematical) required for rendering graphics. Hence, GPU frees up CPU cycles for other jobs. A GPU is smaller than a CPU but tends to have more logical cores. Which is why – GPU is better equipped to handle this operation as it is able to execute multiple logical operations in parallel.
gRPC is an acronym for Google Remote Procedure Call. It uses HTTP/2 protocol , however HTTP is not exposed to the API designer. The information is delivered using protobufs. The client here uses gRPC by having to decide which procedure to call and also uses the code generated stub to make a call and passes the expected parameter values. The client application communicates with the server on a different machine by directly making a method call like it were a local object.
Websockets defines an API establishing “socket” connections between a web browser and a server. It is a communication protocol, which allows to open a two-way interactive communication session between the user’s browser and a server. With this API, you can send messages to a server and receive event-driven responses(server side events) without having to poll the server for a reply.
In our previous tutorial, we have provided guide to install and run your very first project with MoCherry – The CherryPy MongoDB REST webservice engine. Here we will explain to create a sample REST based webservice with the framework.
We have to build an article management system where users can create / list / view / update / delete articles based using REST webservice.
In our previous tutorial we have explained, why we have started building MoCherry and how it will help developers to build REST webservices seamlessly with CherryPy with MongoDB support. Here we will demonstrate a step by step guide to build REST based CRUD operations using MoCherry framework.
Currently, MoCherry is not available from python pip repository directly. So we can use direct github link to install MoCherry and all it’s required dependencies to our system or virtualenv.
Julia is a fairly new programming language that is creating a lot of buzz in the field of technical and scientific computing. But don’t be raising your brows after reading the terms like scientific computing, it can also be used for general purpose and web programming.
In the year 2009 by Jeff Bezanson, Stefan Karpinski, Viral B. Shah under the supervision of Prof. Alan Edelman started to develop Julia at MIT (Massachusetts Institute of Technology). Later, in the year 2012 it was released for public use.
Python has been developed initially in 1991 and since then it has gradually evolved into the version 3.x. Most of us used python 2.7.x for a long time for different projects which is now came to the end of his lifecycle from 2020 onwards.
In the most recent release of python version 3.8, it has incorporated a set of kool features as an advancement. We will discuss a few of them below: Robust Function Arguments types, Reversible dictionary, Improved readability on Assignment expressions, f-string: elegant string formatting syntax, etc.
Revel is a high-productivity, extremely flexible web framework for the Go language which provides routing, parameter parsing, validation, session/flash, templating, caching, job running, a testing framework, and even internationalization and lots more. Revel provides the flexibility of custom Server, Session and Template engines. Here we will explain the steps to setup Revel development environment and build a sample REST webservice.
We at Techunits RnD team dedicate ourself towards unveiling bleeding edge technologies in the fields of Data Science, Neural Networks, Machine Learning and lots more. Join us now for some exciting discovery, discussion and submissions!
© 2019-2021 by Techunits | All rights reserved