This document provides an overview of Android and how to get started developing Android applications. It discusses Java network programming concepts, the components of an Android application including activities, services and broadcast receivers. It also covers using the Android emulator, configuring projects in Eclipse, and an overview of the APIs provided for the file sharing project including sockets and broadcasting messages.
Networking with Neutron is one of the most complex subsystems in Openstack. In this talk we shed light on the key components of Neutron networking and the specialities of the relatively new ML2 core plugin.
The Havana release of OpenStack, came out in October 2013, contains several significant changes and new features in the networking component. OpenStack Networking has changed name from 'quantum' to 'neutron'. It lays the foundation for supporting heterogeneous network components with the introduction of the ML2 (modular layer 2) plugin. The first implementations of FireWall as a Service (FWaaS) and VPN as a Service (VPNaaS) are now included. These features were demonstrated by Cisco developers at the OpenStack meetup in Boston in Oct 2013.
Networking with Neutron is one of the most complex subsystems in Openstack. In this talk we shed light on the key components of Neutron networking and the specialities of the relatively new ML2 core plugin.
The Havana release of OpenStack, came out in October 2013, contains several significant changes and new features in the networking component. OpenStack Networking has changed name from 'quantum' to 'neutron'. It lays the foundation for supporting heterogeneous network components with the introduction of the ML2 (modular layer 2) plugin. The first implementations of FireWall as a Service (FWaaS) and VPN as a Service (VPNaaS) are now included. These features were demonstrated by Cisco developers at the OpenStack meetup in Boston in Oct 2013.
The Information Technology have led us into an era where the production, sharing and use of information are now part of everyday life and of which we are often unaware actors almost: it is now almost inevitable not leave a digital trail of many of the actions we do every day; for example, by digital content such as photos, videos, blog posts and everything that revolves around the social networks (Facebook and Twitter in particular). Added to this is that with the "internet of things", we see an increase in devices such as watches, bracelets, thermostats and many other items that are able to connect to the network and therefore generate large data streams. This explosion of data justifies the birth, in the world of the term Big Data: it indicates the data produced in large quantities, with remarkable speed and in different formats, which requires processing technologies and resources that go far beyond the conventional systems management and storage of data. It is immediately clear that, 1) models of data storage based on the relational model, and 2) processing systems based on stored procedures and computations on grids are not applicable in these contexts. As regards the point 1, the RDBMS, widely used for a great variety of applications, have some problems when the amount of data grows beyond certain limits. The scalability and cost of implementation are only a part of the disadvantages: very often, in fact, when there is opposite to the management of big data, also the variability, or the lack of a fixed structure, represents a significant problem. This has given a boost to the development of the NoSQL database. The website NoSQL Databases defines NoSQL databases such as "Next Generation Databases mostly addressing some of the points: being non-relational, distributed, open source and horizontally scalable." These databases are: distributed, open source, scalable horizontally, without a predetermined pattern (key-value, column-oriented, document-based and graph-based), easily replicable, devoid of the ACID and can handle large amounts of data. These databases are integrated or integrated with processing tools based on the MapReduce paradigm proposed by Google in 2009. MapReduce with the open source Hadoop framework represent the new model for distributed processing of large amounts of data that goes to supplant techniques based on stored procedures and computational grids (step 2). The relational model taught courses in basic database design, has many limitations compared to the demands posed by new applications based on Big Data and NoSQL databases that use to store data and MapReduce to process large amounts of data.
Course Website http://pbdmng.datatoknowledge.it/
Contact me to download the slides
These are the slides used on ElixirBarcelona meetup about Distributed Elixir by Oscar de Arriba (@odarriba)
Video: https://www.youtube.com/watch?v=Y0bVDPrXguY
Examples: https://github.com/odarriba/distributed-elixir-example
Docker Networking - Current Status and goals of Experimental NetworkingSreenivas Makam
This slidedeck covers overview of Docker Networking as of Docker 1.8, drawbacks of current Docker Networking and goals of Docker Experimental Networking.
This presentation session will go through the basics of Docker and illustrate its importance in modern DevOps. It will also go through a step-by-step demo of setting up a Docker image for the LAMP stack (Linux, Apache, MySQL, PHP) together with a working sample application.
Slides & codes: http://bit.ly/thomasdocker
.NET Core, ASP.NET Core Course, Session 4aminmesbahi
Session 4,
What is Garbage Collector?
Fundamentals of memory
Conditions for a garbage collection
Generations
Configuring garbage collection
Workstation
Server
Snaps are a new packaging format that allows unmodified binaries to run across a wide variety of distributions. Snapd is the software that manages snaps on a running system. Learn about the basics of snaps, snapd and what is needed to port snapd to OpenSUSE.
Presented Docker in 15 minutes with two of my classmates at school.
Presentation covering topics:
Virtualization
Virtual Machines
Container Technology (Docker)
Docker Compose
Docker Swarm
The demo can be found at:
https://github.com/DanishKhakwani/SimpleDockerDemo
Qt Application Programming with C++ is one of the best Qt QML training and courses in Bangalore India. This workshop is ideal for anyone who want to get started with developing GUI Application using Qt framework. Starting with basics, this workshop covers developing multi-threaded, multimedia and 2D graphics based applications with multiple Do-It-Yourself (DIY) exercises.
Docker Networking in OpenStack: What you need to know nowPLUMgrid
Learn how you bring secure, scalable, available and open software defined networking to Docker containers managed by OpenStack. This session will cover how Docker virtual networks function, how to plumb them into the virtual network fabric and reliably assign information such as IP addresses, virtual interfaces and more. In addition, this session will also cover how to securely wrap Docker containers using security policies and encryption.
The Information Technology have led us into an era where the production, sharing and use of information are now part of everyday life and of which we are often unaware actors almost: it is now almost inevitable not leave a digital trail of many of the actions we do every day; for example, by digital content such as photos, videos, blog posts and everything that revolves around the social networks (Facebook and Twitter in particular). Added to this is that with the "internet of things", we see an increase in devices such as watches, bracelets, thermostats and many other items that are able to connect to the network and therefore generate large data streams. This explosion of data justifies the birth, in the world of the term Big Data: it indicates the data produced in large quantities, with remarkable speed and in different formats, which requires processing technologies and resources that go far beyond the conventional systems management and storage of data. It is immediately clear that, 1) models of data storage based on the relational model, and 2) processing systems based on stored procedures and computations on grids are not applicable in these contexts. As regards the point 1, the RDBMS, widely used for a great variety of applications, have some problems when the amount of data grows beyond certain limits. The scalability and cost of implementation are only a part of the disadvantages: very often, in fact, when there is opposite to the management of big data, also the variability, or the lack of a fixed structure, represents a significant problem. This has given a boost to the development of the NoSQL database. The website NoSQL Databases defines NoSQL databases such as "Next Generation Databases mostly addressing some of the points: being non-relational, distributed, open source and horizontally scalable." These databases are: distributed, open source, scalable horizontally, without a predetermined pattern (key-value, column-oriented, document-based and graph-based), easily replicable, devoid of the ACID and can handle large amounts of data. These databases are integrated or integrated with processing tools based on the MapReduce paradigm proposed by Google in 2009. MapReduce with the open source Hadoop framework represent the new model for distributed processing of large amounts of data that goes to supplant techniques based on stored procedures and computational grids (step 2). The relational model taught courses in basic database design, has many limitations compared to the demands posed by new applications based on Big Data and NoSQL databases that use to store data and MapReduce to process large amounts of data.
Course Website http://pbdmng.datatoknowledge.it/
Contact me to download the slides
These are the slides used on ElixirBarcelona meetup about Distributed Elixir by Oscar de Arriba (@odarriba)
Video: https://www.youtube.com/watch?v=Y0bVDPrXguY
Examples: https://github.com/odarriba/distributed-elixir-example
Docker Networking - Current Status and goals of Experimental NetworkingSreenivas Makam
This slidedeck covers overview of Docker Networking as of Docker 1.8, drawbacks of current Docker Networking and goals of Docker Experimental Networking.
This presentation session will go through the basics of Docker and illustrate its importance in modern DevOps. It will also go through a step-by-step demo of setting up a Docker image for the LAMP stack (Linux, Apache, MySQL, PHP) together with a working sample application.
Slides & codes: http://bit.ly/thomasdocker
.NET Core, ASP.NET Core Course, Session 4aminmesbahi
Session 4,
What is Garbage Collector?
Fundamentals of memory
Conditions for a garbage collection
Generations
Configuring garbage collection
Workstation
Server
Snaps are a new packaging format that allows unmodified binaries to run across a wide variety of distributions. Snapd is the software that manages snaps on a running system. Learn about the basics of snaps, snapd and what is needed to port snapd to OpenSUSE.
Presented Docker in 15 minutes with two of my classmates at school.
Presentation covering topics:
Virtualization
Virtual Machines
Container Technology (Docker)
Docker Compose
Docker Swarm
The demo can be found at:
https://github.com/DanishKhakwani/SimpleDockerDemo
Qt Application Programming with C++ is one of the best Qt QML training and courses in Bangalore India. This workshop is ideal for anyone who want to get started with developing GUI Application using Qt framework. Starting with basics, this workshop covers developing multi-threaded, multimedia and 2D graphics based applications with multiple Do-It-Yourself (DIY) exercises.
Docker Networking in OpenStack: What you need to know nowPLUMgrid
Learn how you bring secure, scalable, available and open software defined networking to Docker containers managed by OpenStack. This session will cover how Docker virtual networks function, how to plumb them into the virtual network fabric and reliably assign information such as IP addresses, virtual interfaces and more. In addition, this session will also cover how to securely wrap Docker containers using security policies and encryption.
End-to-end IoT solutions with Java and Eclipse IoTBenjamin Cabé
The IoT market is poised to an exponential growth, but there are still lots of barriers that prevent building a real, open, Internet of Things. Over the last years, Eclipse has been growing an ecosystem of open-source projects for IoT, that are used in real-world solutions, from smart gateways bridging sensors to the cloud, to device management infrastructures or home automation systems.
Java is a key-enabler for IoT, and this presentation provides you with concrete examples on how to build end-to-end solutions with the Eclipse IoT Java stack and projects like Paho, Kura, SmartHome, Californium, OM2M, Eclipse SCADA, Concierge ... This session will give you the keys to build a scalable IoT solution on top of open-source technology and open standards.
Node.js 101 with Rami Sayar
Presented on September 18 2014 at
FITC's Web Unleashed Toronto 2014 Conference
More info at www.fitc.ca
OVERVIEW
Node.js is a runtime environment and library for running JavaScript applications outside the browser. Node.js is mostly used to run real-time server applications and shines through its performance using non-blocking I/O and asynchronous events. This talk will introduce you to Node.js by showcasing the environment and its two most popular libraries: express and socket.io.
TARGET AUDIENCE
Beginner web developers
ASSUMED AUDIENCE KNOWLEDGE
Working knowledge of JavaScript and HTML5.
OBJECTIVE
Learn how to build a chat engine using Node.js and WebSockets.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
Node.js environment and basics
Node Package Manager overview
Web Framework, express, basics
WebSockets and Socket.io basics
Building a chat engine using Node.js
Distributed Data Flow for the Web of Things: Distributed Node-REDMichael Blackstock
Presentation at the Web of Things Workshop at the Iot 2014 conference at MIT on our proposal to create a distributed data flow architecture where sub flows are distributed between servers, gateways and devices
SOLID Programming with Portable Class LibrariesVagif Abilov
Developers often don't pay attention to code portability until they need to target multiple platforms. However, large amount of non-portable code often hints about violation of clean code principles, so it is worth investigating which part of the source code base are platform-specific and for what reasons.
In this session we will give an overview of portable class libraries, show how to extract PCL components from a real-world application and go through typical challenges that are faced when writing portable code. We will present the original tool that analyzes assemblies for portability compliance and can be used as a guard to prevent mixing business logic with infrastructure-specific functionality. Finally we will demonstrate how PCLs help targeting platforms such as Windows Store, Android and iOS.
A talk I gave at iOS Dev Scout on 23 Nov 2016 about a desktop Swift chat app I wrote that uses the Serial Port. It uses the Swift Serial library which I also wrote.
Code for both library and the example app can be found here: https://github.com/yeokm1/SwiftSerial
Video of my talk can be found here: https://engineers.sg/v/1275
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
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.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
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.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
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.
Welcome to the first live UiPath Community Day Dubai! Join us for this unique occasion to meet our local and global UiPath Community and leaders. You will get a full view of the MEA region's automation landscape and the AI Powered automation technology capabilities of UiPath. Also, hosted by our local partners Marc Ellis, you will enjoy a half-day packed with industry insights and automation peers networking.
📕 Curious on our agenda? Wait no more!
10:00 Welcome note - UiPath Community in Dubai
Lovely Sinha, UiPath Community Chapter Leader, UiPath MVPx3, Hyper-automation Consultant, First Abu Dhabi Bank
10:20 A UiPath cross-region MEA overview
Ashraf El Zarka, VP and Managing Director MEA, UiPath
10:35: Customer Success Journey
Deepthi Deepak, Head of Intelligent Automation CoE, First Abu Dhabi Bank
11:15 The UiPath approach to GenAI with our three principles: improve accuracy, supercharge productivity, and automate more
Boris Krumrey, Global VP, Automation Innovation, UiPath
12:15 To discover how Marc Ellis leverages tech-driven solutions in recruitment and managed services.
Brendan Lingam, Director of Sales and Business Development, Marc Ellis
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.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
3. Java Network Programming
• Java.net.* programming model
– Blocking model, you wait until work is done, maybe
forever
– One thread required per connection
– Socket exposes input and output stream
• Java.nio.* programming model
– Introduced in Java 1.4, non-blocking IO
– New Interface: SocketChannel (in java.nio.channels)
– Reading/writing via Buffer objects rather than
input/output streams
– Select() implemented
3
4. Java.net.* Socket API
• Part of the java.net package
– import java.net.*;
• Provides two classes of sockets for TCP
– Socket : client side of socket
– ServerSocket : server side of socket
• Provides one socket type for UDP
– DatagramSocket
4
5. Java.net.Socket
• Making a connection
Socket s = new Socket(“hostname”, port);
• The constructor not only creates a socket, but
makes a TCP connection.
• Socket exposes input and output stream.
s.getOutputStream()
s.getInputStream()
• Most of the time you'll chain the input/output
stream to some other input/output stream or
reader object to more easily handle the data.
5
6. Java.net.Socket
• Create a print stream for writing
– OutputStream rawOut =
socket.getOutputStream();
– PrintStream pout = new PrintStream(rawOut);
• Create a data output stream for writing
– BufferedOutputStream buffOut = new
BufferedOutputStream(rawOut);
– out =new DataOutputStream(buffOut);
• Create a data input stream for reading
DataInputStream din =
new DataInputStream(socket.getInputStream());
6
7. Java.net.ServerSocket
• Server Side socket
• To support multiple clients servers have
at least one thread per client
ServerSocket svr = new ServerSocket(port);
while (Socket s = svr.accept())
{
new EchoThread(s).start();
}
7
8. Java.net and Thread
class EchoThread extends Thread {
EchoThread(Socket s) { ... }
public void run() {
// waits for data and reads it in until connection dies
// readLine() blocks until the server receives a new line from client
String s;
while ((s = in.readLine()) != null) {
out.println(s);
}
}
}
8
9. Reference for Java Network
Programming
• http://java.sun.com/docs/books/tutorial/net
working/sockets/index.html
9
10. Android
• Software platform on mobile device by Open
Handset Alliance (Google)
• Developing language is Java
• Linux kernel (Open Source)
• Provides a development kit (SDK)
• Emulator support with some limitation
10
11. Developing Android Application
• There are four building blocks to an Android
application:
– Activity
– Service
– Broadcast Intent Receiver
– Content Provider
• http://code.google.com/android/intro/anatomy.html
11
12. Developing Android Application
• Activity
– Controls a single screen
– Usually starts up with an app, multiple Activity(screen) is
associated to an app
– Intent is used to move from screen to screen
• Service
– A Service is code that is long-lived and runs without a UI
– E.g. Network I/O, playback of media files
• Not using these components correctly can result in the system killing
the application's process while it is doing important work.
12
13. Project 1
• Description
– Develop a file sharing application where updates get
synchronized when users come across within
communication range
• Checkpoint
– Implement service discovery
– Establish a TCP connection between every pair of
nodes in range
– Due Feb 5. 2 weeks from now.
13
14. Getting Started
• Setting up the environment (Installation)
– Section 3.1 of the project document
– Use the pre-installed binaries on AFS
– Copy the binaries from AFS
– Install yourself
• Need eclipse, Java SDK 1.5/1.6, android SDK,
eclipse plug-in
14
15. Getting Started
• Starting the project on Eclipse
– Download project file
– Open the project in Eclipse (read the documentation)
• Running the local server
– Local server controls the connection between Android
emulators
– Implemented in Ruby binds port 10001 ~ 10010
– Need eventmachine Ruby lib
– setenv RUBYLIB
/afs/cs.cmu.edu/project/cmcl-srini-4/15-
446/android/eventmachine-0.12.2/lib
15
17. Emulator
• Running the emulator
– Stand-alone (./emulator)
– Eclipse Plug-in (Just ‘Run’ it as Android application)
• Binds to port 5554~5580
– Don’t run on shared machines
• adb (Android Debugging Bridge)
– Using adb, we can connect to android’s shell
– Logcat (demo)
17
18. Running multiple emulators
• Manual mode will let you do this
– Menu: Run Run Configurations
– Go to Android Applications on the left tab and
select FileSharerActivityProject
– Click on Target tab and select “maunal” mode
– When you run you can specify to launch a new
emulator or use existing ones to run the app
• To use adb you have to specify the emulator
device name if there are multiple emulators
• #adb –s emulator-5554 shell
18
20. Project API
• Broadcast Interface
– BroadcastReceiveCallBack
– CS446Bcast
• Socket API (blocking IO)
– CS446ServerSocket
– CS446Socket
• Util
– getMyID() returns the ID of the emulator
20
21. Broadcast Interface
• BroadcastReceiveCallBack
– BcastMsgReceived(byte []msg, int srcID) gets
called when a broadcast message is received from
srcID. Msg is the byte array of the content.
• CS446Bcast
– open() : returns CS446Bcast
– send(byte [] msg): sends a broadcast message
21
22. Socket
• CS446ServerSocket
– There can be only one server socket. ServerSocket
always binds to port 0.
– open(): returns a CS446ServerSocket
– accept(): Listens for a incoming connection and
returns a CS446Socket when a connection is
established
– close(): closes the socket
– isClosed(): returns boolean
22
23. Socket
• CS446Socket
– CS446Socket(int peerID): opens a socket and makes a
connection to peerID, always use local port 1 remote
port 0 when making a active connection
– void close()
– int getLocalPort()
– int getPort()
– int getPeerID()
– int getLocalID()
– OutputStream getOutputStream()
– InputStream getInputStream()
23
24. 2nd part of project 1
• You will be given a workload of users updating
file.
• You will need to keep a version vector and
synchronize the content.
• Details will be posted soon
24