Showing posts with label cloud services. Show all posts
Showing posts with label cloud services. Show all posts

Thursday, July 9, 2020

Create P2P connections with WiFi Direct in android

What is Android Wi-Fi P2p APIs?
It allows nearby devices to connect and communicate among themselves without needing to connect to a network or hotspot.

Advantages over traditional Wi-Fi ad-hoc networking?
  • Wifi-Direct supports WPA2(Wifi Protected Access) encryption.
  • Android doesn't support Wi-Fi ad-hoc mode.

Let's implement : 

Set up application permissions :
Set up a broadcast receiver :
With the help of broadcast receiver we will be able to listen various phases of connections between 2 devices.
Constructor of broadcast receiver class : 
The onReceive() method of broadcast will look like this : 
Create an activity and register broadcast receiver : 
1- Create intent Filter : 
 
WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION : Indicates a change in the Wi-Fi P2P status.
WifiP2pManager.WIFI_P2P_PEERS_CHANGED_ACTION : Indicates a change in the list of available peers.
WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION : Indicates the state of Wi-Fi P2P connectivity has changed.
WifiP2pManager.WIFI_P2P_THIS_DEVICE_CHANGED_ACTION : Indicates this device's details have changed.


2- Register receiver in OnCreate : 
Listen to broadcast receiver :

1- Now when you run the application you will find that your control will get to the WIFI_P2P_STATE_CHANGED_ACTION, so this the point where you will start finding the peers(nearby you) if your WIFI state is enabled.
So in your broadcast receiver check the wifi-state and start listen for peers if it is enabled.


And your startFindPeers method will look like this on Activity : 


2- As soon as you successfully discover the nearby peers the WIFI_P2P_PEERS_CHANGED_ACTION in your broadcast receiver class gets trigerred, so this is the point to get the list of all the available devices.
So, inside your broadcast onReceive method and add the following code in WIFI_P2P_PEERS_CHANGED_ACTION and register your peer callback : 


This requestPeer() method is implicitly provided by WifiP2pManager class but this peerListListener is custom and is used to as a callback for peerList : 
PeerListener will be like this : 

3- Now if the call is successful then you will get the list of all available devices with various other parameters in onPeersAvailable, iterate through the list and select one device to connect.
Now next step is to get the peer configurations of the selected item in the peerList and connect with peers using deviceAddress : 

   

4- Once we get the successfull connection with the peer the WIFI_P2P_CONNECTION_CHANGED_ACTION is trigerred and this is the point to get the connection info from the connectionListener callback.
 The connection info can be get by passing connection callback as a parameter in requestConnectionInfo() method.

And the connectionInfoListener will look like this :


Great our peers are now connected to each other and can transfer data between themselves.

5- To transfer the data you have to create a client and server class based on available connection info.
Let's take a look at server class  : 
This is the client class : 
So finally, the sockets are now connected to each other and data transfer can be done easily using input and output streams of the socket.

We are a seasoned SaaS app development company that provides full-scale software solutions using next-gen technologies. Our team of developers is experienced in using the latest tools and SDKs to build performance-driven and user-friendly software solutions for multiple platforms. We also specialize in providing end-to-end DevOps solutions and cloud app development services for varied business requirements. For technical assistance, contact us at info@oodlestechnologies.com and share your requirements.

Tuesday, June 23, 2020

An Introduction To Amazon Managed Streaming For Apache Kafka


The popular video stream-processing software, Apache Kafka has gained significant traction over the recent years. The open-source tool that is mainly used for processing live streaming data, Kafka provides real-time analytics to derive maximum value from the streaming media content. Kafka has grown tremendously as many organizations have adopted this platform for building real-time data pipelines and video streaming applications. That being said, over one third of the fortune 500 companies use Kafka to run and manage their video streaming operations.

