Thursday, July 26, 2007

Life in Dark...

It is almost 10 pm; we are sitting upon a rock and setting up for our next plan. Rokib, Shuvro: my two office colleague and I had leaved from Dhaka at Wednesday to wards Rumana para a tribal village in Bandarban. One of the relative of Rokib was sick, and we were going to help him from Dhaka. We were in hurry because we didn’t get enough vacation. We reached Bandarban about 6 am, and from that we are approaching for Rumana para through track, bus, jeep, boat and above all foot.

Bandarban is one of the hilly regions in Bangladesh. Journey to Rumana para takes almost two days, and we were intended to cover it within one day. There is no other option without walking for the last few paths, because road network cannot reach there to complicate tribal life. Most remarkable mistake we did, we just carried one torch, so we are approaching almost in dark. And it is almost 10 pm when we realize that we are lost, we lost in hills. Our single torch dimmed down and we can realize that it is quite random that people comes here. We reached a dead end, and the path we cross are over a canal, and water level is rising. And there is very high probability that we don’t find out the path by which we reached that dead end, because it was not a path actually.

We were very hungry, because we didn’t take any food. Lion is roaring inside our stomach. If everything was perfect then we were supposed to be in Darjiling para, and we were planned to take food from there.

So our next task becomes find any locality and begs some foods. But after one and half hour later we became sure there was no locality near that. And we don’t know the path to any locality. This is the most tentative night in my life. Then we decided to back, and we will back taking the path that goes along with the canal. We were weakening but we knew that we must find a locality. Otherwise the only path remains for us that go to hell directly. Sometime after that I feel only will power saved us from that situation, otherwise I should not.

The only will power was we knew that we were at best 10 kilo from nearest locality, but we couldn’t recognize that path. It is about 3 pm when I heard a pig. I never noticed before that pig could be such a beloved creature for me. I just feel I find the best things in my life.

We lead our daily life, but very few of us ever noticed that what a wonderful things it is. Life is the ultimate gift of God for any of us. This is some of my experience in my life of a dark uncertain night. What I feel, that the most vital things is survival. I know for myself that how much love I encompass for myself. Life is for living anything else.

"tentative life"

Friday, July 20, 2007

Too many bitter tears are raining down on me

I'm just the shadow of the man I used to be
And it seems like there's no way out of this for me

(Queen - Too Much Love Will Kill You)

Thursday, July 19, 2007

Life at KAZ

It is not a very long time I have completed my graduation, just November 2006. After that I joined KAZ Software Ltd, an unidentified outsourcing company in Bangladesh, at least towards BUET guys. I graduate from BUET. I was very confused about my decision. Merely I was one of the well known fellows in CSE department. Lots of people out there were confused about KAZ and asked me lot. Probably it was very courageous decision for me to join KAZ after interview. Because when I came for the interview I just found an apartment with three rooms at Eskaton. And when I was asked to solve a problem, they took me to a computer desk and I found that many of keys are missing in that keyboard, and it seems from big bang.

I was so sure that company will pack up their bags within one year. But I was wrong; they are not so deprived, they are growing, growing at great speed. Now the question is why they look so underprivileged. I don’t know, but now we shift our office to new office space “Nirvana”. I don’t think it is outstanding but it can instigate your mind for a few moments. Now it is about eight months I am here. I find myself lucky that they choose me to work with them. They are simply marvelous. They possess everything to set paradigm for Bangladeshi Software Company. All of them are so helpful that sometime I became confused that are they colleague, or elder brother.

So, times are passing on. Am I happy? May be, may be not? But life at KAZ is better than anywhere else in Bangladesh. We go for the party almost twice a week. We pass time by gossiping. When you are here you never feel that anybody have any kind of pressure here, but if you have association with software production then you must know that most of the time it is difficult for developer to meet the dead line. But I can announce; we never miss any deadline. We are such a team. Bad luck for me that I can’t stay here for a long time. I have to leave, to pursue new challenges of life.

Tuesday, July 17, 2007

Common C# Trick

C# does not support to update UI from any other thread. So update UI from any other thread have a common trick. I am so dumb that I discover it every time and forget again. So write it in my blog so that it will be easier for me to find out next time. This is just a kind of GUI that read the hex version of any file. That's it.

Code... ... ...

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

using System.IO;

namespace HEXReader

