Explore the Latest Google Products and Services | Ahex https://ahex.co/category/google/ Ahex Technologies focuses on offshore outsourcing, by providing innovative and quality services and value creation for our clients. Tue, 07 Oct 2025 05:55:27 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.3 202019870 Understanding gRPC and Protocol Buffers—A Modern Approach to Service Communication https://ahex.co/grpc-vs-rest-protocol-buffers-explained/?utm_source=rss&utm_medium=rss&utm_campaign=grpc-vs-rest-protocol-buffers-explained Mon, 06 Oct 2025 11:51:06 +0000 https://ahex.co/?p=108288 What is gRPC? gRPC, or Google Remote Procedure Call, is a high-performance framework that allows applications to communicate with each other efficiently over a network. Instead of building one massive application, developers often break down their projects into smaller services. These services need a way to talk to each other, and that’s where gRPC comes...

The post Understanding gRPC and Protocol Buffers—A Modern Approach to Service Communication appeared first on Welcome to Ahex Technologies.

]]>
What is gRPC?

gRPC, or Google Remote Procedure Call, is a high-performance framework that allows applications to communicate with each other efficiently over a network. Instead of building one massive application, developers often break down their projects into smaller services. These services need a way to talk to each other, and that’s where gRPC comes in.

How does gRPC work?

Imagine two friends trying to talk on a walkie-talkie. REST APIs are like having to say “over” after every message, it gets the job done but is a bit slow and can waste time. gRPC, on the other hand, is like a seamless, continuous conversation. gRPC uses Protocol Buffers for data, which are incredibly lightweight and fast. This makes gRPC a much more efficient “translator” for services, leading to faster data transfer and less bandwidth usage. It also has built-in support for features like streaming, which allows a constant flow of data without having to open and close connections repeatedly.

gRPC vs REST

gRPC Vs REST comparison

Definitions

  • Procedure : A procedure is just another word for a function or method in programming.
  • Procedure call : When you use/invoke a procedure (function), that’s a procedure call.
  • Remote Procedure Call: It means calling a function/procedure that exists on another computer (remote server) as if it were local.
  • gRPC : gRPC stands for Google Remote Procedure Call, an open-source, modern, AND high-performance framework for the implementation of RPC using HTTP/2 for fast communication and Protocol Buffers (Protobuf) for efficient data transfer.
  • Serializing : Converting an object into a format (binary or text) so it can be stored or sent over the network.
  • Deserializing: Taking the received data and converting it back to an object that the program can use.
  • Proto Buffer: Protocol buffers are language-neutral and platform-neutral data serialization formats developed by Google. It can be transmitted over a wire or be stored in the files. 

Understanding gRPC Core Concepts: HTTP/2, Protobuf & RPC Model

WHAT IS PROTOCOL BUFFERS?

Protocol Buffers (Protobuf) as its interface definition language (IDL), which is one of its primary enhancements of RPC. Protobuf is a flexible and efficient method for serializing structured data into a binary format. Data that is encoded in a binary form is more space-efficient and faster to serialize and deserialize than text-based formats like JSON or XML.

Json or XML are also serializing the data. But they aren’t fully optimized for the scenarios where the data is to be transmitted between multiple microservices in a platform-neutral way. That’s why developers prefer protocol buffers over them. Think of it like packing your belongings into a small, neat suitcase so they take up less space and are easier to carry. Key Benefits:- Smaller and Faster: Much more efficient than JSON or XML.

PROTO BUFFER VS JSON

GRPC:

gRPC stands for Google Remote Procedure Call. gRPC is an open-source, modern, high-performance framework created by Google that allows applications to communicate with each other as if they were calling local functions. But over the network, instead of sending plain text like REST (JSON over HTTP), gRPC uses Protocol Buffers. gRPC is a modern, open-source framework for building Remote Procedure Call (RPC) APIs.

PROTO:

A .proto file is like a contract that explains what services exist, what functions they provide, and what data they use. It’s written before any code, and from it, you can automatically create client and server code in many programming languages, like Java, Python, Go, C++, and more.

PROTOC:

protoc is the Protocol Buffers compiler. It takes your .proto file (the contract) and converts it into real code (classes and methods) in your chosen programming language. This way, both client and server can use the same generated code to talk to each other easily and consistently.

HTTP/2:

