Shared info of IoT & Cloud, Banking, Angular Wicket, Spring Microservices, BigData, flutter, E-comm, Java Telecomm and More

Showing posts with label IoT-Networking. Show all posts
Showing posts with label IoT-Networking. Show all posts

Monday, September 3, 2018

Java Concurrency

1. Java Concurrency from docs.oracle.com
Computer users take it for granted that their systems can do more than one thing at a time. They assume that they can continue to work in a word processor, while other applications download files, manage the print queue, and stream audio. Even a single application is often expected to do more than one thing at a time. For example, that streaming audio application must simultaneously read the digital audio off the network, decompress it, manage playback, and update its display. Even the word processor should always be ready to respond to keyboard and mouse events, no matter how busy it is reformatting text or updating the display. Software that can do such things is known as concurrent software.
The Java platform is designed from the ground up to support concurrent programming, with basic concurrency support in the Java programming language and the Java class libraries. Since version 5.0, the Java platform has also included high-level concurrency APIs. This lesson introduces the platform's basic concurrency support and summarizes some of the high-level APIs in the java.util.concurrent packages.

Java EE 7: Building Web Applications with WebSocket, JavaScript and HTML5

Purpose

how to create an application that uses the WebSocket API for real-time communication between a client and a server:
  • Create a Java Platform, Enterprise Edition 7 (Java EE 7) application that uses the WebSocket API
  • Use the OnOpen and OnMessage WebSocket lifecycle events to perform different actions on the Java EE 7 application.
  • Define a client-side WebSocket endpoint by using JavaScript
  • Operate on Plain Old Java Objects (POJOs), in real-time, with actions invoked from a web browser client

Tuesday, August 8, 2017

Apache MINA Spring

1-What is Apache MINA?

Apache MINA (Multipurpose Infrastructure for Network Application) is an open source java network application framework. MINA is can be used to create Scalable, high performance Network applications. MINA provides unified API's for various transports like TCP, UDP, Serial communication, In-VM pipe. It also makes it easy to make an implementation of custom transport type. MINA provides both high-level and low-level network API's.
Application Structure

MINA based Application Architecture

Friday, June 23, 2017

Java DateTimeFormatter


ThingWorx: Datetime format to be used in JavaScript with parseDate
  • The format strings used by the parseDate function are based on Java's DateTimeFormatter class. 
  • Format strings used by parseDate are case sensitive.
  • Some of the common placeholders used by parseDate
    • yyyy = Year (4 digits)
    • yy = Year (2 digits)
    • MM = Month (numeric)
    • dd = Day
    • HH = Hours (24h)
    • hh = Hours (12h)
    • mm = minutes
    • ss = seconds
    • SSS = milliseconds
    • a = AM/PM
    • zzz or ZZZ = timezone
      • zzz assumes GMT with zero offset
        • parseDate(newDate , "yyyyMMddHHmmsszzz")
      • ZZZ - GMT zero offset must be explicitly set or UTC can be used
        • e.g GMT0 or UTC
        • parseDate( newDate , "yyyyMMddHHmmssZZZ")

Friday, April 14, 2017

Tuesday, September 13, 2011

Socket Programming


Introduction

Sockets are interfaces that can "plug into" each other over a network. Once so "plugged in", the programs so connected communicate.This article discusses only simple aspects of stream inet sockets (don't worry about exactly what that is right now). For the purposes of this article, a "server" program is exposed via a socket connected to a certain /etc/services port number. A "client" program can then connect its own socket to the server's socket, at which time the client program's writes to the socket are read as stdin to the server program, and stdout from the server program are read from the client's socket reads. This is one subset of socket programming, but it's perhaps the easiest to master, so this is where you should start.
Diagram of a simple xinetd socket usage


Diagram of client-server socket connection via xinetd.
Note that the client communicates by reading and writing the socket,
but the server program communicates via stdin and stdout.

Sunday, February 20, 2011

Saturday, December 18, 2010

Bộ giao thức TCP/IP, Ipv4, Ipv6

Ngày nay, cùng với sự phát triển lớn mạnh của Internet thì bộ giao thức nền của nó TCP/IP cũng trở nên phổ biến ở mọi lúc, mọi nơi. TCP/IP phát triển đến mức mà đôi khi người ta còn quan niệm rằng bộ giao thức này là bộ giao thức bắt buộc đối với các hệ điều hành và các ứng dụng mạng lớn. Để giải đáp thắc mắc của bạn đọc xung quanh vấn đề này, chúng tôi xin được giới thiệu một cách hệ thống về bộ giao thức TCP/IP, Ipv4, Ipv6.

Có thể hiểu như sau: Transmission Control Protocol/Internet Protocol (TCP/IP) là một bộ giao thức chuẩn công nghiệp được thiết kế cho mạng Wide area Networks Wans (WANs). Ngoài ra, TCP/IP cũng là một chuẩn giao thức cho mạng Internet.
Như các bạn đã biết, mặc dù mô hình 7 lớp OSI được thiết kế năm 1979 nhưng khái niệm phân lớp giao thức tồn tại rất lâu trước khi chúng được mô hình OSI áp dụng chính thức. Một ví dụ của giao thức thành công trước kia sử dụng khái niệm xếp lớp giao thức chính là bộ giao thức TCP/IP. Vì lịch sử của TCP/IP gắn liền với Bộ Quốc phòng (Department of Defense), nên việc phân lớp của bộ giao thức TCP/IP được gọi là DoD. Mô hình DoD bao gồm 4 lớp: Application, Transport, Internet và Network interface:


Popular Posts

Blog Archive