Tuesday, May 31, 2005

Seimnar day after tomorrow

Koshish foundation had some wireless networking equipment to donate to our department at NED. We decided to arrange a seminar and after that seminar, Koshish would hand over the equipment. I suggested Tariq Mustafa from Supernet, he did not oblige our request for seminar. Very bad. I suggested Dr. Athar Mahboob and his organization said they could not do anything about it before June. Must be because they are in the education and training business, so why does one expect them to spare their employee for a free seminar.
In the end, to secure the transfer of equipment before summer vaccation, I volunteered myself to conduct a seminar on Mobile IP on Thursday, June 2, 2005 from 2 pm to 3:30 pm. Let's see how it goes.

IEE Career Counseling Seminar

IEE NED University Student Chapter today organized a Career Counseling seminar amidst tension and trouble in the city. The attendance on campus was thin, but the audience was plentiful, in my opinion.
There was one presentation on marketing for engineers. While marketing is a highly rewarding (and highly demanding) professional option for engineers, the speaker was not very effective.
There was another presentation about RF Planning, which was mildly technical and people were more or less bored. There was another presentation by Rubina Hoodbhoy about RMIT University, which had absolutely nothing to do with career counseling and she was there only because her organization was a key sponsor for the IEE newsletter.
There was a presentation by Salman Khan from Siemens, which was very much to the point of career counseling and another one by Samia from Sidat Hyder Murshid, which was also very much to the point of the seminar.
One thing was common to all the presentations: they were all extremely poorly timed. They all talked and talked and talked and talked way over the intimated 15 to 20 minutes time, which did not leave much time for the question and answer session which was supposed to be the best part of the seminar, and eventually was.
In the end, Adnan Farooq swept everyone of the earlier speakers away by denouncing the workplace employer ethics and promoting enterpreneurship amongst young engineers, and people (minus the earlier speakers) were excited. Samia and Salman were amongst the most offended, and Samia immediately ceased the microphone once Adnan was done with his presntation and started appreciating Adnan's views, but I knew that this IBA grad was appreciating because she would soon start criticising him, and she did. So did Salman. What is this? A political talk show? People should be expected to have different opinions and be allowed to voice them. These folks had their chance, and it wasnt their turn anymore.
Then there was a Question and Answers session and students frankly and freely asked controversial and pinching questions and the panel of speakers answered them. Again, Samia kept ceasing the mic again and again. What is this? You've answered a question, someone else adds his/her answer, why do you have to comment on his answer? Most of the time she was defending her views. I did not like that attitude. Nothing to do with her being a woman, I have no problem with that, I didnt like Salman's response tone either.

Sunday, May 29, 2005

Turkey

One thing that I think I missed mentioning here about Turkey is that while they have left hand driven vehicles driving on the right hand side of the road (like the USA), they have 220 V AC (unlike the USA).

More from my secret admirer

My secret admirer continues to susbtitute me for google. I dont like rediffmail. The email apparently originates from a cable/DSL subscriber somewhere in India from an ISP called Iqara. Here's his latest wish list:
respected sir
this is vivek from pune(india). i want to take some help of you.i hope that you will help me. i want to know some answer of these question.as listed below


1. how to bind data if i have a dropdownlist & take data from database in this drop down list.how it will bind?

2.how to retrieve multible table in a data set from database?

3.what's main diff b/w application & session?

4.what is complexing data in xml?

5.how garbage collector work?

6.if i want to pass data from onw web page to another web page
how it is possible?

7. what is signature?



sir please send the answer of these question. waiting for your response.


vivek goyal
pune(india)

Saturday, May 14, 2005

There was more from that secret admirer of mine, so I just said what I should've said in the first place. Here's the second email and my reply:


Well, since you're addressing me as sir, I take it you're on of my present or past students. Most probably present. The diversity of questions appear to be aimed at testing whether I know or not. I would only say two things, number one, I never claim to know everything, no one knows everything, but whatever I know, I would love to help others with. Number two, if you're afraid that I would retaliate against you, then you have failed to recognize me.
If you dont have the confidence in me or in yourself to ask a few simple questions without anonymity, then I am not inclined to devote my time to answering your queries, either.
Regards

vivek goyal wrote:
thanks sir for reply


some question more

does .net support multiple inheritence?

sql server architecture?

what type of error can come in project?

what's diff b/w base class & abstract class?

what's diff b/w abstract class & interbase class?

Wireless security