{

public partial class MainForm : Form

{

public delegate void ReaderEventHandler(string hexText, string charText);

public event ReaderEventHandler ReadEvent;

public MainForm()

{

InitializeComponent();

ReadEvent += new ReaderEventHandler(MainForm_ReadEvent);

}

void MainForm_ReadEvent(string hexText, string charText)

{

if (hexText != null && charText != null)

{

this.richTextBox1.Text += hexText;

this.richTextBox2.Text += charText;

}

else

{

MessageBox.Show("Finished");

}

}

private void button2_Click(object sender, EventArgs e)

{

Application.Exit();

}

private FileStream _in;

private void button1_Click(object sender, EventArgs e)

{

OpenFileDialog opneFile = new OpenFileDialog();

DialogResult _res = opneFile.ShowDialog(this);

if (_res == DialogResult.OK)

{

this.richTextBox2.Text = "";

this.richTextBox1.Text = "";

_in = (FileStream)opneFile.OpenFile();

System.Threading.Thread operationThread = new System.Threading.Thread(new System.Threading.ThreadStart(Start));

operationThread.Start();

this.textBox1.Text = opneFile.FileName;

}

}

private void Start()

{

Reader newReader = new Reader();

newReader.ReadEvent += new Reader.ReaderEventHandler(newReader_ReadEvent);

newReader.Read(this._in);

}

void newReader_ReadEvent(string hexText, string charText)

{

object[] oarray = new object[2];

oarray[0] = hexText;

oarray[1] = charText;

this.BeginInvoke(ReadEvent, oarray);

}

}

public class Reader

{

public delegate void ReaderEventHandler(string hexText, string charText);

public event ReaderEventHandler ReadEvent;

public void Read(FileStream _in)

{

if (_in.CanRead)

{

int _count = 0;

byte[] data = new byte[1024 * 8];

do

{

string charText = "";

string hexText = "";

_count = _in.Read(data, 0, 1024 * 8);

for (int index = 0; index < _count; index++)

{

byte _curr = (byte)data[index];

int _val = (0x0F & ((0xF0 & _curr) >> 4));

if (_val < 10)

hexText += _val.ToString();

else

hexText += (char)('A' + (_val - 10));

_val = 0x0F & _curr;

if (_val < 10)

hexText += _val.ToString();

else

hexText += (char)('A' + (_val - 10));

hexText += " ";

charText += (char)_curr;

}

if (ReadEvent != null)

ReadEvent(hexText,charText);

} while (_count > 0);

}

if (ReadEvent != null)

ReadEvent(null, null);

}

}

}

Sunday, July 15, 2007

The Mayonnaise Jar and 2 Cups of Coffee

When things in your lives seem almost too much to handle, when 24 hours in a day are not enough, remember the mayonnaise jar and the 2 cups of coffee.

A professor stood before his philosophy class and had some items in front of him. When the class began, he wordlessly picked up a very large and empty mayonnaise jar and proceeded to fill it with golf balls. He then asked the students if the jar was full. They agreed that it was.

The professor then picked up a box of pebbles and poured them into the jar. He shook the jar lightly. The pebbles rolled into the open areas between the golf balls. He then asked the students again if the jar was full. They agreed it was.

The professor next picked up a box of sand and poured it into the jar. Of course, the sand filled up everything else. He asked once more if the jar was full. The students responded with an unanimous "yes."

The professor then produced two cups of coffee from under the table and poured the entire contents into the jar effectively filling the empty space between the sand. The students laughed.

"Now," said the professor as the laughter subsided, "I want you to recognize that this jar represents your life. The golf balls are the important things--your family, your children, your health, your friends and your favorite passions---and if everything else was lost and only they remained, your life would still be full.

The pebbles are the other things that matter like your job, your house and your car.

The sand is everything else---the small stuff. "If you put the sand into the jar first," he continued, "there is no room for the pebbles or the golf balls. The same goes for life. If you spend all your time and energy on the small stuff you will never have room for the things that are important to you.

"Pay attention to the things that are critical to your happiness. Play with your children. Take time to get medical checkups. Take your spouse out to dinner. Play another 18. There will always be time to clean the house and fix the disposal. Take care of the golf balls first---the things that really matter. Set your priorities. The rest is just sand."

One of the students raised her hand and inquired what the coffee represented. The professor smiled. "I'm glad you asked. It just goes to show you that no matter how full your life may seem, there's always room for a couple of cups of coffee with a friend."

(Collected)

I found it interesting. I think this is the major similarities between man and computer to sort out the right things at right time...

Results...

Different Data Cube generation time with different dimension, and different dimension number is given below:

These two curves are almost similar and they are linear with respect to the tuple size. And the data for the District wise Division Data line [Fig 1] is steeper than the Month wise year Data line [Fig 2]. Because Division level Hierarchy has more follower than the Year level Hierarchy. So, querying with hierarchy which is followed by more hierarchy, then the resulting line will be steeper. But both of them are linear with respect to tuple size.

These two curves are almost similar and they are linear with respect to tuple size. And the data for the District wise Division Data and smaller Range wise Range line [Fig 4] is steeper than the Data District wise Division Data and Month wise year Data line [Fig 3]. Because range hierarchy is concrete hierarchy wile Year hierarchy is a discrete hierarchy. So, Query with respect to concrete hierarchy will take more time than the discrete hierarchy.

In the Fig 5 all the curves seem to be straight line. That is all of them are linear with respect to tuple size. But the difference is the slope. Time with higher dimension has steeper line than the time with lower dimension count. And in the analysis of the algorithm we show that the slope is (number of dimension x average tuple count). So, the results support the mathematical analysis of the algorithm. Again from the analysis of the data we see that, for the fixed tuple size, time with respect to dimension number increases linearly. That also supports our mathematical analysis. So, the time is linear with respect to nay of them.

Fig 1: Cube generation time for District wise Division Data
Fig 2: Cube Generation time for Month wise Year Data
Fig 3: Cube generations time for Month wise year Data and District wise Division Data
Fig 4: Cube generations time for District wise Division Data and Smaller range wise Range Data
Fig 5: Cube generations time for different number of dimensions with different dimension value

In the Fig 6 the black line indicates the normal algorithm’s tuple vs. time relation and the cyne line indicates the hash mapped algorithm’s tuple vs. time relation, that we have developed. From the figure we found that normal algorithm is polynomial. We also found that our developed algorithm is linear.

Fig 6: Time comparison between normal and hash mapped algorithm

Here is the result of the space required to hold the data cube. In the Fig 7 we see the graph is almost linear, hence the space required is linear with respect to tuple size. This line cut the X-axis, but in reality the size will be fixed at 8KB, which is the block size of windows file system.

Fig 7: Transaction Table size vs Space required

Pseudo code and Mathematical Analysis

I have describe the cube generation algorithm based on HashMap. First we get the entire dimension in a vector. Then iterate over the vector and get the taransactionID and Amount for each dimension in the first while loop. And another HashMap is build with respect to DimensionID and previously build HashMap. Then we iterate through the second HashMap in the next while loop. And find the common transactionID which belongs to all the Map, and push them as final result.

Algorithm:

HashMap dimensionID2hashMapPointer;

Iterator dimensionIterator = dimension->begin();

while(dimensionIterator != dimension->end())

begin

HashMapPointer transactionID2Amount = new HashMap();

Query newQuery = BuildQuery();

ResultSet queryResult = get the query result which contain transactionID

and Amount;

Iterator dataIterator = queryResult->begin();

Repeat

tuple = dataIterator ->tuple();

transactionID2Amount = tuple;

dataIterator = dataIterator->next();

until (dataIterator != queryResult->end())

end

HashMapPointer firstDimension = dimensionID2hashMapPointer->begin();

Iterator mapIterator = firstDimension->begin();

While(mapIterator != firstDimension->end())

begin

Boolean found = true;

String resultString = DimensionID+”#”;

for all other dimension

begin

Boolean newfound = Is transactionID is in current HashMap;

found = found &&amp;amp;amp;amp;amp; newfound;

resultString += currentDimensionID+”#”;

end

If(found)

resultList->add(resultString+”TransactionID+amount”);

end


Complexity:

Let,

The query has Dimension Number = n;

The fact table has tuple count = t;

Average tuple count for any query = ta;

HashMap has constant searching time = s;

So, the first while loop has time = O(n x ta);

The second while loop has time = O( (ta) x (n-1) x s )

= O((ta) x (n-1)) [ as s is constant]

So, the total algorithm complexity = O(n x ta);

Time Complexity:

The cube access time is linear in this development. It should be polynomial as the dimension of the cube increases, but in this development Hash map algorithms were used to make the polynomial time linear. This can be considered as a great achievement in this system. So the cube generation time = O(n) here n is the number tuples in the fact table.

Space Complexity:

The space required for holding the cube is almost linear with respect to tuple size. Except if tuple size is too low. For very few tuple sizes the space will be constant and after a threshold value the space will increase linearly.

Schema