HTTP/2 protocol allows multiple requests under a single connection. It introduces multiplexing, header compression, server push, and binary framing, which makes it much faster and more efficient than HTTP/1.1.

MULTIPLEXING:

Multiple requests can be sent over a single TCP connection simultaneously, eliminating head-of-line blocking and reducing latency.

GRPC WORKFLOW:

When building a gRPC service, the process usually follows three key steps. Let’s understand them with a simple example of a User Service (where a client asks for user details).

  • Step 1 Define:
    • Write a .proto file using Protocol Buffers.
    • This file acts like a contract between client and server.
    • Example: Define a service GetUser that takes a user ID as input and returns the user’s details (name, email, etc.).
  • Step 2: Compile:
    • Use the protoc compiler to convert the .proto file into real source code.
    • Code can be generated in multiple languages like Go, Java, Python, or C#. 
    • Example: The same GetUser service definition can be turned into client and server code in any language.
  • Step 3: Implement:
    • On the server side, write the logic.
    • e.g., when GetUser is called, fetch details from a database and return them
    • On the client side, simply call GetUser as if it were a local function, and the server responds with the user info.
    • Example: The client requests user ID = 1 → server returns Alice, alice@example.com.

 WHAT IS SCHEMA?

syntax = “proto3”;    
message Person {   
string first_name = 1;     
string last_name = 2;      
  optional int32 age = 3;          
  float weight = 4;           
repeated string addresses = 5;
}
  1. syntax = “proto3”; This tells protobuf which version you’re using. proto3 is the latest version (simpler, most commonly used). Without this line, protobuf might assume proto2, which has more complex rules.
  2. message Person { … } : message defines a schema (like a class). Person is the name of the message, everything inside { … } are the fields that belong to Person.
  3. Each field follows this pattern: <type> <name> = <tag_number>;
  4. Each field has: type (string, int32, float, etc.). name (first_name, last_name, etc.)
  5. tag number (= 1, 2, 3…) → unique ID, Tag numbers must be unique within the message; these numbers are used in the binary format, not the names.  It means it never writes “first_name” or “last_name” as text to disk. Which saves space. Instead, it only writes the tag number + value.

Ex: [ tag=1 ][ “Alice” ]

[ tag=2 ][ “Johnson” ]

[ tag=3 ][ 25 ]

  1. repeated makes the field a list or array. 
  2. optional  makes the field optional, which means Protobuf doesn’t write unused optional fields into the binary. Normal fields still carry default values (e.g., 0 for numbers, “” for strings). With optional, you don’t store that default unless it’s explicitly set. Saves bandwidth + storage when sending over the network.

Key Features of gRPC

  • High Performance with HTTP/2:

gRPC uses HTTP/2 for fast, low-latency communication with multiplexing and header compression, ideal for microservices.

  • Cross-Platform & Multi-Language Support

gRPC works across platforms and languages, using .proto files to generate compatible client/server code.

  • Strongly Typed Contracts

gRPC’s .proto files define strict data and method contracts, preventing errors with strongly typed code.

  • Built-in Authentication & Security

gRPC ensures secure data exchange with SSL/TLS and supports flexible authentication like OAuth or JWT.

  • Efficient for Microservices

gRPC’s lightweight Protobuf and HTTP/2 streaming make it perfect for fast, reliable microservice communication.

  • Simple Request-Response

The client sends one request, and the server replies with one response, which is ideal for simple tasks like authentication.

  • Server Streaming

Client sends one request, server streams multiple responses, great for live updates like stock prices.

  • Client Streaming

Client streams multiple messages, server responds once, suitable for file uploads or batch data.

  • Bidirectional Streaming

Both client and server stream messages simultaneously, perfect for real-time apps like chat or gaming.

Advantages of gRPC

  • Performance Efficiency: gRPC’s use of HTTP/2 and binary serialization makes it faster and more efficient than traditional REST APIs, especially in high-performance environments.
  • Strong API Contracts: The use of protobuf provides a strict contract for API communication, reducing the likelihood of errors and improving compatibility across services.
  • Real-Time Communication: Support for bi-directional streaming allows for real-time communication, making gRPC ideal for applications requiring instant data exchange, like chat apps or live updates.
  • Built-In Code Generation: gRPC supports automatic code generation for client and server stubs in multiple languages, speeding up development and ensuring consistency.