Here is a website that Shahzad had maintained for the wireless security project at Wichita State University.

Thursday, May 12, 2005

Secret admirer

Some secret admirer sent me a number of questions that I responded to a few seconds ago, so I thought I'd post them here as well. I didnt want to type all the answers, so I googled most of them instead.Here is my answer and his queries:

Please see my replies inline.

vivek goyal wrote:
please give me answer of some question

what's dif b/w html server control & web server control?

http://www.w3schools.com/aspnet/aspnet_controls.asp

what is view state?

http://msdn.microsoft.com/msdnmag/issues/03/02/CuttingEdge/

what is postback?

Control data is sent from the client to the server.

what's diff b/w data grid & data list?

In short, a datalist control is a lightweight datagrid control.

what is index & diff b/w clustered & non clustered index

An index is used to speed up database queries. When a table (for example) is indexed on a certain column, the database server maintains special data structures that can allow quick searching on items in that column. Also visit http://www.sql-server-performance.com/gv_index_data_structures.asp for information on clustered vs non-clustered indices.

can data set work in connected environment?

If you need connected "recordset" functionality, consider DataReader instead.

Tuesday, May 10, 2005

Of cell phones and midnights

After deleting the junk mail titled "Impress your wife" and I dont have a wife yet, I would reflect on cell phones ringing at midnight. It happened to me several times, in sleep. I then discovered that my Nokia will turn itself on when the alarm needs to go off (I double my cell phone as my alarm clock), so I started turning the phone off when I sleep, and then it wakes me up when I need to and not when someone else wants me to. Yea, yea, there could be an emergency, whatever! I dont care! When I need to sleep, I need to sleep, no ifs and buts.

SIP .NET

There was a question about SIP and .NET. I found some items on the web which might be useful to the student who asked this and maybe to some others as well:

I am sure that some other hits would be found on at least one of the following links:

I hope at least some of that helps. As far as COM Interop goes, there is an interesting article at Code Project, or at MSDN. For C Library interop with .NET, see this page.
Happy SIPping!

Sunday, May 08, 2005

Over confidence, success, failure

On Adnan's post, I couldnt help but add my bit. We are brought up with a fear of failure. Failure is not to be tolerated. Flunk an exam and you are punished, pass it with distinction and you are showered with gifts.
In fact, you learn nothing from success, you learn from failures. The learning process stops with success. Adison didnt invent the bulb overnight. He failed hundreds of times before he managed to successfully invent a bulb that worked. But with every failed experiment, he learnt and got closer to how to do it right.
That's another angle worth looking at.

Losing one more.....

Tomorrow night, we would be losing one more to North America. My friend Nasir Kamal who was working as Assistant Manager Systems at Cyber Net, Pakistan's largest and one of Asia's leading ISPs is leaving for Canada tomorrow night. He spent some time working in the USA then came back to Pakistan, worked for a bit and then like so many of us was forced by the society to realize that the society does not need guys like him. So, off he goes to Canada. What is it that Pakistan is missing that Canada, USA, Australia, UAE and an endless list of other countries have for us? Think about it. Maybe you'll find an answer. If you need my help, read a later blog.

Saturday, April 30, 2005

Yes, dhoop kinaray

Just to throw my own two cents to the post by Adnan, there's a rubai by Faiz Ahmed Faiz called Raat yun dil mein, which goes something like:

Raat yun dil mein teri khoi hui yaad aayee
Jaisay veeranay mein chupke se bahar aa jaaye
Jaisay sehraon mein haulay say chalay baad-e-naseem
Jaisay beemar ko bewajah qarar aajaaye

No wonder its no longer than that. A piece of art indeed! And no I'm not missing anyone in Istanbul. Its a wonder why I couldnt find any mp3 for this song through google. It must be out there somewhere.

Friday, April 29, 2005

Friday, Karachi

It so happens that my calendar was one day back. I thought I was going to be in Karachi on Thursday, whereas I was actually returning on Friday morning. So, I got in on Friday morning at 4:30 am. There were two or three international flights just landed and a hell of a rush at immigration counters. There is pathetically low air traffic at the Karachi airport and yet they managed to screw you at the immigration counter for 30 to 45 minutes! They must've worked very hard on that one.
I slept from 6 am to 12:30 pm and then after prayers from 3 pm to 6:30 pm. I've practically slept all day. With the confusion about the return day, there is a mess. I have to work on the INETA Pakistan projects from the coming fiscal year right now and email Goksin tonight so that he can communicate the same to INETA.
Hamza has learnt to make some meaningless noises that sound like words. His favorites are baba and abba.

