Welcome to BARMAGY Sign in | Join | Help

[PPT & Code] dotNETWorks presentation at CIC

Yesterday, Feb 9th i did a presentation on WCF & Channel models, at CIC with dotNETWorks user group attached is the PPT & code i have demoed

 

Kal

 

posted by KAL | 3 Comments
Attachment(s): ALL.rar

VS.NET Roadmap (along with .NET)

Recently I have been digging around VS.NET extensibility for a little thing am helping doing, found this one http://visualstudiomagazine.com/features/article.aspx?editorialsid=2392 this one is about where VS.NET going in the upcoming 2 years.

 

Kal

 

 

 

posted by KAL | 1 Comments

Presenting with dotnetwork.org at CIC

a young group of geeks have formed a community in Egypt for dot net developers, i will be doing a session with them sat feb 9th covering WCF what i have in mind in WCF ground up that is going thru channel model, bindings how they really work also covering WCF tracing

the session is mainly demos i am in the mood for code walkthrus not slides :)

the group is here: http://www.facebook.com/group.php?gid=2409268236

the event is at:

This event is planned to start at 12:00 pm on Feb 9, 2008 at CIC (the Canadian International College) campus.
 
they have buses arrenged as well so be sure to check thier facebook page
 
see you there!
Kal
 
posted by KAL | 1 Comments

Every now & then..

Every now & then I get inspired, nothing inspires more than passion, it gets transmited faster than light (if you are ready), here is a good article discussing this craft and our passion about it!

 

http://msdn.microsoft.com/msdnmag/issues/08/01/EndBracket/default.aspx

 

i am quoting one who is quoted in the article

 

"

I'm a father, a runner, a rower, an environmentalist, a human being, and, yes, a programmer. I'm a lifelong learner, and I love to learn everything, not just programming languages. I love technology, but there are so many other things in this world to love, and we have such a short amount of time.

"

 

..

posted by KAL | 1 Comments

WCF 3.5 Paper

one of those really good papers!

http://download.microsoft.com/download/f/3/2/f32ff4c6-174f-4a2f-a58f-ed28437d7b1e/WCF_Diversity_Paper_v1.doc

Titled: Dealing with Diversity: Understanding WCF Communication Options in the .NET Framework 3.5

posted by KAL | 13 Comments

WCF 3.5 First Glimps

WCF now has a channels for RSS ATOM, use WCF Syndication project template

interstingly its using WebHTTPBinding which is a new binding for WCF mainly targeting Ajax Applications

 

 

cheers

 

posted by KAL | 10 Comments

Tech Days - Gulf: Presentation

  I have done this presentation in Dubai, within Tech Days gulf, was cool to meet alot of people working in the gulf area and really intersted that much in the approach

attached

Kal

posted by KAL | 0 Comments
Attachment(s): Real Life SOA.ppsx

REST assured and AJAXED

some incomplete thoughts...

 

Its so interesting how we forget simple approaches to implementing stuff, particularly with the craziness of WS-* standards. Among all that Roy Fielding came up with paper around a proposed implementation approach called REST: Representational State Transfer

 

 

So lets say you want a page that manipulates date for example stock quotes obviously you want this data to be updated every 10 sec without the jerky browser behavior of refresh,

 

To build on top of that the data is the following

 

          class Quote

          {

                   string StockName;

                   decimal StockValue

}

 

 

probably the first thing that comes into your mind is wsBasicHTTP binding WCF service or ASMX and then add some Ajaxed control that does that. But think of it, the time to market for that is a bit long needless to say the irrelevant time consuming tasks of designing service interface

 

 

What Roy is saying is deferent, imagine this

          A get request against http://localhost/Stocks/<stockname>   will get you this XML

                   <stock name=”<name here>” value=”<stock value here>” />

 

          A post request against http://localhost/Stocks/<stockname> with the <stock name=”<name here>” value=”<stock value here>” />

Will update the stock value (maybe from some backend system)

 

          The approach is so simple and yet so powerful the part I love the most is you don’t have to work with custom standards commands like webDAV (LOCK/LIST/GET etc..)

                  

More about it here http://www.xfront.com/REST-Web-Services.html

 