Limitations of gRPC

  • Steeper Learning Curve: The use of Protocol Buffers and understanding HTTP/2 can require additional learning, especially for teams accustomed to REST and JSON.
  • Limited Browser Support: gRPC is not natively supported by browsers, which can limit its use in web applications without additional workarounds like gRPC-Web.
  • Complexity in Debugging: The binary nature of Protocol Buffers can make debugging more challenging compared to text-based formats like JSON, which are human-readable.

gRPC vs REST

Case study:

In my case study, I compared the latency, throughput, and resource usage of REST and gRPC APIs running on a Kubernetes cluster. With 90,000 requests handled per second as opposed to REST’s 66,000, gRPC performed better than REST. Additionally, it demonstrated a smaller memory footprint and reduced network bandwidth consumption, which made it perfect for microservices with demanding performance requirements.

Serialization caused gRPC to have a slightly higher initial latency, but it held steady under high loads. Web applications work well with REST because of its simplicity and reliability under moderate loads, even though it is less efficient.

 However, for microservices, I recommend using gRPC, as it is more efficient and cost-effective in cloud environments. In my case study, I compared the latency, throughput, and resource usage of REST and gRPC APIs running on a Kubernetes cluster. With 90,000 requests handled per second as opposed to REST’s 66,000, gRPC performed better than REST.

Additionally, it demonstrated a smaller memory footprint and reduced network bandwidth consumption, which made it perfect for microservices with demanding performance requirements. Serialization caused gRPC to have a slightly higher initial latency, but it held steady under high loads. Web applications work well with REST because of its simplicity and reliability under moderate loads, even though it is less efficient. However, for microservices, I recommend using gRPC, as it is more efficient and cost-effective in cloud environments.

gRPC cost effective

Comparison

gRPC vs REST Comparison

Example

martin code

The image above showcases a JSON object for a user named Martin, with a size of approximately 96 bytes due to its text-based structure, including field names and values like “favoriteNumber”: 1337 it is taking almost 20 bytes. This overhead highlights JSON’s inefficiency, as the need to store verbose field names increases data size significantly.

protocol buffers

The image above displays a proto file defined using Protocol Buffers, representing the same user data (username: “Martin”, favoriteNumber: 1337, interests: [“daydreaming”, “hacking”]) in a compact binary format. Unlike JSON’s 96-byte size, this proto file reduces the data to approximately 32-33 bytes by using numerical tags instead of text field names, as shown in the byte breakdown. This smaller size not only saves memory but also minimizes bandwidth usage, making it ideal for high-performance scenarios like microservices. Additionally, Protocol Buffers offer faster encoding/decoding and schema validation, ensuring data consistency and efficiency, which makes them a superior choice over JSON for optimized applications.

gRPC vs REST throughput comparison 2025

The chart shows how many tasks gRPC and REST can handle per second. For small tasks, gRPC manages 25,800, while REST handles 12,450, making gRPC 107% better. For large 1MB tasks, gRPC does 2,350 and REST does 1,250, with gRPC being 88% better. The blue bars for gRPC are taller, showing it works faster than REST.

gRPC vs REST comparison 2025

This chart measures how long tasks take in milliseconds, with lower time being better. For small tasks, gRPC takes 12.8 ms on average, while REST takes 24.5 ms, making gRPC 48% faster. For large 1MB tasks, gRPC uses 98 ms compared to REST’s 175 ms, a 44% advantage. The blue gRPC bars are shorter, proving it finishes tasks quicker.

Real-World Use Cases

1. Video Streaming & Entertainment (Netflix, YouTube, Gaming)

When you search for content or start a multiplayer game, multiple systems communicate:

  • Content recommendation engines
  • User preference databases
  • Real-time player/viewer data
  • Video quality optimization systems
  • gRPC enables lightning-fast coordination between these services

2. Ride-sharing & Financial Services (Uber, Banking Apps)

When you book a ride or make a payment, critical systems must work together:

  • Location tracking and route calculation
  • Payment processing and security verification
  • Real-time updates and transaction databases
  • Driver matching and account balance systems
  • gRPC ensures secure, high-speed communication between all components

3. E-commerce & Social Platforms (Amazon, Instagram, Google Services)