Thursday, April 28, 2005

Leaving

We went out of the Princess Hotel to Starbucks and did some blogging and emailing. Then at 10:30 am, we went to get me checked out of the hotel. There was an army of people checking in, so with considerable difficulty, I managed to get checked out. Me and Edgar went to the Taksim area of Istanbul by bus, which is where our conference had been hosted. We went around the streets where there was a tram operating. There were several shops.
Edgar bought some clothes for his wife. We went to Pizza Hut and got some food. We then went walking around. It was fun, I took several photographs. At 3 pm, we went back to the bus stop. We waited a long time for the bus to arrive and then at 3:30 we caught a taxi back to the hotel where someone was supposed to pick us up. Goksin sent someone up with his Ford Explorer to pick us up. He dropped us at the airport. I took some snaps along the way as well. At the airport the checking was rather strict and slow. Then there was checkin. I am having to carry the INETA MEA writing pads up to the aircraft. The lady refused to check that bag in. I checked in the other bag I had.
I'm blogging from Burger King after having checked my email again and replying to one. Our flight is at 7:20 pm, so there is about an hour to go. I have a window seat 24 K and Edgar has 11 G which appears to be aisle. I think its one of their large Boeing jets. Emirates EK 122 is taking us to Dubai. Let's see!

Last day

My flight coming back is at 7:20 pm. A car will pick us up at 4:30 pm from the hotel. Firas is leaving on Friday. He's being moved to a hotel in the Teksim area. Edgar and myself are leaving on the same flight to Dubai. Can you believe that he has to go through Dubai to Kenya?
Meanwhile, we'll take a shuttle bus to Teksim area to go sight seeing. Edgar has already checked out and his bags are at the concierge. I'll do the same in a few minutes and then go out. At the StarBucks, probably doing my last blog from Istanbul for this trip. I had hot chocolate today, instead of black coffee. Edgar had the same. I didnt quite like it that much, though. Let's see what's in Teksim. Firas was very excited about it. He's already been there.

Wednesday, April 27, 2005

Day 3, Microsoft Zirvesi

Oh my God, Top Gun is on, Turksih translation dubbing. It is near the end on the dogfight. I love this movie even though it is very old. Anyway, I'll log while I watch the movie.

What a start! We caught a cab to the conference hall. The highway was crowded, the taxi driver took the shoulder on the right handside. Before I forget to mention, the cars here are left hand driven like the USA and are driven on the right handside of the road. The driver banged into a van in front of him. He wasnt that fast and the damage was superficial. While the taxi was stopped, we waited as the meter continued to move. That was odd! Firas went out to take a look first. Then I ventured out. Edgar stayed in, which was wise. Dont step out at a strange place. You cant catch a can out on the highway anyway and there may be a law against walking or standing on the highway. Stay out of trouble. The cab driver radioed or something and another cab driver picked us up. We paid the previous one 5 liras and got in the other one. He was absolutely nuts and drove very very fast and rash and on the shoulder most of the time. In the end, he got caught in a traffic jam on narrow streets, so much for the hurry. We got in late. There werent many people in the hall where Clemens was speaking. Which was nice, we could make contact with him at a personal level, even though he is not that kind of a guy. Clemens even made a rather harsh remark during his dasblog presentation when he switched to Arabic and then going back to English, he said "so that we're not terrorists anymore." I was shocked!

Day 3, session 1, Transaction failure handling in distributed systems by Clemens Vasters

It is surprising that few developers know what they should do about failed transactions, or even whether or how we could know whether the transaction failed or succeeded.

There are two transaction strategies:

2-Phase Commit
Imperative transactions

two phase commit transactions are also called pessimistic transactions. They consist of
Begin Phase 0
Commit Phase 1
Abort Phase 2

Phase 0 is when we simulate work. Not actual work. In phase 1, we reach agreement on outcome, i.e., everyone is asked by the transaction coordinator if they can do this work. Transactions are not about getting things done fast, but getting things done accurately, even if it takes longer. Something fast but with errors is not acceptable.

Clemens Vesters
Endpoint reference
Contract reference
policy reference
location reference
instance reference


Reply Path is given to tbe service to tell it that this is the client and this is where it can give us when it has something for us.