Seeing its increasing popularity, Amazon rendered its cloud support for Kafka to build and deploy applications that facilitate video stream processing. With the advent of Amazon MSK (Amazon Managed Streaming for Kafka), it has become easy to build and run real-time data pipelines and streaming applications. Amazon MSK also lets you populate various data lakes and stream variations from databases. Furthermore, you can use it to power machine learning algorithms and build applications with real-time analytics features.  


Challenges With Apache Kafka

Despite the many benefits, Apache Kafka clusters are not easy to set up, scale, and manage in the production environment. Developers must manually configure Kafka before they can run it. Additionally, it requires provision servers, in case your existing servers incur any unanticipated failure. 

Developers must orchestrate server patches, system upgrades, optimize clusters, and consistently manage scaling events to support load changes. Above all, developers need to ensure that data is securely stored for easy accessibility.  

How Amazon MSK Overcomes These Challenges

Amazon Managed Streaming for Kafka (MSK) enables developers to build and run streaming applications on Apache Kafka with ease. With Amazon MSK, they do not require expertise from Kafka infrastructure management services as Amazon renders complete support for building and deploying applications. As a result, developers can focus on the core development operations without getting into complexities of infrastructure management. 

How It Works?

Amazon MSK console lets you create fully managed Apache Kafka clusters that are easy to configure, run, and deploy. With MSK, you do not need to acquire provisional servers as it automatically runs Kafka clusters on the AWS cloud. 
kafka
In addition, Amazon MSK continuously monitors cluster performance and replaces faulty nodes with new ones to ensure smooth app functioning. It also provides top-notch security to Kafka clusters by enabling end-to-end data encryption. 

Benefits of Amazon MSK

Amazon MSK provides a fully managed, secure, and more efficient way to run, manage and deploy Apache Kafka clusters. Below are the main enterprise benefits of using Amazon Managed Streaming for Apache Kafka. 

Fully Managed

Amazon MSK enables developers to build scalable streaming applications with Kafka without using Apache Kafka infrastructure. It also eliminates the requirement of procuring provisional servers as the clusters can be managed directly on the AWS cloud. In addition, it significantly reduces the complexities related to configuration and maintenance of Kafka clusters and Apache ZooKeeper nodes. 

Compatibility

Amazon MSK renders open-source compatibility and provides full support for third-party tools like Apache Flink, Spark, and HBase. It is also fully compatible with tools like Flume, Storm, Prometheus, and MirrorMaker.

Security

It provides multi-fold security for Kafka clusters at different levels of operations. The top-tier security rendered by Amazon MSK includes VPC network isolation, control-plane API authorization, TLS-based authentication, in-transit encryption and data-plane authorization.

High Availability

Amazon Managed Streaming for Kafka enables multi-AZ replication for Apache Kafka clusters on the AWS cloud. As already mentioned, Amazon MSK continuously monitors Kafka clusters and automatically replaces them in case of the component failure. 


Closing Thoughts

Apache Kafka is an extremely useful software that possesses higher throughput and replication characteristics, making it ideal for tracking IoT sensors with high accuracy. Developers can also use it in combination with other tools like Flume, Spark, Flink, Storm, and HBase. However, using Amazon Managed Streaming for Kafka gives you better flexibility and elasticity to easily accomplish complex development and deployment tasks. 

Avail Our AWS Development Services To Streamline Your IT Operations

We are an experienced cloud app development company that specializes in building cloud-based live video streaming apps with custom features. Our development team is skilled at using Amazon MSK platform to build, deploy, and scale feature-rich cloud applications with Apache Kafka’s seamless real-time streaming capabilities. Our end-to-end AWS cloud services include design, development, deployment, scaling, and QA testing to ensure that your app performs smoothly across the supported devices.

Benefits of Automation Through Microsoft Azure IoT Suite

The internet of things has grown in popularity as the number of connected devices has increased considerably over the past few years. According to Gartner, the global IoT market is expected to grow to 5.8 billion endpoints by the end of 2020. Having said that, the compound annual growth rate will be 21% as compared to the previous year. The advent of smart home automation technologies has unlocked new business opportunities for IoT application development Services