When you shop online or share content, numerous backend services coordinate:

  • Product inventory and search systems
  • Social feeds and notification engines
  • File storage and user authentication
  • Recommendation algorithms and checkout processes
  • gRPC manages the complex communication between these interconnected systems

Each example shows how gRPC acts as the “nervous system” connecting different parts of modern applications to deliver the fast, reliable experiences users expect.

Conclusion

Understanding gRPC and Protocol Buffers—A Modern Approach to Service Communication,” it’s clear that gRPC, powered by Protocol Buffers and HTTP/2, revolutionizes how services communicate in today’s distributed systems. Its ability to handle high-performance, low-latency interactions makes it a game-changer for microservices, real-time applications, and large-scale platforms like Netflix, Uber, and Google services.

By offering smaller, faster data serialization, robust security, and flexible streaming options, gRPC not only enhances efficiency and reduces costs but also ensures reliable and scalable communication across diverse languages and platforms. In conclusion, gRPC stands as an invisible yet indispensable backbone, delivering smoother, quicker, and more secure digital experiences that shape the future of modern applications.

gRPC Frequently Asked Questions

Q1: What exactly is gRPC in simple words?

A: gRPC is like a super-fast messenger that helps different computer programs talk to each other. Imagine it as WhatsApp for software—but much faster and more reliable.

Q2: Do I need to know programming to understand gRPC?

A: Not at all! You just need to know that it’s the technology making your apps faster. Like how you don’t need to understand how a car engine works to drive a car.

Q3: When to use gRPC over REST?

A: It depends on the use case. gRPC is better for high-performance, low-latency requirements, while REST is preferred for simpler, web-based integrations.

Q4: What protocols do gRPC and REST use?

A: gRPC uses HTTP/2, while REST typically uses HTTP/1.1 or HTTP/2, depending on the implementation.

Q5: When not to use gRPC?

A: Avoid using gRPC when browser compatibility is a priority or when simplicity and human-readable formats like JSON are required.

Q6: Does gRPC make my internet faster?

A: Not your internet speed, but it makes apps respond faster because they can communicate more efficiently. It’s like having a direct phone line instead of sending letters.

Q7: Is gRPC safe for my personal data?

A: Yes! gRPC has built-in security features. It’s like having a secure, encrypted phone call instead of shouting across a crowded room.

Q8: Will I notice if an app uses gRPC?

A: You’ll notice the benefits: faster loading, quicker responses, and a smoother experience. But you won’t see gRPC itself—it works invisibly in the background.

Q9: Is gRPC expensive?

A: For users, it’s free. For companies, it actually saves money because it uses fewer server resources and less internet bandwidth.

Code Examples  

Example 1: Ordering Food Online

syntax = “proto3”;
service OrderService { rpc GetOrderStatus (OrderRequest) returns (OrderResponse) {} }
message OrderRequest { string item = 1; int32 quantity = 2; }
message OrderResponse { bool available = 1; string price = 2; string delivery_time = 3; }

Contributors:

Team Nodejs. : Shubham,  Thanay,  Venu Gopal,  Saniya,  Akash,   Jayasree,  Arvindh,  Kiran,  Sai Meghana and Ajay Kumar. 

The post Understanding gRPC and Protocol Buffers—A Modern Approach to Service Communication appeared first on Welcome to Ahex Technologies.

]]>
108288
Digital Transformation https://ahex.co/digital-transformation/?utm_source=rss&utm_medium=rss&utm_campaign=digital-transformation Thu, 15 Nov 2018 17:26:27 +0000 https://ahex.wpenginepowered.com/?p=3182 1. DT definition continues to bedevil corporations. serious differences here. 2. Since CIO is increasingly getting involved in DT, the definition is getting even more narrower. not broader as was initially expected. 3. Digital related Technologies are getting  easier to comprehend for most corporations. So, is the improved delivery capabilities of most vendors. 4. Many...

The post Digital Transformation appeared first on Welcome to Ahex Technologies.

]]>
1. DT definition continues to bedevil corporations. serious differences here.

2. Since CIO is increasingly getting involved in DT, the definition is getting even more narrower. not broader as was initially expected.

3. Digital related Technologies are getting  easier to comprehend for most corporations. So, is the improved delivery capabilities of most vendors.

4. Many startups are offering serious value propositions can cannot be ignored.