We have used snow-flake schema for storing the transactional data. In Fig the used schema diagram with the hierarchies are given, where we have shown the ERD of the schema. Here we have shown the hierarchy and the fact table. This is a sort of snowflake schema, and in the ERD there is two reference of BranchInfo related to the transaction table. They can be described as one is for where the transaction executed, and other branch reference through AccountInfo is for account to which the balance is changed. Thus they may not same. Hence this information is not redundant. And we get bank information from the account information. For inter bank transaction or inter account transaction here will be two entries in the fact table, one for debit and other for credit. In the diagram we see that there is a range hierarchy. Range is a concrete attribute but in the schema we made it discrete attribute to ensure faster query response. Query with a concrete attribute require more time than the query with discrete attribute. So, we transfer the concrete attribute into discrete attribute. Similarly we made the time hierarchy, and the last type hierarchy is for transaction type. This will define what type of transaction is defined by the entry.

All these are based on banking system. A data warehouse for banking system.

Comparative study of Data Warehouse and Data Mart

Before we are going to compare data warehouse and data mart first we have to define what “data mart” is.
In simple words we can define data mart as “specialized, subject-oriented, integrated, volatile, time-variant data store in support of a specific subset of management’s decisions”. It is actually a specialized version of a data warehouse, where it contains a snapshot of operational data, predicated on a specific, predefined need for a certain grouping and configuration of select data.
There can be multiple data marts inside a single corporation; each one relevant to one or more business units for which it was designed. Data Marts may or may not be dependent or related to other data marts in a single corporation. If the data marts are designed using conformed facts and dimensions, then they will be related. In some deployments, each department or business unit is considered the “owner” of their data mart which includes all the “hardware, software and data.” This enables each department to use, manipulate and develop their data any way they see fit; without altering information inside other data marts or the data warehouse. In other deployments where conformed dimensions are used, this business unit ownership will not hold true for shared dimensions like customer, product, etc.
So, we found that data marts are actually some sub-set of a Data Warehouse, where they are maintained for the ease of the business people. There is no way that, when a data mart reaches certain size, it becomes data warehouse, or some collections of data marts comprise or become a substitute for a data warehouse. No matter how many characteristics they have in common, data marts and data warehouses will always be different. They can not be used interchangeably, and it’s only when they’re paired together that they operate at their optimal potential.

Concept of Data Warehouse

A Data Warehouse is a database that collects, integrates and stores an organization’s data with the aim of producing accurate and timely management information and support data analysis. That is, a kind of special data base designed and maintained with the goal of decision support system of any operational system. Data are collected and copied to the data warehouse so that queries can be performed without disturbing the performance or the stability of the main system or the operation body.

According to Bill Inmon, who is recognized as the “Father of Data Warehouse”, the formal definition of a Data Warehouse is a computer database and its supporting components are:
Subject oriented, meaning that the data in the database is organized so that all the data elements relating to the same real-world event or object are linked together;
Time variant, meaning that the changes to the data in the database are tracked and recorded so that reports can be produced showing changes over time;
Non-volatile, meaning that data in the database is never over-written or deleted, but retained for future reporting; and,
Integrated, meaning that the database integrates data from most or all from an organization’s operational applications, and this data is kept consistent.
Data warehouses are generally batch updated at the end of the day, week or some period. Its contents are typically historical and static and may also contain numerous summaries.

Sunday, July 8, 2007

My First Love...

When I first meet her I was too young to fall in love. After that it takes five long years to see her again. In that time I grow up and become a young man. It was my sixth semester in university when I meet her again. It was a sublime week of my life. She embraces me with her evergreen beauty. I always think that I will never let her go, but I can’t carry her with myself. I live in one of the busiest city in Bangladesh. It was my pleasure trip. So I have to leave her. Not for ever because I know she will always be there with all her charms for me. She did not give me any stringent deadline, but I always feel I should not belong to this city, I am supposed to somewhere else. And within one month I left towards her again. Right that moment I feel nothing can be stymie between us. Probably it was my first love. First love is something that never expires in a man’s life. I still feel those days. Those are the great asset of my life. In my small life, those days are like storm which leaves me as raped young girl. The most important things, it gives me a different perspective, I learn to think differently, and I just noticed that there is lot of things out there; only the blessed one can have them. It releases my mind from parochial point of career. Alas! I am not a blessed one.

"where it begins"



...to be continued

Saturday, July 7, 2007

Pointer in C#