When it comes to IoT app development, a majority of businesses prefer cloud computing services to develop a centrally-managed IoT application. To address the increasing requirements of IoT app development, cloud platforms like AWS, Microsoft Azure and Google Cloud (GCP) have come forth with their unique serverless offerings. That being said, Microsoft Azure is rightfully considered a leading service provider for cloud-based application development. The Azure IoT Suite enables developers to build, deploy, and launch scalable IoT solutions for varied business requirements.

At Oodles Technologies, we have gained vast experience in cloud-based IoT app development services. Our development team is skilled at using cloud platforms like AWS, Azure, and GCP to develop scalable IoT apps with custom features. In this blog post, we enumerate the main benefits of Azure IoT Suite for building enterprise-grade applications with central tracking and analytics capabilities. 


An Introduction To Azure IoT Suite
Microsoft Azure is one of the fastest-growing cloud platforms for building IoT-based applications. According to Business Insider, it is the second largest cloud platform for IoT application development after AWS. Azure IoT Suite provides a comprehensive SaaS solution with a set of open-source SDKs to develop, scale, deploy, manage, and run user-centric IoT applications over a serverless cloud architecture.

Azure IoT Service At a Glance
Azure IoT Suite includes several independent cloud-based IoT services to address different types of project requirements. Let’s discuss these services and their significance in cloud-based IoT application development.

Azure IoT Central
Azure IoT Central is a cloud service that lets you connect the new and existing IoT devices to the Azure cloud. Furthermore, it enables developers to build a simple yet effective IoT app with real-time analytics capabilities. IoT central is extremely useful for decision makers who need a simple interface to track the connected devices and gain insights into data.

It provides several built-in templates based on the industry use cases to accelerate the development process and reduce time-to-market. Most importantly, it lets you integrate your IoT app seamlessly with the existing business infrastructure and third-party services. 

Azure IoT Hub
Azure IoT Hub lets you establish a reliable connection between Azure cloud and the IoT devices to facilitate a seamless communication. It is capable of handling billions of connected devices without affecting the cloud infrastructure. 

Developers can use Azure IoT Hub to securely channelize data between devices and establish a smooth two-way communication. It maintains a smooth flow of user commands from backend to the connected devices. At the same time, it ensures security and privacy of various communications through device registration, authentication, and message delivery authentication.

Azure IoT Edge
Azure IoT Edge enables enterprises to extend the capabilities of an IoT system with edge intelligence. The service lets you move some of your IoT data (including analytics and messages) to the edge computing devices. In this way, you can offload operations in the cloud, thereby reducing the bandwidth and overhead costs. It further accelerates the decision-making process and lets you operate offline as well. Above all, it facilitates provisioning and management of edge devices for better user convenience. 

You may also be interested in reading Building and Deploying ML Models On The Google Cloud

Benefits of Azure IoT Platform
Understandably, Azure IoT Suite offers some of the best services to develop, run, and manage IoT applications with better flexibility. Below are the main benefits of automation through Azure IoT Hub.

  • Simplified coding interface
  • Ready-to-use device templates
  • Real-time data analysis and visualization
  • Secure authorization and authentication
  • Flexible pricing model
  • Robust community support
  • Easy integration with third-party services

Conclusion
The future of IoT and smart home automation looks bright and promising. With the increasing applications of connected devices and industry use cases, it seems evident that IoT could be a mainstream technology in the near future. At the same time, cloud platforms like AWS, Azure, and GCP continue to evolve, bolstering their support for the internet of things. 

Why Choose Oodles Technologies For Cloud-based IoT App Development?
We are a seasoned cloud app development company that specializes in building scalable IoT and smart home applications using the latest tools and technologies. Our development team holistically analyzes your project requirements and formulates effective strategies to build a performance-driven IoT app that streamlines business processes. We have successfully completed full-fledged IoT projects for our clients with a focus on cloud-based automation.