Sourabh Sharma

Author
+ Follow
since Aug 27, 2021
Cows and Likes
Cows
Total received
5
In last 30 days
0
Total given
0
Likes
Total received
5
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sourabh Sharma

Thank you, Randy.

All the very best for your project and future endeavors.

Cheers!
1 month ago
Thank you, Germán.

Book has a reference app - ecommerce app. That has a UI that consumes the REST APIs. Therefore, it contains the Client Credential Grant flow that provides the JWT token. However, it also has custom implementation of Refresh token.

Hope this helps.

Cheers!

1 month ago
Thank you, Dinesh.

This book takes the e-commerce app as reference project. This project demonstrates end to end development (UI -> backend -> DB).

This book mainly covers API development using REST, Reactive APIs, gRPC, and GraphQL. However, keeping overall product development in perspective, it also teaches about the other related areas, like security, logging, tracing, testing automation, and app deployment in Kubernetes. Even, it has a chapter that teaches how to build a react-based frontend.

Hope this helps.

Happy Learning.

Cheers!

1 month ago

paul nisset wrote:Thanks Sourabh.
Can I assume that when people are talk about reactive programming in Spring ,it is the same as saying the  code makes asynchronous calls to an API or is there more to it than that?
Ultimately ,microservices communicate via http(s) protocol. So, I don't really understand what gRPC is or what problem it solves .

thanks,
Paul



Pure Non-blocking call is a key here like javascript. Spring supports it using WebFlux that makes use of Reactive libs.

gRPC has performance advantages over REST. gRPC Protobuf works on top of HTTP 2 and supports duplex (which isn't possible in REST) communication.
1 month ago
gRPC is a way to develop the APIs. Mobile devices work as gRPC client that consumes APIs from your backend server.

gRPC mobile client is more bandwidth efficient and reduces latency.
1 month ago
You may use Open API Specs in YAML or JSON. Once you write them in YAML/JSON then you can use OpenAPI generator to generate the models.
1 month ago
Hi Vishnu,

You only need to know Java. For people who do not know Spring or who want a refresher, there is a second chapter specifically written on Spring fundamentals.

Therefore, you can refer to this book and with each chapter, you would gain Spring knowledge as well as APIs and their implementations with respect to REST, Reactive APIs, gRPC, and GraphQL.

Happy Learning.

Cheers!
1 month ago
REST is built on top of HTTP. Therefore, it involves extra processing for parsing. You can pass data as a query string, headers, or body. Then, you can have data as plain text, JSON or XML. All data types need to serialize and deserialize.

There is no parsing overhead in gRPC and protobuf contains binary data.
1 month ago
Hi Carlos,

You can learn all about gRPC, GraphQL, and reactive REST APIs from scratch using this book. Having knowledge of API development skills will help you in your Job.

Cheers!
Sourabh Sharma
1 month ago
Hi Carlos,

Thanks for reaching out.

You only need to know Java programming. Everything else is explained in the book. Since you are already aware of the Spring, you can skip chapter 2. Chapter 2 (Spring fundaments) is there if someone does not know the Spring.

Happy Learning!

Cheers!
Sourabh Sharma
1 month ago
Hi Paul,

In the current environment, all systems are developed by keeping the integration with other services/systems in mind from day zero. Systems communicate with each other using APIs. API is a communication channel. You are using AWS services in your app, you need to consume AWS APIs. You want to use social feeds such as facebook/twitter in your app, you need to use their APIs. Social login solutions is also based on APIs. You are developing an HTML5 app, you need APIs. UI app consumes APIs and renders the data.

APIs developed to serve the request in a non-blocking, async way are part of the reactive paradigm. Reactive programming in Spring is facilitated by WebFlux, which supports fully non-blocking code. However, the programmer has to take special care of maintaining the non-blocking call. Reactive code allows you to use the resources such as CPU in an optimal way and gives you more throughput. Therefore, it is the preferred choice for cloud deployment. It also gives you added cost advantage.

gRPC is mostly used in backend systems, which are based on microservices. gRPC allows these microservices to communicate with each other.

GraphQL is another way to implement the APIs. It was developed by Facebook to increase the Facebook app performance on mobile devices. Later on, it was open-sourced and got popular among many leading tech companies.

Thanks,
Sourabh Sharma

1 month ago
Java 17 is optimized for performance. App running on Java 17 JVM can be light-weighted (if you package your artifacts intelligently). Spring boot can run on embedded web servers such as Tomcat/Jetty. Therefore, you don't need to install the webserver separately. Running your backend is straightforward such as `java -jar <path>/<app>.java`

Choice of technology should be considered based on functionalities and load rather than based on the organization size. If you think you might need to scale in the future then JVM based solution is the preferred choice.

gRPC should be preferred if you have more than 1 service deployed in the backend and these services communicate with each other.

GraphQL should be preferred over REST if you have a plan to serve handheld devices to optimize the number of calls.

You can use one of the samples from https://github.com/PacktPublishing/Modern-API-Development-with-Spring-and-Spring-Boot in your VM box to check the performance.
1 month ago

Omer Faruk Kurular wrote:Hi,
Do you think that the role of the gRPC in the market will be more dominant over REST in the future?
Thank you



gRPC is already being used as the preferred choice for inter-service communication. gRPC is far superior in performance as compared to REST. Therefore, microservices-based systems mostly use gRPC.

On the web (UI->Backend), REST is still the preferred choice. Recently, gRPC started supporting the web. GraphQL is a more popular choice nowadays and has more probability to replace REST from the top position.
1 month ago
Thank you all
1 month ago

Venkateshkumar Singaravelu wrote:What is the future for gRPC



gRPC is already very popular in large technical organizations for inter-service communication. May take traction in the future for the web as well.
1 month ago