In case of C# you cannot get the pointer to any object, or object is not fixed in a position or you want your object reference will be same. But to communicate with legacy technology you may need a pointer which can be handle, pointer or something like that. There is a way so that the object will construct in the same location always or you have access to the object from same location. That is you fixed it in that location. This is called pin/unpin mechanism.

Here I build a class which is simply storage for an object but the location of that object is always remains constant. So, once you get the location of storage object any value you assign as object will be accessible from that location. Thats the trick,

This is very much similar to create a pointer first then assign any object to that pointer. Is it possible in C#? yes of course...

class Pointer
{
object internalObject;
GCHandle handle;
public IntPtr Pin()
{
if (handle.IsAllocated == false)
{
long _long = 0;
internalObject = _long;
handle = GCHandle.Alloc(internalObject, GCHandleType.Pinned);
}
return handle.AddrOfPinnedObject();
}
public void Unpin()
{
if (handle.IsAllocated == true)
{
handle.Free();
}
return ;
}
public T Value
{
get { return (T)internalObject; }
set { internalObject = (object)value; }
}
}


First create an instance of this object then Pin in by calling Pin() method you get the pointer as return value, and then assign your object to this object which is now accessible from your previously obtain pointer. This is very useful to create Stream object.

Adding custom behavior to your WCF service.

Sometime you may need custom service behavior, like you want to customized dispatch behavior or you want to put message inspector or even you want to redirect your service, you must need custom behavior. WCF offers lot of ways to add custom behavior; here I describe the easiest way to add custom service behavior. This is very simple things to do.
Steps:

1. You have to build a class implementing interface IServiceBehavior. This will describe your service behavior. More than one service behavior instance can work together.

2. You have to add this behavior to your service host, before open. Once you open your host, you cannot change service behavior.

Here is sample for typical service behavior class:

class CustomServiceBehavior : IServiceBehavior
{
#region IServiceBehavior Members

public void AddBindingParameters(ServiceDescription serviceDesc, ServiceHostBase serviceHostBase, Collection endpoints, BindingParameterCollection bindingParameters)
{
return;
}

public void ApplyDispatchBehavior(ServiceDescription serviceDesc, ServiceHostBase serviceHostBase)
{
foreach (ChannelDispatcher chDisp in serviceHostBase.ChannelDispatchers)
{
foreach (EndpointDispatcher epDisp in chDisp.Endpoints)
{
epDisp.DispatchRuntime.OperationSelector = new CustomDispatchOperationSelector();
// “CustomDispatchOperationSelector” my class which select dispatch operation.
epDisp.DispatchRuntime.InstanceProvider = new CustomServiceInstanceProvider();
// “CustomServiceInstanceProvider” a custom service provider class, which provide the instance for the service.
epDisp.DispatchRuntime.MessageInspectors.Add(new CustomMessageInspector());
// “CustomMessageInspector” is also a cutom class which inspect every message passes to this service.
foreach (DispatchOperation op in epDisp.DispatchRuntime.Operations)
op.ParameterInspectors.Add(new CustomParameterInspector());
// “CustomParameterInspector” this is parameter inspector class which inspect each parameter for each message.
}
}
}

public void Validate(ServiceDescription serviceDesc, System.ServiceModel.ServiceHostBase serviceHostBase)
{
return;
}

#endregion
}

Now I add custom service behavior to my service at the main program where I start the service.

ServiceHost host = new ServiceHost(typeof(CustomService));
host.Description.Behaviors.Add(new CustomServiceBehavior ());
host.Open();
Console.WriteLine("Service Host is ready…");
Console.ReadKey();
host.Close();

// This is very simple code to add custom service behavior.

Custom service behavior is very important for customized service. It is better practice to customize your service host if you need extreme level of customization. But this is all you need to inspection your message.

Have fun with WCF...

Friday, July 6, 2007

The future of web… (Silverlight/Flex)

What happen if you are able to use all of your software in explorer? You never need to install any of them. Will you be happy? I will not, but someone may be, may be everyone. That is not a big question how many among us will be happy, but probably none of us will be dislike these things if there is provision of doing such things. And so concept RIA comes in front. Lots of big organization work to empower your browser to this extends like Microsoft and Adobe. Adobe’s Flex is already well known product at the market for that. And now Microsoft comes to the race with their Silverlight. I was little bit scrupulous about not to move in web development, still I heisted to move in web development, but recently as a spacer project at our office I was involved in a Silverlight project, And my feelings is, oooh! this is web, its alright. I don’t know what the future of web is, but this platform is quite familiar for the desktop developer. And finally it was awesome to see that I can build such a web application. As it is our official spacer project we write a blog in our official blog site and I don’t want to write another blog in my personal blog site. I just give the link to our blog site for that project. The project was called Silverlight Desktop. And you can find the detail at out official blog in article Switching on Silverlight. Hope you will enjoy the whole things as I did.