Broker passes EP Reference to the client, and the client can connect to the ultimate service. Similar to COM Marshalling.

Process correlation: MessageID and ReplyTo. Client can correlate based on its hearders. You could use, for instance, a window handle to pass the reply to the appropriate application window, or anything else, for instance a memory reference.

Routing: Gateway wsr:via logical://addressA addressB etc. mapped to EPRs.

Question: What is the differnece between UDDI and WS-Routing

FaultTo: indicates the endpoint to send faults to
If a reply header doesnt exist, the from header can be used. FaultTo is rarely used in Fail Fast situations.

Eventing: How to subscribe to services. Event source (supports a method called Subscribe()) the service that you walk up to,

you can select what set of events you would like to subscribe to based on filter conditions, subscription manager, which may be sending the events to you instead of the event source sending them directly to the client. There is a notion of Renew(),

GetStatus(), Unsubscribe(), all based on EPRs.

WS-Addressing about 5 page standard. Interesting to read.


One way to do the two phase commit by using the [Transaction (TransactionOption.Required)] attributed with the class and [AutoComplete] attribute with the method. Alternative is:

ServiceConfig cfg = new ServiceConfig();
cfg.Transaction = TransactionOption.Required;
ServiceDomain.Enter(cfg);
try
{
//do the transaction stuff
}
finally
{
ServiceDomain.Leave(); //returns TransactionStatus which can be used to find
// the status of the transaction
}

This method uses transactions automatically. Use this if you are using multiple resources such as multiple databases. A user never knows whether the transaction succeeded or not. LocallyOK is a TrnasactionStatus enumeration value that means that locally, things look OK, but no knowledge of remote resources, which does not necessarily guarantee success.

The second technique is imperative transaction.

One solution to not knowing the transaction status is to become part of the transaction itslef using either EnterpriseServices or TransactionScope.

class TXResMgr
{
static void Run()
{
using (TransactionScope tsc = new TransactionScope())
{
Transaction tx = Transaction.Current;
tx.EnlistVolatile(/* */);
}
}
}

class TXAbortWorker : IEnlistmentNotification
{
public void Prepare(Enlistment enlistment)
{
PreparingEnlistment.Prepared();
PreparingEnlistment.Done();
}
public void InDoubt(Enlistment enlistment)
{
throw new Exception("whatever");
}
public void RollBack(PreparingEnslitment enlistment)
{
//This is where we can do some work
enlistment.Done();
}
}

That was for Whidbey, but here is what we can do even today. We need to use the System.EnterpriseServices.CompensatingResourceManager namespace.
First, we code a compensator
class ESAbortWorker : Compensator
{
public override bool PrepareRecord (LogRecord rec)
{
return false;
}
public override bool EndPrepare()
{
return true;
}
public override bool AbortRecord(LogRecord rec)
{
//do our abort work here
return false;
}
}

Then we use a Clerk object inside the try block following ServiceDomain.Enter(); like this:

clrk.WriteLogRecord(null);
clrk.ForceLog();

Transaction strategy number 2 is useful for situations such as bank transfers. Everyone falsely believes that bank transfers use the 2 phase commit, but that is wrong. Banks have something called a clearing account. Every bank has one with every other bank. Bank notification is palced inside a queue which is very veyr reliable, such as the SWIFT system in the USA. The money is debited from the first customers' account and a message is placed inside the queue. On the other side, the system takes the message out of the queue and places the amount in a clearing account. Then, the account is transferred to the destination account. In case something goes wrong, such as the account does not exist, an abort contingent compensator opens another sub transaction in which a "poison" message is placed back in the queue and the money is credited to the account from which it was about to be transferred, and some amount may be deducted from this.

Updating a database record is not a good strategy, especially in these situations. We would be much better off using an insert and having a ValidFrom and a ValidTo field, and marking the old record as invlaid. This way, we have a history. While MSMQ handles failure automatically, we must implement poison list ourselves, where we mark which messages in the queue have failed so that the same transaction does not keep getting retried over and over. Search Clemens' blog for implementation methods of poison lists.

The last session was about a marvelous and very complicated blog application called DasBlog. It is available for free download. Check it out, it is marvelous.

