3156-15 - COMS W3156: Software Engineering, Fall 2001...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
COMS W3156: Software Engineering, Fall 2001 Lecture #15: Distributed Objects II, Network event infrastructures Janak J Parekh janak@cs.columbia.edu
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Administrativia LDAP code samples up Design due Tuesday! How’s everyone doing? Requirements update pending (v1.2) Will not be required to reflect updates in design
Background image of page 2
Next class So, we’re ahead of pace… Integration Security/Cryptography
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Today’s class Continue on distributed objects RMI in detail Serialization of Java objects Network-based event programming
Background image of page 4
Socket programming This is what you’re doing; why is it “bad”? Need to parse input/specially generate output Need to know whom to connect to Synchronous (as opposed to asynchronous): send a request, wait for response, etc… Having said that, still one of the most popular ways to do network programming
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Alternatives Send the object to the other side: serialization Access the object remotely: remote calls and remote objects Use a third-party mechanism to talk to the remote party: events
Background image of page 6
Serialization (I) Standard mechanism to encode objects into a stream or bytearray “Flatten” the object out Problem: what to do about pointers? Use a serial number to number objects as they go out Replace pointer with serial number
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Serialization (II) C/C++ support streams, but don’t include automatic serialization: you’d have to convert the Object into a string yourself Wouldn’t be useful enough anyway: different systems, endianness, etc. Java builds it in, and automates it Builds functionality on top of reflections
Background image of page 8
Reflection (I) What if you have never seen an object before? If you don’t have the .class file? You can’t “hardcode” method calls, etc. without having the other class But what happens if you get it during runtime, over a network? Java supports this
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Can get a “Class” object (java.lang.Class), Object.getClass() Class.forName() Then, you can inquire about its properties and perform operations Class.newInstance() Class.getMethods(), .getConstructors(), etc. Returns arrays if necessary
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/09/2010 for the course COMS W3156 taught by Professor Janakjparekh during the Fall '01 term at Columbia.

Page1 / 34

3156-15 - COMS W3156: Software Engineering, Fall 2001...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online