The document discusses Java networking concepts including sockets, TCP, UDP, client-server programming, and key networking classes like InetAddress, ServerSocket, Socket, DatagramSocket, and DatagramPacket. It provides code examples for basic TCP and UDP client-server applications in Java using sockets to demonstrate sending and receiving data over a network.
The presentation given at MSBTE sponsored content updating program on 'Advanced Java Programming' for Diploma Engineering teachers of Maharashtra. Venue: Guru Gobind Singh Polytechnic, Nashik
Date: 22/12/2010
Session: Java Network Programming
Java Network Programming getting started, Getting Started with java network programming, two tier architecture, java client server programming, core java, java to standard edition, core java, Introduction to network programming in java
The presentation given at MSBTE sponsored content updating program on 'Advanced Java Programming' for Diploma Engineering teachers of Maharashtra. Venue: Guru Gobind Singh Polytechnic, Nashik
Date: 22/12/2010
Session: Java Network Programming
Java Network Programming getting started, Getting Started with java network programming, two tier architecture, java client server programming, core java, java to standard edition, core java, Introduction to network programming in java
When we desire a communication between two applications possibly running on different machines, we need sockets. This presentation aims to provide knowledge of basic socket programming to undergraduate students. Basically, this presentation gives the importance of socket in the area of networking and Unix Programming. The presentation of Topic (Sockets) has designed according to the Network Programming Subject, B.Tech, 6th Semester syllabus of Punjab Technical University Kapurthala, Punjab.
The Presentation given at Guru Gobind Singh Polytechnic, Nashik for Third Year Information Technology and Computer Engineering Students on 08/02/2011.
Topic: Java Network Programming
When we desire a communication between two applications possibly running on different machines, we need sockets. This presentation aims to provide knowledge of basic socket programming to undergraduate students. Basically, this presentation gives the importance of socket in the area of networking and Unix Programming. The presentation of Topic (Sockets) has designed according to the Network Programming Subject, B.Tech, 6th Semester syllabus of Punjab Technical University Kapurthala, Punjab.
The Presentation given at Guru Gobind Singh Polytechnic, Nashik for Third Year Information Technology and Computer Engineering Students on 08/02/2011.
Topic: Java Network Programming
Lecture Presentation on Trigonometry, types of angle, angle measurement, pythagorean theorem, trigonometric function, trigonometric relationship, circle function, co function, reference angle, odd even function,graphing of trigonometric function, special angles and terminology and history of trigonometry
Network programming in java - PPT with Easy Programs and examples of Java InetAddress Class and java socket programming example.
Learn more @ http://java2all.com/technology/network-programming
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
2. • Java is practically a synonym for Internet
programming. There are a number of reasons
for this like its ability to generate secure,
cross-platform, portable code.
• One of the most important reasons that Java
is the premier language for network
programming are the classes defined in the
java.net package. They provide an easy-to-use
means by which programmers of all skill levels
can access network resources.
3. Networking Basics
• At the core of Java’s networking support is the concept
of a socket. A socket identifies an endpoint in a
network. The socket paradigm was part of the 4.2BSD
Berkeley UNIX release in the early 1980s. Because of
this, the term Berkeley socket is also used.
• Sockets are at the foundation of modern networking
because a socket allows a single computer to serve
many different clients at once, as well as to serve many
different types of information. This is accomplished
through the use of a port, which is a numbered socket
on a particular machine. A server process is said to
“listen” to a port until a client connects to it.
4. • Socket communication takes place via a protocol.
Internet Protocol (IP) is a low-level routing protocol
that breaks data into small packets and sends them to
an address across a network, which does not guarantee
to deliver said packets to the destination.
• Transmission Control Protocol (TCP) is a higher-level
protocol that manages to robustly string together
these packets, sorting and retransmitting them as
necessary to reliably transmit data.
• A third protocol, User Datagram Protocol (UDP), sits
next to TCP and can be used directly to support fast,
connectionless, unreliable transport of packets.
5. • TCP/IP reserves the lower 1,024 ports for specific
protocols. Many of these will seem familiar to
you if you have spent any time surfing the
Internet. Port number 21 is for FTP; 23 is for
Telnet; 25 is for e-mail; 43 is for whois; 79 is for
finger; 80 is for HTTP; 119 is for netnews so on.
• It is up to each protocol to determine how a
client should interact with the port. For example,
HTTP is the protocol that web browsers and
servers use to transfer hypertext pages and
images.
6. • A key component of the Internet is the address.
Every computer on the Internet has one. An
internet address is a number that uniquely
identifies each computer on the Net.
• Originally, all Internet addresses consisted of 32-
bit values, organized as four 8-bit values. This
address type was specified by IPv4 (Internet
Protocol, version 4). However, a new addressing
scheme, called IPv6 (Internet Protocol, version 6)
has come into play. IPv6 uses a 128-bit value to
represent an address, organized into eight 16-bit
chunks.
7. • Just as the numbers of an IP address describe a
network hierarchy, the name of an Internet
address, called its domain name, describes a
machine’s location in a name space. For example,
www.osborne.com is in the COM domain
(reserved for U.S. commercial sites); it is called
osborne (after the company name), and www
identifies the server for web requests. An Internet
domain name is mapped to an IP address by the
Domain Naming Service (DNS). This enables users
to work with domain names, but the Internet
operates on IP addresses.
10. • InetAddress: The InetAddress class is used to
encapsulate both the numerical IP address and the
domain name for that address.
// Demonstrate InetAddress.
import java.net.*;
class B
{
public static void main(String args[]) throws
UnknownHostException {
InetAddress Address = InetAddress.getLocalHost();
System.out.println(Address);
Address = InetAddress.getByName("google.com");
System.out.println(Address);
} }
11. TCP Client/Server Sockets
• TCP/IP sockets are used to implement reliable,
bidirectional, persistent, point-to-point, stream-based
connections between hosts on the Internet.
• A socket can be used to connect Java’s I/O system to
other programs that may reside either on the local
machine or on any other machine on the Internet.
• There are two kinds of TCP sockets in Java. One is for
servers, and the other is for clients.
• The ServerSocket class is designed to be a “listener,”
which waits for clients to connect before doing
anything. Thus, ServerSocket is for servers.
• The Socket class is for clients. It is designed to connect
to server sockets and initiate protocol exchanges.
12. • Socket(String hostName, int port) throws
UnknownHostException, IOException
• Socket(InetAddress ipAddress, int port) throws
IOException
• You can gain access to the input and output
streams associated with a Socket by use of the
getInputStream( ) and getOuptutStream()
methods, as shown here. Each can throw an
IOException if the socket has been invalidated by
a loss of connection.
• Several other method are available, like connect()
which allows you to specify a new connection.
14. • Simple TCP Client
import java.io.*;
import java.net.*;
class TCPClient {
public static void main(String argv[]) throws Exception {
String sentence, modifiedSentence;
BufferedReader inFromUser = new BufferedReader( new
InputStreamReader(System.in));
Socket clientSocket = new Socket("localhost", 6789);
DataOutputStream outToServer = new
DataOutputStream(clientSocket.getOutputStream());
BufferedReader inFromServer = new BufferedReader(
new InputStreamReader(clientSocket.getInputStream()));
sentence = inFromUser.readLine();
outToServer.writeBytes(sentence + 'n');
modifiedSentence = inFromServer.readLine();
System.out.println("FROM SERVER: " + modifiedSentence);
clientSocket.close(); } }
15. UDP Client/Server Sockets
• TCP/IP-style networking is appropriate for most
networking needs. It provides a serialized,
predictable, reliable stream of packet data.
However. TCP includes many complicated
algorithms for dealing with congestion control on
crowded networks, as well as pessimistic
expectations about packet loss. This leads to a
somewhat inefficient way to transport data.
Datagrams provide an alternative.
• Datagrams are bundles of information passed
between machines.
16. • Once the datagram has been released to its
intended target, there is no assurance that it will
arrive or even that someone will be there to
catch it. Likewise, when the datagram is received,
there is no assurance that it hasn’t been
damaged in transit or that whoever sent it is still
there to receive a response.
• Java implements datagrams on top of the UDP
protocol by using two classes: DatagramPacket
and DatagramSocket
• DatagramPacket object is the data container,
while the DatagramSocket is the mechanism
used to send or receive the DatagramPackets.
17. DatagramSocket( ) throws SocketException
DatagramSocket(int port) throws SocketException
• DatagramSocket defines many methods. Two of
the most important are send( ) and receive()
void send(DatagramPacket packet) throws
IOException
void receive(DatagramPacket packet) throws
IOException
• DatagramPacket defines several constructors.
DatagramPacket(byte data[ ], int size)
DatagramPacket(byte data[ ], int offset, int size)
18. • simple UDP server.
import java.io.*;
import java.net.*;
class UDPServer {
public static void main(String args[]) throws Exception {
DatagramSocket serverSocket = new DatagramSocket(9876);
byte[] receiveData = new byte[1024];
byte[] sendData = new byte[1024];
while(true) {
DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);
serverSocket.receive(receivePacket);
String sentence = new String(receivePacket.getData(), 0, receivePacket.getLength());
System.out.println("RECEIVED: " + sentence);
InetAddress IPAddress = receivePacket.getAddress();
int port = receivePacket.getPort();
String capitalizedSentence = sentence.toUpperCase();
sendData = capitalizedSentence.getBytes();
DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length,
IPAddress, port);
serverSocket.send(sendPacket); } } }
19. import java.io.*;
import java.net.*;
class UDPClient {
public static void main(String args[]) throws Exception {
BufferedReader inFromUser = new BufferedReader(new
InputStreamReader(System.in));
DatagramSocket clientSocket = new DatagramSocket();
InetAddress IPAddress = InetAddress.getByName("localhost");
byte[] sendData = new byte[1024];
byte[] receiveData = new byte[1024];
String sentence = inFromUser.readLine();
sendData = sentence.getBytes();
DatagramPacket sendPacket = new DatagramPacket(sendData,
sendData.length, IPAddress, 9876);
clientSocket.send(sendPacket);
DatagramPacket receivePacket = new DatagramPacket(receiveData,
receiveData.length);
clientSocket.receive(receivePacket);
String modifiedSentence = new String(receivePacket.getData());
System.out.println("FROM SERVER:" + modifiedSentence.trim());
clientSocket.close(); } }