After that session, there was a speakers panel. We sneaked out after lunch. I got some exchange currency, Edgar bought some clothes for his wife. Firas stopped at a StarBucks nearby, but there was no WiFi there, which he learnt later on. Before the speakers panel started, there were speeches by Gurkan and Chigdem. Chigdem talked about MVP. That's about as much as I could get from the slides, everything was in Turkish. One of the slides also mentioned INETA alongwith its URL. I took a snap of that, too.
The speakers panel was nice, people asked questions, mostly in Turkish. They were giving wireless mice to everyone asking the questions. Firas got one, too. It was nice, as Steve, Clemens and Kimberly kept joking all along, too. We met Goksin after that. I made a call back home from his cell phone and he reimbursed our expenses to us and gave some cash for INETA activities and some INETA MEA writing pads. We went back straight to the hotel, dropped our stuff and got down to StarBucks to check email and stuff.

Tuesday, April 26, 2005

Day 2, Microsoft Zirvesi 2005

Day 2 of the event. We have a meeting tonight at 6 pm for INETA MEA. But first, we attend a few sessions. Goksin picks us up in his Ford Explorer. We go to the conference meeting. First up is Stephen Forte. Stephen is wild, he's crazy, he's the kind of guy you'd like to hear.
He's doing Data driven caching with data controls using Visual Studio .NET 2003 and 2005
He can be found at this page. He is with the NYC .NET Developer Group.
He has a company called Corzen Inc.
Data caching can really improve the prerformance of a web application and is a very sensible way of scaling a web application without really investing huge amounts in expensive server infrastrcture.
There are two parts to this, one, SQL Server does in-memory data caching for us, two, ASP.NET can be used to cache pages in-memory very very easily and it is highly customizable as well. So here goes.
Using a DataList, which is like a light weight DataGrid. Another thing that will be used is a DataRepeater which is something that repeats a version of HTML format on all records in your data. This is done inside a <HeaderTemplate> tag. Steve's website has several downloadable Repeater controls.

Caching:
Performance tuning is a very difficult job. How do you trace what you can improve to increase performance? As already mentioned, caching can get you a lot closer a lot easier. It is the least expensive way of increasing performance. How do you use it? Very simple, use the <%@OutputCache%> directive on your page, with which you can specify the caching duration in number of seconds. There are also optional API calls that you can make. No change in code-behind files is needed. With this you could even turn off your SQL Server and the users would be able to use your web application through the cached versions.
But you'd say if it is a dynamic application in which a page is generated based on user input, it wouldnt work? Think again, there is the VaryByParam attribute that you can use to specify that different cached versions would be used based on a certain parameter, for example, which is used in certain SQL queries to fetch data and spit out HTML to the user screen. Also, VaryByHeader and another attribute can be used as well.
How about discarding the cached version when a certain resource changes? Sure you can do that. Even on filesystem objects. That is done with something called file dependency. You specify which file your application depends upon and as long as that file doesnt change, your cached page will be used. As soon as that file changes, your cached pages will be discarded. Marvelous!
This is done with a call to Response.AddFileDependency(Server.MapPath("data.xml")) as an example to watch for changes to a file called data.xml.
You can also add triggers to your database so that a certain extended stored procedure would be called when data in a table changes.
Can you cache only a portion of a page, such as when in an application only a certain portion is fixed while the rest is dynamically generated? Yes, you can, by using a user control. This is called fragmented caching.
SqlDataSource is new with Yukon and Whidbey. GridView can also be used.
can be used in web.config for this.
Scavenging is when your web server goes hunting for memory space and takes up space used for caching.

SQL Server 2005, bridging the gap between the DBA and the developer by Kimberly Tripp

I had viewed a few of her MSDN Webcasts, which is why her name sounded a bell.

ETL (Extract, Transform, Load)

SQL Computer Manager has been replaced with Configuration Manager in Yukon.

One can deploy a database project into SQL Server by using Whidbey, or compile a project to a DLL and ship it to be deployed on the server. The advantage of the former is that everything is backed up and restored during SQL Server backups and restores.
Be careful about SQL CLR, you can build user functions using SQL CLR which is running as managed code. It is a limited version of the .NET CLR, of course. However, it is not advised to develop your full applications this way. It is still better to keep the logic loosely coupled and TSQL still used. There are certain SQL data types which are different from the native .NET data types, for example String vs SqlString. SqlString keeps in mind the NULL value in concatenation. If you concatenate anything with a NULL into a SqlString, the result is NULL, which is the SQL Server behavior, whereas it woudlnt be that way if you used type String.

T-SQL Enhancements in SQL Server 2005 by Stephen Forte