Tuesday, July 3, 2007

How to build a WCF Service

First thing you have to decide about the interface. This is called service contract. All your classes appear for this service must implement this interface. First build a class library which will include your entire service contract. Add reference to the service model to this library. At the definition add attribute ServiceContract to you interface, OperationContract to all your methods, DataContract to any custom data type if you want them to carry via WCF and DataMemeber to all of its child data items. Here is an example of service contract.

   

[ServiceContract]

public interface IDiskService

{

[OperationContract]

string GetRoot();

[OperationContract]

bool CreateFile(string strhandle);

[OperationContract]

bool DeleteFile(string strHandle);

[OperationContract]

byte[] ReadFile(string strHandle);

[OperationContract]

bool WriteFile(string strHandle, byte[] data);

[OperationContract]

bool RenameFile(string strHandle, string strNewName);

[OperationContract]

string CopyFile(string strHandle, string strNewName);

[OperationContract]

FileSystemData[] Contents(string directoryHandle);

}

 

[DataContract]

public struct FileSystemData

{

[DataMember]

public string FileName;

[DataMember]

public int FileType;

}

 

This is an example of exposing a file system with WCF. Here IDiskService is our service contract. And all of its methods are operation contract. Here we use a custom data structure so we use DataContract and all of their member variables are DataMember. Microsoft claimed all the Serializable data structure can be used as input or output of the service contract but I try to use DataSet and failed.

Once you complete this step you have complete service contract. Now you have to build service provider. That is this is your service contract but there must be some one who will provide the service. And generally this is a class inherited from this interface. The service provider must have all this OperationContract that is it must have all these methods with same signature.

 

Now build that class and place that in any library or project. This is most simple part with respect to WCF. All you business logic belongs to it. Let I build “DiskServiceClass” for IDiskService.

 

And the last step is building a service host application which can host your service. Just take a console application or Windows Service application or any other type of application and add reference to servicemodel.dll. Now add an app.config file to your application. This is used to configure your service host. An example of app.config is showed below with necessary comments.

 

<configuration>

  <system.serviceModel>

    <services>

      <service name = "ServiceImplementor.DiskServiceClass" behaviorConfiguration="metadataSupport">

// this is used to identify the provider class here the name is the name of my provider class. And behaviorConfiguration="metadataSupport" describe that this service will support metadata so you can get wsdl from this service.

        <host>

          <baseAddresses>

            <add baseAddress ="http://localhost:8000/Services/DiskService" />

          </baseAddresses>

// this is the address of the service to locate it.

 

        </host>

        <endpoint address = "" binding="wsHttpBinding" contract="Services.IDiskService" />

// this is used to identify the protocol stuck, as we know WCF is designed to run over multiple protocol stuck, so here we have to select the protocol stuck, which must match with address like if you want to use tcp then address must net.tcp etc.

        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

      </service>     

    </services>

    <behaviors>

      <serviceBehaviors>

        <behavior name="metadataSupport">

          <serviceMetadata httpGetEnabled="true" httpGetUrl=""/>

        </behavior>

      </serviceBehaviors>

    </behaviors>

  </system.serviceModel>

</configuration>

 

That’s it; you are almost at the edge. And now you have to write a simple code, in main function.

 

ServiceHost host = new ServiceHost(typeof(DesktopServiceLibrary.DiskService));

host.Open();

Console.WriteLine("Service Host is ready to service");

Console.ReadKey();

host.Close();

 

That’s all; now your service is ready to go. Any one can get service from your application. This is all for today. I will show customization and flexibility in my future articles. Just have fun with WCF.

Monday, July 2, 2007

Time... time... time...

Sometimes I think am I living? I don’t think so. Is this life? Is this fucking life. Starts at morning and ends at almost midnight but between them I never feel I am a living being just for one moment. So what the hell you call this one? Once upon I had lot of dream to do lot of thinks, but now I thinks all of them are dying one by one. Just I am remaining and waiting for ultimate destiny. “There is no compromise about ultimate destination in life.” Is this my ultimate destination? These are all things, I deserve? I don’t know. I am becoming sullen day by day. I don’t find any heal