5. Ecosystem large IT players are playing a better curation role for selecting startups for PoCs and subsequent contracting. This role (i think it was pioneered by Accenture; pls fact check me on  it) of Ecosystem player is truly useful in contracting startups for corporations, who do not have mandates to go beyond the big IT players.

6. DT has created tremendous excitement, but has equal number of sceptics. Especially, in the buyer / user  organisations.

7. User industry thinking is very different from IT industry thought process. IT industry is ignoring this aspect to its own detriment.

8. User industry senior leadership is enthusiastic about the tech industry offerings, but very sceptical about their business understanding – both  at functional level and at financial benefits levels.

9. IT Industry has great talent in all levels. But, has a tendency to over-sell, especially when more ground work is required. This over-selling nearly always comes back to haunt the CIO and the CEO. Be aware of that. Atleast.

10. There is serious need of transformation in most organisations. Boards and CEOs are aware of it. They want to use this tech opportunity to initiate wide ranging transformations. BUT

11. BUT. the leadership from user end and provider end is either over selling or under selling. clearly leaving the the boards highly unimpressed.

12. Big opportunities in working out clear methodologies of actual business transformation and measurable financial returns to mid to large corporations. No serious takers yet.

The post Digital Transformation appeared first on Welcome to Ahex Technologies.

]]>
3182
successful data migration onto SAP HANA https://ahex.co/successful-data-migration-onto-sap-hana/?utm_source=rss&utm_medium=rss&utm_campaign=successful-data-migration-onto-sap-hana Wed, 18 Jul 2018 21:52:45 +0000 http://ahex.wpenginepowered.com/?p=2793 SAP HANA is an in-memory data platform that lets you speed up business processes, simplifies your IT environment and delivers more business intelligence. SAP HANA removes the dire need to maintain your legacy systems as well as stored data to run your business more efficiently. This data can be either moved to be stored in...

The post successful data migration onto SAP HANA appeared first on Welcome to Ahex Technologies.

]]>

SAP HANA is an in-memory data platform that lets you speed up business processes, simplifies your IT environment and delivers more business intelligence. SAP HANA removes the dire need to maintain your legacy systems as well as stored data to run your business more efficiently. This data can be either moved to be stored in cloud or on-premise, as the business finds comfortable. This, in turn, enables analysts and developers to avoid having to write back or load data.

SAP HANA enables real-time delivery of analysis and transactions. Its major advantage is that it increases information processing efficiency because of its columnar format rather than traditional data processing in row-based memory. The high level of data compression makes SAP HANA architecture much smaller than traditional ones; however, it does require more server memory.

Steps for successful Data Migration to SAP HANA

SAP HANA is probably the most crucial technology invention from SAP in the past decade or so. All SAP products released post-HANA are capable and have the innate ability to adapt and integrate seamlessly to this platform. SAP HANA is one of the most powerful tools that SAP has to offer, out of its suite of products as it enables quicker integration, more data procession, improved ROI for every organization, etc. This is achievable, only if you know how to migrate organizational data appropriately onto SAP HANA.

Let us understand a few steps for successful data migration onto SAP HANA-

  1. The scope of HANA Landscape: Sizing the scope of SAP HANA is extremely crucial while creating your technical project plan. It helps you to understand maximum benefit from your investment while decreasing the long-standing total cost of ownership. Since the data is effectively compressed in HANA, it is not very easy to guess the amount of memory that would be required. It is best to check the size of the memory by using SAP Quick Sizer tool as well as reports and notes to ascertain the amount of memory that will be used in migration.
  2. Migration Approach: The platform where SAP HANA needs to be migrated needs to be ascertained before beginning with the process. You can easily deploy HANA on-premise to gain maximum control and low risk or in Cloud to increase flexibility and scalability. All this, at the core, depends on your budget allocation, resources, time and business needs. SAP has its cloud offering called SAP HANA Enterprise cloud, and it includes SAP HANA license, original cloud infrastructure as well as SAP managed services.
  3. Data purging: Data cleansing is crucial for effective migration to SAP HANA. It will lower your risk and reduce your cost drastically as the memory that is required is not certain. This will help in reduction of data footprint, HANA licensing costs, downtime, etc.
  4. Implementation standards: It is advisable to have a lot of time on hand to migrate technical projects as there is a higher risk of codes and backup getting deleted or duplicated. Successful migration of SAP HANA is possible if you follow standard set procedures rather than cutting corners to avoid the time lag.
  5. Trial Run: For any technical migration to be successful on SAP HANA is it best to do a trial run by validating your process in a sandpit environment first. Isolate your untested code and mimic the production without actually doing one. This will ensure that your SAP HANA migration is a success and can support the technical projects in its entirety. This will help you ascertain crucial points like time to migrate, realize the actual prowess of SAP HANA, understand issues in the sandpit environment to avoid time lags later and it gives you a great point of validation of running it in a non-productive environment.