SQL Server versions are codenamed after National Parks in the USA and Yukon is a National Park in Alaska.

XML is a native data type in SQL Server, which means that you can index data inside an XML column, search through it and use it as a reference into other columns or tables. There are two ways to pull XML data from a table:

select * from EmployeeTree for XML raw or select * from EmployeeTree for XML auto

auto is going to keep joins in mind.

select top 5 can be used to pull out the top 5 records froma table. Now it can use a calculated value or a value pulled from another SQL query. The same can be done with inserts, updates and deletes.

Common Table Expressions are like non-persistent views meaning they wouldnt be available to later statements. For example:

with CoolEmployees as (select * from EmployeeTree)

Where clauses can also be used here. One of the main reasons for using CTE is recursive queries.

Ranking and windowing functions. SQL Junkies website has Steve's articles on ranking functions such as this.

Part I of New features in Performance, Manageability and Recovery in SQL Server 2005 by Kimberly Tripps

Check out SqlSkills. Kimberly is back. SqlSkills has a lot of resources, do check it out.
SQL Server can be very stable and with 2005, in the event of damage to the server, you can restore it in most cases, without taking it offline, taking a single database or portions of a database offline. Of course, you can take the entire server offline if you wish, but you dont have to.

Unless your primary data file or log file gets damaged, you dont have to shutdown your server. But if either of these gets damaged, that is serious trouble that can not be restored while online. Damage to secondary data files can be sustained with online recovery.
How we use this facility is by creating separate file groups and placing different objects onto separate file groups. If you wish to put a single object over multiple file groups, you can use schemes.

Part II, not much to write down, it is about scalability in terms of having a primary and a mirror and optionally a witness, which can even be a machine running SQL Server 2005 Express (no licensing required), so that whenever the primary shuts down, the mirror takes over transparently without user interruption. Both primary and mirror can be kept in sync upto the second.

That's the end of the second day's sessions. Now we go upstairs to the INETA MEA meeting. Minutes of that meeting are available elsewhere. Then we go to Hotel Hilton, which is very close to the conference hall. All speakers are staying there.
I had a chat with one of the speakers in the hall. I forgot his name. I'll blog it later. From there we went to a certain historical tower from which the first person flew with wings. We had a multiple course dinner, I missed the count. I took photos from the top of the tower. They started by serving wine. Of course, I refused. Yikes, I started feeling uncomfortable and out of place. Everyone, even people with muslim names were dirnking. Everyone except me. Then there was some show about the Sultan coming to the stage and clapping to call two girls (properly dressed) sit on his sides and he feeds them some fruit or something from a tooth pick. Then he claps and they start dancing. I go, uh oh, let's get out of here. Then it gets worse. The ladies come down and drag a couple of ladies from the audience to the stage and those new ladies sit to the Sultan's side while the professionals dance. May I mention that the dancing girls looked very bored, obviously since they do the same stupid drill every night. So did the Sultan. Then the dancing girls ask the two guests and teach them how to dance.
After that, when I'm thinking it cant get any worse, an almost naked dancer comes on stage and does a dance. I'm like, holy shit, let's get out of here. They bring the main part of the meal, I take it, ask Edgar if he wants to come, he agrees, we tell Goksin, our host and we leave. Kimberly Tripp ceases the opportunity and escapes with us. We take a cab, drop her at the Hilton. She thanks us like a hundred times on the way for saving us from the party that was to go on further in the night for very long and the others were planning to go to a strip club, too. Puke!
What's really gross is that that almost naked dancer went to every table, every chair one after another, stood behind everyone one by one (a bit too close) and a photographer photographed. Yea, yea, I got trapped, too. I didnt even dare to move or look around. I hope they dont mail the photos to my place. I have no news of that photo and hope it gets destroyed or something.
She tries to pay the fare or split, but we refuse to accept that, we get to the hotel at 11 pm and then go to sleep. Escaped!

Monday, April 25, 2005

Developer Conference

Wonderful day in Istanbul. Attended a few developer sessions. Wonderful ones. Clemens Vesters is marvelous. Service Orientation and Indigo are topics that he covered very well.
Raphal is here, too. I have the leaders' meeting tomorrow morning. I'll blog tomorrow about today's sessions.

Day 1, Microsoft Zirvesi 2005

Here's about the sessions I attended on the first day of the event. This is very rough. It is just a sketch of my memoirs. I'll try to finish it later and improve it so that it can be useful for someone else me. Beware!