The part I hate the most about this approach and other Ajax (XML over HTTP) is data is represented to browser as XML and then you will have to write a lot of commands against (“MSXML.XMLDocument”) to read the data

 

 

What I am thinking of something relates to representing the data as JS objects yes those old good ones like

          //JS CODE

Function Stock(sStockName, dStockValue)

{

this.StockName = sStockName;

this.StockValue = dStockValue;

}

So what I have written are some js serializer (probably HTTP Handler) that takes data classes and create JS objects out of them, then these data objects can be sent back and forth to REST handler.

 

So you would end up with 2 URL schemes one for the data which might look like

 

http://localhost/Users/{userid}

and another URL for the metadata which might look like

http://localhost/metadata/user

 

Here is a piece of pseudo code that illustrate that

 

Function getJSType{Generic}(Generic T)

                Generate JS Function Header: “function Name(T)”

 Foreeach member in Generic T

                                Generate: “this.(T.MemberName)” = “T.MemberName.Value”

                Generate Js Function Ending..

End Function

 

I had an actual .NET code that done this, somehow I lost it :(

 

The previous code will generate the metadata, another handler could take care of generating the actual instance by returning JS code to the client instead of XML

Something like var c = new Customer(“fname”, “lName”);

 

The client JS helper might then embed this in browser by using document.write.

 

It just another idea I had in mind, might actually work out.

 

 

posted by KAL | 1 Comments

Presenting in Tech Days - Gulf

I will be talking in Tech Days - Gulf (Dubai Dec 5th). this should be abit exciting as i will be walking thru ESB implementation using WCF/BTS R2 LOB adapters.

a bit wild - Real Life - ideas about Messaging Routing/ SAML based STS BTS WCF Adapters..

more details are there, www.techdaysgulf.com

 

 

 

posted by KAL | 1 Comments

BAM/e

BAM is probably the most useful & undervalued piece of software built for SOA world so far. Reason being is the complexity of design/deployment for the component (or at least the first design/deployment)

 

BAM is Business activity monitoring tool that allow your BizTalk solution (did I say BTS? Actually all of your solution keep reading..) what happens is BAM sneaks peaks into your messages and workflows (orchestrations) and start extracting and saving data in a separate store based on a preset tracking profile. This process called interceptors.

 

BTS 2004 was shipped with one interceptor only for BTS orchestrations which back then everybody was scratching his head trying to figure out what is that? Almost immediately everybody was coming to same conclusion

 

-          Why cannot I use BAM to track business activities from other parts of my solution, I mean come on messages reaches BTS after they have been going thru other systems.

-          Almost immediately people was saying ok I use BTS for messaging only why can’t I BAM that?

-          The answer was BAM API, with one catch. API was not strong typed in other words it allow you to pass any number of parameter to a single activity and that will not be checked in compile type (a recipe for disaster to tell you the truth)

-          Then strong type API generator, was on gotdotnet. Then gotdotnet was phased outL

-          Then Microsoft PG actually blogged on how to use the API to BAM messages as they go thru BTS pipeline.

 

Everybody was happy, especially when BTS 06 came out with

-          BAM built in pipelines

-          BAM WCF interceptors to intercept  messages on WCF services.

-          BAM WF interceptors to intercept WF activity shapes.

 

The thing catch is:

                Here is a typical SOA BAMed solution (anyway..)

 

 

From it:

-          You will have to configure each service in isolation, even if the same message type is moving from one service to the another

-          Administration is hardcore XML/XSD guru’s. users can not actually change it.

-          You cannot really intercept anything other than WCF/WF

-          You cannot control error cases, in a configurable manner, for example if I couldn’t BAM “new customer activity” I am fine, but if I can’t BAM “new order” I need to fail the order. And a lot of similar examples.

-          BAM interceptors with BTS 06 R2 is highly tight to WCF/WF model so you can not use anything other than those.

 

 

Well BAM SHOULD BE BAM/EVERYWHERE hence BAM/E

 

I mean you should be able to BAM anything, that includes types, messages, xml anything that goes thru your application is BAMable.

 

Here is how it might look like

 

 

1-      Separation of configuration from actual interception process

2-      Configuration is loaded and centralized in a DB; meaning a user interface can be built on top of the configuration to manipulate it.

3-      Configuration store takes care of exporting configuration changes to BTS TPE

4-      Multiple interceptors can consume one configuration instance to provide a full view of message life time across multiple services

5-      Message can move from WCF service to ASMX service to WF and to a custom code and still complete view of activities is there.

6-      Complete support of milestone & activity continuation is there.

 

 

Note that "/e" thing is from WPF/e which later on came out as SilverLight

 just thinking!..

  

posted by KAL | 1 Comments

Refresh - Convoy

3 years ago convoy was almost as complex as old languages to undestand now with alot of materials on it and alot of usage, things are pretty simple

here is my fav doc when it comes to referesh knowlege on this front

http://msdn2.microsoft.com/en-us/library/ms942189.aspx

this works for BTS 2004/2006/R2

 

Kal

posted by KAL | 0 Comments

“easy to use” SQL Server Instance Management Haven’t seen it yet in SQL –Katmai-08!

 

                I have not see yet a smart way to manage multiple SQL instances running on the same box, for example I shouldn’t need to do a complete installation just to configure a new instance on server giving the fact that I have the binary installed already on my box.

 

                Oracle for example have a smart way with a bad interface to do that, like spawning off a new instance using the user interface, that include configuring listeners etc..  (no need to have Oracle CDs close by).

               

                I looked at SQL 08 Katmai quickly with no clear way to do that, maybe I just missed some small configuration tool here and there.

posted by KAL | 2 Comments

Digital identity in service implementation & SOA world

    some excellent work describing how Microsoft technology stacks deals with identity management issues (mainly Authentication & Authorization) by David Chappell additionally he thoroughly explains the deferences between “domain based authentication” and “claim based authentication”

If you are developing services, or planning to as matter of fact if you are developing on Microsoft technologies in any way this is a must read document

The document is here (http://msdn2.microsoft.com/en-us/library/bb882216.aspx) his own comments on it is here (http://www.davidchappell.com/blog/2007/10/digital-identity-for-net-applications.html)

Kal
posted by KAL | 0 Comments

Configurable logic via Windows Workflow foundation

 

                Few years back (6/7 years to be specific) I wanted to separate the logic a certain application executes from the application itself, in a way that will allow me to call logic by name pass in parameters, get out parameters that allows development to the actual logic be late bound kind of approach  a simple pseudo code for the approach is like

 

                {

                // app entity generation

                                Customer = new customer(); // for the same of the discussion, entity is called customer

                // read entity from UI or database or any

                                Customer.FirstName = uiElement1.data;

Customer.LastName = uiElement2.data;

Customer.Email = uiElement3.data;

 

// Execute save to storage logic

 

LogicExecutorInstance = createNewLogicExecuterInstance();

// upon writing this code all we know that there is a block of logic that needs to be executed called “ProcessCustomer”, this takes care of

// customer process. This way, this current piece of code or component is no not one to one tied to this logic

customerProcessingResult = LogicExecutorInstance.ExecuteLogic(“ProcessCustomer”, Customer);

DisplayResult(customerProcessingResult);

}

 

The idea back then was very simple, logic blocks was represented as a pipeline sort of speak, each pipeline is:

-          Name

-          List of tasks

                Each task is either:

-          COM+ call (in this case you need implement a specific interface and this to be called), input parameter was always XML, output was either a specific interface implemented COM object, or  XML

-          A script call, in this case your script will be called XML will be passed in as a parameter

-          XSLT call, which is a transform to execute

 

                The whole configuration is saved in a SQL DB, the system also provide 2 ways to call into the system

-          File watcher that has configuration of files to be picked and logic to be executed and then file out.

-          API calls via COM object directly to call into the system which is the sample above illustrates

 

This is how it looked like

 

 

 

 

                The whole system took 3 days of development, never went to production as it was to slow no caching to was built in the API so every time a linked list of the tasks has to be built and executed, definitely the main reason was back then it was too scary to build and deploy and product even though the idea was successful back then, then BTS 2000 came out with application features like was too easy and hey somebody else wrote the same code and willing to support it.

 

               

 

                Few days back flying back home from Seattle after SOA &BP conference obviously 20 hours of nothing to do other than sitting, the idea was recalled and I was thinking it might be needed somehow knowing that the implementation was needed in away in today’s development approaches, just image ASP.NET form that calls the logic without knowing the exact logic at the time of prototype development or the actual development itself, so I decided to put it together time myself on implementing the same approach on a deferent technology stack

 

                So again:

-          Pipeline list was configuration section in configuration file

-          Each pipeline have

o   Name – text key

o   Workflow type – complete assembly & type name for a sequential WF that implements the logic

o   Parameter type in

o   Parameter type out

-          A static library on top of all that takes care of loading WF executing it and return in it.

Configuration will look like:

                <logicExecuter>

            <logicItems>

<add mode="SyncInOut"  name="default" type="WorkflowConsoleApplication1.Workflow1, WorkflowConsoleApplication1" inType="System.String" outType="”Assembly qualified name of the parater, you need a reference type" />

            </logicItems>

       </logicExecuter>

 

Providing 2 ways of calling the logic

-          Fire and forget which is a one way call, the calling thread will not be stopped until logic is completed.

-          Async in/out call which your thread will be blocked until logic is executed and returned with results

 

Rules:

-          WF type will have to provide property that maps direct to “parameter type in” & “parameter type out” and has specific names

-          WF type will have to provide one property of type “AutoResetEvent” used to lock current thread until WF executes. Which means you WF will work in synchronous mode until this event is signled, the reset of activities will be executed in async mode, powerful eih? :)

-          Async calls should happen using external features like methodinvoker delegate or ASP.NET 2.0 async pages.

 

The system looks like that

 

 

Calling code will look like

                                ExecuterEngine.startRuntime(); //optional the library will init the runtime if it wasn’t

 

         

                string sOut = ExecuterEngine.Execute<string, string>("default", "sIn");

           

additional feature – my fav actually – is you don’t even have to have a type for each logic you need to have during prototyping your application, you do need that there is a logic block to be executed at this button click or so, so what you can do is to use this call

 

    string sOut =

        ExecuterEngine.ExecuteNone<string, string>("logicname", "someparmater in", "some value out");

 

This basically will execute an internal workflow that does nothing other than having one activity that signles the wait event, returning the 3rd parameter sent, during prototyping this will get you a sense of “connecting” logic together until you develop actual logic then use the original call

 

Attached is the code, I did some initial load testing and results actually impressive, got to love how WF is performing

 

-          LogicExecuter.Core, c# class library is the static library that isolates you from internal working

-          LogicExecuter.Tester, c# console to test the library

 

Enjoy

 

 

 

posted by KAL | 0 Comments
Attachment(s): LogicExecuter.rar

Queues are databases

 

 

 

                It really helps when you know the research that happen to behind building large scale software packages like SQL server Service Broker or BizTalk server itself, (both products are heavy processing of data structures saved in queues, the storage underlying the storage is in fact SQL table) a lot of what’s built driven from papers like this: http://arxiv.org/ftp/cs/papers/0701/0701158.pdf

 

                This paper is by a Microsoft researcher Jim Gray, he was proposing that queues based on transaction processing systems TP like SQL servers are much more powerful and the resemblance is even very obvious in most of application quoting the paper

 

The paradox is that queues are just an application data structure. Their concurrency

control and recovery needs appear in many other contexts. An auction application

looking for a set of sellers to match a buyer needs exactly these features. An emergency

dispatch application needs to find the highest-priority request not yet being serviced.

Similar requirements appear in workflow, CASE, and parallel programming models like

Linda.

There is a pattern here. Each new requirement for a queuing system seems to reflect a

corresponding requirement for user-application data. This recurs when one considers,

query interfaces to queues, queue performance monitoring, queue backup, restore,

recovery utilities, queue security, and so on. Indeed, Richard Carr reports that when a

queuing mechanisms was added to Tandem’s database servers, several applications

became simpler and faster.

sadly he was lost in the sea (http://www.theregister.co.uk/2007/01/30/gray_sea_hunt/)

don't know what happened later on; but it was all over the news, people who got educated by him working for Google/ Microsoft were trying to do some heavy image processing to find his sailing boat.

 

 

Kal

 

posted by KAL | 2 Comments
More Posts Next page »