When we talk about data migration from ECC to S/4HANA, we must keep in mind whether-

  • It is a New system
  • We are adopting a System Conversion or
  • Purging of data called Landscape transformation

All ECC to S/4HANA conversions take place on-premise and cannot happen on the cloud. Hence the above scenarios are for businesses that are already using classic SAP business suite. Few prerequisites for a successful data migration from ECC to SAP S/4HANA are installing an SAP Maintenance Planner, update the software using Software Upgrade Manager (SUM), Migrating data, Customizing, etc.

The post successful data migration onto SAP HANA appeared first on Welcome to Ahex Technologies.

]]>
2793
How to Create an AWS account and host your Application On AWS with S3. https://ahex.co/how-to-create-an-aws-account-and-host-your-application-on-aws-with-s3/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-create-an-aws-account-and-host-your-application-on-aws-with-s3 Fri, 15 Jun 2018 14:26:24 +0000 http://ahex.wpenginepowered.com/?p=2367 Overview : Are you Looking for creat an AWS account and host Application on AWS with S3? In order to serve static webpages ,hosting can be achieved in simple procedural steps instead to create mess by opting  use of virtual machine where we need to setup and configure a Web Server, manage Operating System and...

The post How to Create an AWS account and host your Application On AWS with S3. appeared first on Welcome to Ahex Technologies.

]]>
Overview :

Are you Looking for creat an AWS account and host Application on AWS with S3? In order to serve static webpages ,hosting can be achieved in simple procedural steps instead to create mess by opting  use of virtual machine where we need to setup and configure a Web Server, manage Operating System and Software updates, manage load-balancing and all the phases of fun that comes with it like server rotation, load distribution strategies and testability, installing security certificates, delegation permissions, user roles and many more.

To help you out of all these chaos, Amazon Simple Storage Service (Amazon S3) helps to serve Static web pages which includes frontend content such as HTML, JS, CSS, Images & etc. AWS S3 is storage on  the Internet.. You can accomplish these tasks using the simple and intuitive web interface of the AWS account Management Console.

 Amazon Web Services offer quite a neat solution, meet AWS account S3 or Amazon Simple Storage Service. It is described by Amazon as a “object storage with a simple web service interface to store and retrieve any amount of data from anywhere on the web. It is designed to deliver great  durability, and scale past trillions of objects worldwide”. In other words, this service can be described as a very reliable, auto-scaling, highly-customized Dropbox for developers (funny enough Dropbox uses S3 as a file storage facility). The pricing model revolves around file transfer and space used, but honestly, it’s quite cheap.It offers a free tier subscription of 12 months.

 To know more about Dynamic web pages (Includes frontend & backend) hosting with help of EC2 you can follow these links, as I m going restrain blog in Static web pages hosting with S3 

can-i-deploy-angular-js-to-aws-s3-bucket

To gather a deep knowledge on AWS S3 follow below links:

Introduction.html#overview about AWS S3
Documentation s3

So these are simple step which you need to follow in order to host your Static web page app on AWS account S3.

The steps are simple just go to https://aws.amazon.com/ 

Step 1: Create your free AWS Account.

1

2

Step 2:  You need to share your contact info.

3

Step 3:  You have  to share your payment information.

Don’t worry AWS will deduct small amount to verify your details which is refundable.

Capture

Step 4: your phone number verification.

The system screen will display 4 digit number which you need to enter during call once its verified you need to click on continue after which you will directed to  AWS account home page.

Now from product select AWS simple storage service(s3) or click on button in corner named as Sign in to the console enter credentials.

5

 Step 5: Create a new S3 bucket