Service Orientation and interoperability
Clemens Vesters

As always, Clemens is impressive. This is a brief summary of the talk:
Many applications are silos. We write applications and frameworks because we dont trust others with our data. No super

framework exists and never will be that would work for all problems and situations. The reason is that business keeps

changing and that is because everyone wants to be wiser tomorrow than today. Silos make sense to software vendors but not to

users. For example, a medical professional at a hospital may have to enter patient data into four differnet applications.

This may seem necessary to the IT department because they bought four different applications for different purposes. But this

doesnt make sense to the user. Productivity is suffering and productivity enhancement is the software developer's job, not

the users. Information gathering is error prone and in this situation replicated information gathering is bound to cause

trouble.
A CEO can request a quarterly report of how well his business is doing, but can not expet an answer if he asks this question

at any arbitrary time of year. The goal of interoperability is users talking to applications and applications talking to each

other at the same time.
Services: Services are a deployment level reuse, not just source code reuse. An application becomes unusable in a maximum of

3 to 5 years, because of all the hacks and quickfixes that we apply on it to fix problems which makes it unmaintainable. It

is easier to just throw it out the window and re-write it.
Where did the word application come from? An application of certain technology to a certain problem.
A System wires applications together.
A Service exposes functionality/capability of an application allowing programatic access. The word service has many different

meanings, which you can discover by asking different people what it means or doing a web search for it and you will find many

different definitions. A service is about evolution and coupling.
Elements of architecture:
These are all independent of each other
Edges: Everything talking to the outside world, e.g., SOAP, RPC, DCOM, RMI DCE etc.
Protocols: The rules governing the communication.
Platforms: For example, Biztalk Server, implementation languages like C#, and the runtime.
Control Flow: Request response etc.
State:

The art of architecture is to find the right mix of the above elements. Service orientation only talks about the edges.
Every object oriented thing has three layers, the public methods, the implementation, and the other things that the

