Transcript Java beans

QQ peer-to-peer
Answer
1 Each peer is neither client nor server to
other peers. True or False?
2 Pros and cons of P2P
3 What are the 2 main concerns about
resources in P2P file sharing?
4 How many views does Gangnam Style have
on Youtube?
5 Why did Napster fail?
6 How can I prevent flooding when routing
messages in a P2P network?
7 In Gnutella, peer discovery is P2P, not clientserver. How do I find peers when I join for
the first time?
8 How is resource discovery performed in
Skype?
9 Name a type of protocol in sensor networks
1
QQ peer-to-peer
Answer
1 Each peer is neither client nor server to
other peers. True or False?
False. Each peer is both client and server
to other peers.
2 Pros and cons of P2P
Pros: scaling (more nodes = more
hardware), robustness. Cons: complex
resource discovery, security.
3 What are the 2 main concerns about
resources in P2P file sharing?
Resource location and resource retrieval
4 How many views does Gangnam Style have
on Youtube?
Nearly 2 billions
5 Why did Napster fail?
Discovery server = single point of failure
6 How can I prevent flooding when routing
messages in a P2P network?
Decrease message’s TTL flag every hop
7 In Gnutella, peer discovery is P2P, not client- Seeds = list of reliable peers
server. How do I find peers when I join for
the first time?
8 How is resource discovery performed in
Skype?
The directory is stored and distributed in
super peers.
9 Name a type of protocol in sensor networks
Multipath, query-based, QoS-based
2
QQ MVC
Answer
1 Describe what MVC is about.
2 In Vanilla (= default) MVC, which
component is aware of which?
3 How many components has MVC?
4 In Web MVC (= iOS MVC), what does
the controller do?
5 Name a Java tool using web MVC.
6 Why is web MVC not super cool?
3
QQ MVC
Answer
1 Describe what MVC is about.
Separate rendering (V) and user input (C) from
state and logic (M).
2 In Vanilla (= default) MVC, which
component is aware of which?
M: none. V: model. C: model and view.
3 How many components has MVC?
3? TRICK QUESTION! Can have multiple views,
controllers, and models.
4 In Web MVC (= iOS MVC), what does
the controller do?
Fetch data from model, select a view, give data
to that view.
5 Name a Java tool involved in web MVC.
M=Enterprise Java Beans, V=JSP, C=servlet
6 Why is web MVC not super cool?
It mixes server code (Java/python/C#/PHP)
into client code (HTML, CSS).
4