Create a new S3 bucket, just keep in mind the bucket needs to be unique,upload your files, enable ‘website hosting’ and configure bucket policy to allow read-only for anybody. Just follow these screenshots:

6

Click on create at last after you are navigated to above tab :Name and region, Set properties, Set permission and Review. If you forget and want to change it later, you need to click on bucket name you created(refer arrow in this screenshot), from there you can switch by choosing any option (refer arrow in this screenshot)

prop

Step 6: Selecting Static web hosting

Now select ‘Static Website Hosting’, enable it.

static

Define the default index file (i.e. index.html) and now you can navigate to the endpoint provided in the ‘Static Website Hosting’ section(as highlighted below) to test your application. As a sanity check open a new browser in-private mode to ensure you’re not browsing the website as an authenticate AWS account user and copy the end point generated in your case.

index

Step 7:  Manage files and directory structure

Follow file and folder structure in proper way to launch your applications to get desired output.

folder

Click this Link :Help link in order to provide you with more info folder structure.

This blog is mainly focused on to every small important  steps which a viewer will need to host simple Static web pages with help of  AWS (Amazon S3 ).  I have tried to add all screen shots and info at each step to land you in better platform of static hosting.

Hope so this blog will be helpful in your problems related to web pages hosting.

Feel free to post your comment related to blog topic. As its my first blog I will feel great to know about your feedback, query and how this blog helped you in your prob, it will help me to improvise it.

The post How to Create an AWS account and host your Application On AWS with S3. appeared first on Welcome to Ahex Technologies.

]]>
2367
Google Sign in SDK integration for ios apps https://ahex.co/google-integration-ios/?utm_source=rss&utm_medium=rss&utm_campaign=google-integration-ios Tue, 29 May 2018 07:35:54 +0000 http://ahex.wpenginepowered.com/?p=2286 Google plus login lets users login into your iOS app with their existing Google account and get their profile information like name, email and other details. By integrating google plus login in your apps, you can get all the user details in one shot. The major advantage of integrating G+ login is, you can drive...

The post Google Sign in SDK integration for ios apps appeared first on Welcome to Ahex Technologies.

]]>

Google plus login lets users login into your iOS app with their existing Google account and get their profile information like name, email and other details. By integrating google plus login in your apps, you can get all the user details in one shot. The major advantage of integrating G+ login is, you can drive more users to your app by providing quicker & easiest way of signup process.

So let’s start by doing required setup.

Step 1: Set up your CocoaPods dependencies

Google Sign-In uses CocoaPods to install and manage dependencies. Open a terminal window and navigate to the location of the Xcode project for your application. If you have not already created a Podfile for your application, create one now:

  1. Open your terminal and type CD “—project path—”
  2. Type “pod init” , now Podfile will be created in your project, and open that pod file by using command “open podfile
  3. Now in the podfile, type command like   pod ‘GoogleSignIn’  ” to install all requirement frameworks like “Google signIn”, “GoogleToolboxForMac”, “GTMOAuth2”, “GTMSessionFetcher”…etc

podInstallation

Now in Terminal,  while installing all above frameworks it will be looks like below screenshot.

podInstallation_2

This creates an .xcworkspace file for your application. Use this file for all future development on your application.

Step 2: Get Google Sign-in Client ID:

Google sign in Client ID is an ID that allows us to make calls to Google API within our iOS based application.

To get ClientID follow below steps:

  1. Sign into Google Developers Console with the help of your Google Account.
  2. If you have not created any app then create it. If created, then choose your app and add it to bundle identifier. Now choose your country and then click to continue Button to proceed ahead.
  3. Select the Google service that you want to make use of. Now, Select Google Sign-in & click -> ENABLE GOOGLE SIGN-IN to enable Google sign in service.
  4. Whenever you click on “Enable button”, it will sanction Google Sign in for your app.
  5. Whenever you enable Google Sign-in for your app, click -> Continue button that will generate configuration files for you.
  6. Now, you will be navigated to download the configuration file. Click -> Download GoogleService-info.plist button to download the configuration file. This file will be used for later purposes.

Now open downloaded plist .and it will be like the below screenshot.plist

Step 3: Add a URL scheme to your project:

Google Sign-in requires a custom URL Scheme to be added to your project. To add the custom scheme:

  1. Open your project configuration: double-click the project name in the left tree view. Select your app from the TARGETS section, then select the Info tab, and expand the URL Types section.
  2. Click the + button, and add your reversed client ID as a URL scheme.
    The reversed client ID is your client ID with the order of the dot-delimited fields reversed. For example you can check in above screenshot.
  3. When completed, your config should look something similar to the following (but with your application-specific values):

URLSchemes

4. Now that you’ve downloaded the project dependencies and configured your Xcode project, you can add Google Sign-In to your iOS app.

Step 4: Enable SignIn:

(A) To enable sign in, you must configure the GIDSignIn shared instance. You can do this in many places in your app. Often the easiest place to configure this instance is in your app delegate’s application:didFinishLaunchingWithOptions: method.

  1. In your app delegate’s .h file, declare that this class implements the GIDSignInDelegate protocol.

gidProtocol

(B) In your app delegate’s application:didFinishLaunchingWithOptions: method, configure the GIDSignIn shared instance and set the sign-in delegate.

didFinishLaunching

(C) Implement the application:openURL:options: method of your app delegate. The method should call the handleURL method of the GIDSignIn instance, which will properly handle the URL that your application receives at the end of the authentication process.

applicationOpenURL

(D) For your app to run on iOS 8 and older, also implement the deprecated application:openURL:sourceApplication:annotation: method.

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation 
{
  return [[GIDSignIn sharedInstance] handleURL:url
                             sourceApplication:sourceApplication
                                    annotation:annotation];
}

(E) In the app delegate, implement the GIDSignInDelegate protocol to handle the sign-in process by defining the following methods which are showing in below screenshot.

Our Services are Mean Stack Development | Mern Stack Development

AppDelegate

Step 5: Add the sign-in button

Next, you will add the Google Sign-In button so that the user can initiate the sign-in process. Make the following changes to the view controller that manages your app’s sign-in screen:

(A) In the App Delegate.h file, add the Google Sign-In interface and declare that this class implements the GIDSignInUIDelegate protocol.

In ViewController.h file copy below this.

viewController

(B) In the view controller., override the viewDidLoad method to set the UI delegate of the GIDSignIn object, and (optionally) to sign in silently when possible.

viewController(m)

(C) In these examples, the view controller is a subclass of UIViewController. If in your project, the class that implements GIDSignInUIDelegate is not a subclass of UIViewController, implement the signInWillDispatch:error:, signIn:presentViewController:, and signIn:dismissViewController: methods of the GIDSignInUIDelegate protocol. For example you can add below code .

viewController(m)_1

(D) Add a GIDSignInButton to your storyboard, XIB file, or instantiate it programmatically. To add the button to your storyboard or XIB file, add a View and set its custom class to GIDSignInButton.

Storyboard

(E) If you want to customize the button, do the following:

    • In your view controller’s .h file, declare the sign-in button as a property.
      @property(weak, nonatomic) IBOutlet GIDSignInButton *signInButton;
    • Connect the button to the signInButton property you just declared.
    • Customize the button by setting the properties of the GIDSignInButton object.

Step 6: Sign out the user

You can use the SignOut method of the GIDSignIn object to sign out your user on the current device, for example:

In ViewController.h, copy below code:

- (IBAction)didTapSignOut:(id)sender 
{
  [[GIDSignIn sharedInstance] signOut];
}

Step 7: Retrieving user information

Once the user has authenticated and authorized access to the scopes you request, you can access user information through the GIDGoogleUser object.

Copy Below Code in ViewController.m class :

viewController(m)_2

Now Run your application and Click on Login button on simulator, it will be redirected to the gmail sign in page, there you have to enter email id and password, and these credentials will be secured and this screen something looks like below screenshots.

googleSignIn

After submission of your credentials click on “NEXT” button and now the new page will be opened with a title of accounts.google.com and this page will asks you like “are you want to access your google account?” And stating with your email id. Now below in this page you can see two buttons as CANCEL and ALLOW.

Now Click on ALLOW, and again you will be redirected to another screen where you will find all the details of your google account such as name email id, phone number , date of birth..etc.

googleSignIn_2

You can get your client ID, UserId, Full Name, Email ID..etc in your console.. the same I am showing in simulator for your reference.

google_SignIn_3

The post Google Sign in SDK integration for ios apps appeared first on Welcome to Ahex Technologies.

]]>
2286