implementation talks to.
Tenets of service orientation:
PEACE(Policy-based compatibility, Explicitness of boundaries, Avoid coupling, Contract and schema Exchange.
Services control the contract, they can change and evolve. Tip: Never expose a .NET dataset as the only interface to a web

service. .NET clients would be very fast, but a Java client, for instance, would not be able to use it easily.
SOA Service:
Policy
Explicit boundaries
Autonomy
Contract and Schema
Autonomy is an architectural idea, autonomous computing relies on state management. Service orientation and architectre are

two different things. There is no such thing as Service Oriented Architecture. For example, you can put a web service on top

of a legacy system, exposing it as a service, but it would be a bad architecture.
Monologue: WS, WSDL are always a command-like thing. One software entity tells another what to do and it does it. It is not a

dialogue.
For service orientation, there is a design time contract and a runtime contract. Internal policies on two different

organizations may be different and a common ground would need to be found, for example, using Kerberos for authentication if

it is supported on both sides. The programmer does not have to worry about that. The total contract is the design-time

contract and the runtime contract.
SOAP has a header and a body. The applications deal with the SOAP body and the infrastructure deals with the SOAP header.

Contract exchange can be peer-to-peer or UDDI based (which is rare). AUtonomous services dont pass around references or

primary keys to tables so that the other side can query data on its own, but pass the actual data.
Stacking is another architectural issue, where you have a federator and several data stores, for example. The federator

contains nothing but the partitioning logic. Services can be moved around easily.

.NET vs J2EE comparison by Abdel Malek Kemmou
The comparison can be done at various level. At the language level, you can compare any .NET language with Java. The speaker

chose C#. Attributes are a way for you to evolve the language on your own. For example, you can have an attribute above a

string variable that defines that the string can only have alphabets in it and can be a minimum of 5 characters and a maximum

of 24.
Check out .NET Powered for an independent comparison between Java and C#.
As far as J2EE platform independence is concerned, there are some minor issues such as threading can not be dealt with cross

platform, because different platforms deal with threading differently. Also, rendering and event management is different. If

you are using EJBs, these are less platform independent because vendors always do extensions beyond the specifications, so it

depends on your application server etc and porting from one application server to another is not transparent. If you are

doing something like distributed transactions, you are tied with one application server.
On ASP.NET vs JSP, the idea of MVC or Model, View, Controller is there on ASP.NET as optional to some extent, with the code

behind file. The UI Process Application Block from Microsoft implements the complete MVC.

Indigo by Clemens Vesters

Channel architecture is an abstraction over all different transport protocols such as MSMQ and web services.
Service Programming Model is built over the channel architecture, which means that one consistent API whether you use

reliable messaing or whatever other mechanism.
System.Services is the namespace to use. Indigo comes with WSE 2.0. Indigo is going to make it really difficult for average

developers from making mistakes.
WSDL contains:
Types
Messages
PortTypes, which has to do with "I need these inputs and I give these outputs"
Binding: Protocol such as SOAP
Services: Deployment thing
Binding properties: Transport, timeouts etc.

Endpoint: ABC (Address, Binding, Contract)
System.ServiceModel is the new namespace to work with.
How to work with Indigo?
Define an interface, implement it in a class such as
class Math : IMathWizard
On the interface definition use the [ServiceContract] attribute, on the methods use [OperationContract] attribute. Without

this, the method will not be exported to the outside world.

ServiceHost
BasicProfileBinding
ChannelFactory generates channel/proxy
ChannelFactory

Proseware by Clemens Vasters
Proseware is another book merchant. It is different in the way it is implemented from Duwamish. It demonstrates a number of

conepts such as service orientation, web services, messaging etc. It is not a free download. It is Microsoft property and is

only given to those who attend a three day workshop designed around Proseware.
A catalog service owns the WSDL only, the inventory service implements the WSDL. Catalog and inventory services all push data

only and work better with a queue instead of request/response. Some parts of the system work request/response.

Then we attended the INETA Turkey meeting, which was mostly in the Turkish language so we couldnt do much, but we did participate here and there and gave our email addresses for a mailing list.
After that, we went to a concert nearby for the conference delegates. Microsoft gave this funny looking orange blanket type thing to the delegates as it was getting very very cold. Most songs were in Turkish or French, but some were in English, too. People smoke too much here and I cant stand that. Even in the open stadium, I was bothered and just snuck out for the maghrib prayers. After I returned, I took my sandwich, which Edgar had kept for me and the Coca Cola and we hit the road back to the hotel to surf for a while at StarBucks.
End of day.

Day 1 of the conference

Woke up this morning at 6 am and the sun was about to rise. I took a few snaps of it, but I was shooting through the room's glass window. So, it captured either two suns or the sun and the impression of the camera's lens on the window or both. Maybe tomorrow I would go to the rooftop to take that shot.
Then, I pressed my clothes to take out the wrinkles collected during the travel. Then, I copied the snaps onto the laptop, deleting them from the memory stick. Put the laptop and the DSC batteries to charging and went down for breakfast at 8:30 am. We are being served breakfast from 7:30 am to 10:30 am at a cafe downstairs. I just had some cereal and coffee. Now I have to brush my teeth before Goksin comes to pick me and Edgar up at 10 am.
The weather outside looks fine, its partly cloudy. I decided to wear my white INETA Pakistan logo shirt today. I was in two minds, thinking that I should wear the logo shirt on the day when I would make the presentation, but since I dont know when that will be, and we have a three day summit, and I have only two logo shirts, I decided, let's wear one today, and then I can ask Goksin when I am speaking and wear the other one on that day, wearing a regular shirt on the remaining day.
I can see the ocean from up here on the 17th floor, room number 1718, Princess Hotel, Maslak. I think there's a school or something opposite where we are, a couple of blocks away, since I could see quite a few people assembled at around 8 am. From this distance it wasnt easy to see whether it were kids or grown ups. I'll need my camcorder for that, so we'll see tomorrow. There's a gas station right opposite us and it is self service like the US. The traffic is left hand driven and much less rowdy yet faster than in Karachi. There is public transportation.
I wonder what's in store with just under one hour left till Goksin comes to pick us up.......
BREAK
Alright, I've brushed my teeth, too. Just took a peek outside and, yes, it does look like a school of sorts as I can see kids playing soccer. I can also see at a small distance on a small peak some installation with brabed wire fencing on top of tall walls. A secure installation that also has some antennas on a very tall tower. Couldnt be a telecomm installation like an exchange because there arent that many antennae. Probably a police or some other organization's installation. Could even have something to do with public transportation. I resisted the urge to take out my camcorder for now. I'll try to put it off till tomorrow morning.
Most TV channels on the cable were in Turkish, so it was interesting to hear Sylvester Stallone speak in Turkish. Scorpion King was on in English. I liked the visual effects in that movie, it was nice to watch it again.