September 2006 - Posts

Thanks

That was the first time we expose INDC and all our communities to media. Agung told about his long journey to become enterpreneur then Pak Tahir with INDC. Agus with our OTAK project and then Dondy told about IASA. Norman, about Geek's culture as usual. Kiki closed the meeting with SQL Bandit. Nice !!! Many friends from medias and newspaper also very interested. Thanks guys. You are the real evangelist!
Share this post: | | | |

My Writing Activities

I have published many to SDA Magazine before and start from Sept 2006, I will write Web 2.0 and Algorithm topics for PCMedia. I will also do for .NET on Detik. I hope WRITING will be an INDC Leader culture.

Share this post: | | | |

Software Architect Forum | Starting your AD/ADAM Journey

Here is my advise,
- Download ADAM Installation here
- Download ADAM Step by Step Guide here
- Download ADAM Overview Presentation here
- Read this document (Bundle ADAM with your Application)
- Learn how to use ADSI for managed code or native depends to your needs
- Discuss with others in online forum

Ok. Nice to see your passion in technology. See you in other SAF event.
Share this post: | | | |

ATLAS | PCMedia Next Article

Some of you who attend to Bina-ISV training have gotten my class about AJAX and ATLAS. I will write for PCMedia next edition about this. I hope you enjoy it.

Share this post: | | | |
Posted by Risman Adnan Mattotorang | with no comments
Filed under:

Bina-ISV Training Batch VI

I enjoy talk to ISV developers.. this is the last batch for ASP.NET. Next, we will go to Smart Client topic.

Share this post: | | | |

Test from Windows Live Writer

 

Mohon maaf kalau forget password featurenya rada lelet ngirim email ya.

Share this post: | | | |

Posted from Windows Live Writer

Guys, you should try this nice tool. Windows Live Writer. This posting is using Windows Live Writer. I hope you enjoy this tool and INDC geeks portal as I do.

Thanks for all volunteers who involved in the migration:
- Sagi Arsyad, MIC LAB (to be) University of Indonesia 
- Kunto H. Baiquni, WSS-ID Leader and INDC Infrastructure Team
- Tahir Tahang, INDC Leader
- Dondy Bappedyanto, INDC Leader

See you when I see you !

Share this post: | | | |

Zeddy Blogs on Phoenix

If you want to learn Phoenix, dont miss Zeddy blogs.

Share this post: | | | |
Posted by Risman Adnan Mattotorang | with no comments
Filed under:

.NET Framework 3.0

Guys, .NET Framework 3.0 community website is centralized to www.netfx3.com. You should visit it. After back to Jakarta, we can start exploring NetFx3 in CommunityInTouch, Software Architect and other Microsoft events. See u.

Share this post: | | | |

FIX Engine with WCF

Not too many people in Indonesia working on this protocol because it is very specific to financial institutions. Financial Information eXchange ("FIX") protocol is a series of messaging specs for the communication of financial trade-related messages. It has been developed through the collaboration of banks, broker-dealers, exchanges, industry utilities and associations, institutional investors, and information technology providers from around the world. You can get FIX specs here and you can see older implementations of FIX server from http://www.quickfixengine.org/. I was amazed that in Indonesia we already have local ISV who works on FIX, www.rti.co.id. Great job Pak Eric !

Microsoft has released Unified Programming Model for messaging-based application. We called it
Windows Communication Foundation (WCF). Unified means that all the programming models and APIs that we have before, like TCP Socket (WinSock), ISAPI/WinInet, DCOM Remoting, .NET Remoting, SOAP/Web Services, will be unified into one framework (collection of reusable OO classes). WCF is a framework that I am looking for to solve some pains in complex messaging system like FIX. For me as developer, WCF is new DLL installed on GAC, new namespace added to your IDE, much more new classes, new programming model (support both declarative and imperative), and so on, and so on. Again, for unification reason, using WCF we can skip all the older messaging framework. But our choices is not only that. We can combine it, mix it, to make better perform products/solutions. 


Share this post: | | | |

TechEd SEA is over

Well, we have finished TechEd today. I am very happy to say that this time, we sent many people including speakers from Indonesia. For all developers who were joined TechEd, you can see that in Indonesia, our activities in exploring technologies is deeper than other countries in SEA. See u soon in Jakarta.

Share this post: | | | |
Posted by Risman Adnan Mattotorang | with no comments
Filed under:

My TechEd SEA Talk

I just did it. One of my friend from Singapore said it was hardcore, other developer from Redmond amazed that this thing being explored in Indonesia, etc, etc. For me, still many things have to be explored in Phoenix. It just a starting point for a long journey. Altho' it is framework with good documentation, each classes in Phoenix need to be reviewed in order to utilize it to construct our next generation tools.

Share this post: | | | |

Around GC

In Win32, each process has an associated address space. Portions of address space can be reserved, mapped (or "committed"), or unmapped ("freed") using the functions VirtualAlloc and VirtualFree. (In addition, NT allows one process to allocate memory in another process). File objects can be memory-mapped into the address space using MapViewOfFile. Various levels of protection can be applied to mapped address space using the VirtualProtect functions. On NT, ranges of address can be "locked" into memory using VirtualLock (and unlocked using the obviously named VirtualUnlock). The function VirtualQuery can be used to obtain information on a range of addresses. In practice, most programmers will not need to manipulate memory using these functions as they will use the language's memory management (for example, malloc and free in C) instead. The commonest exception will be mapping files into memory.

There are many ways for automatic memory managers to determine what memory is no longer required. In the main, garbage collection (GC) relies on determining which blocks are not pointed to by any program variables. Some of the techniques for doing this are described briefly below, but there are many potential pitfalls, and many possible refinements.

GC is dead objects. GC also known as automatic M2, is automatic recycling of dynamically allocated memory. GC is a tried and tested M2 technique that has been in use since its invention in the 1950s. GC avoids the need for the programmer to deallocate memory blocks explicitly, thus avoiding a number of problems: memory leaks, double frees, and premature frees. GC can also dramatically simplify programs, chiefly by allowing modules to present cleaner interfaces to each other: the management of object storage between modules is unnecessary.

It is not possible (in general) for a GC to determine exactly which objects are still live. Even if it didn't depend on future input, there can be no general algorithm to prove that an object is live (cf. the Halting Problem). All GCs use some efficient approximation to liveness. In tracing GC, the approximation is that an object can't be live unless it is reachable. In reference counting, the approximation is that an object can't be live unless it is referenced. Hybrid algorithms are also possible. Often the term GC is used narrowly to mean only tracing garbage collection. There are many works on GC.

Microsoft Phoenix provides “a framework” to support "compilation requirements" for runtime CLR GC. It supports:

- Code generation for GC
- Tracking and reporting local object lifetimes for the runtime GC

The runtime GC manages the allocation and release of memory for all managed programs. Each time a managed program creates an object, the runtime allocates memory for the object. Eventually, however, repeated allocations stretch memory resources and the runtime Garbage Collector performs a collection so that it can release some memory. The Garbage Collector can release any memory that is no longer used by the running program. The compiler helps identify the set of managed objects that are still in use by the method at a collection point, based on information tracked by the GC Tracker and based on code processing points the GC designated as safe for collection. The GC Tracker tracks object lifetimes, and performs the analysis necessary to decide which objects can no longer be accessed.

What about native GC? Like libraries that you have for GC? You can make Phoenix plug-in to inject codes inside your codes. I hope I have time to make a demo for you.

Share this post: | | | |

Phoenix Plugin

Phoenix supports plugin-model for C2 backend compiler or analysis tools you built. You can use plugin with -plugin: in C2 control swtich. Plugin is currenty only for managed code. Other thing is we can only have one plugin implementation in one assembly for current RDK release.

Share this post: | | | |
Posted by Risman Adnan Mattotorang | with no comments
Filed under:

What can Phoenix do for us

I always like to start with litle history then answer the WHY question.

Phoenix History
Several years ago the Visual C++ was cranking out compiler backends, doing platform retargeting (x64, IA64) for example was a painful process, and a small group in the Microsoft VC team decided that it would be worth creating a new backend infrastructure that would allow rapid retargeting to different platforms. On the other side Microsoft Research (MSR) were did some of the worlds most advanced binary rewriting and static analysis research. Retargeting also done by CLR team. Then VC team, MSR, and the CLR  teams finally decided they should join forces to create a new project which not only would be a rapid retargeting backend, but a new platform for doing program transformation and analysis. For doing next generation of compiler. Additionally, this team agreed Phoenix should be the code generation platform for all of Microsoft.  At one point there was something like 25 distinct code generators at Microsoft.  For example, the current x86 JIT/NGEN uses a different codebase from the 64bit JIT/NGEN, which is different than the Visual C++ compiler codebase (though we do share a codebase for the x64, x86, and Itanium Visual C++ compiler).  Microsoft should find a way to leverage the investment in one product (or productization) into that of another as the core needs and requirements are very similar.  Phoenix was born, he is 4 years old.
 
Why Phoenix?
Now why should YOU learn Phoenix?  Because you dont want to use a “God-Given” compiler. You write your codes, you use some compiler switches (/Zi, /O1, O2 /Fa, etc…) during compilation, and at then you get DLL or EXE. As the developer you don’t have knowledge what compiler does, and ironically, you cant control compiler process. Once you get the final DLL/EXE, you cant to anything with it. ILDASM and DUMPBIN can help at this point, but, their use is extremely limited. After you use them, no programmatic way to change the IL or ASM. Why is EXE or DLL are so sexy?  You're their father who built them, yet to analyze your DLL/EXE's behavior or to make modifications to it is really critical.  If you have ever tried to do ASM codes, or binary rewriting, you know that it is hard. With CLR, it easier but, codes around the world is not just C#, J#,C++/CLI or VB.NET. Phoenix's job is to increase your controls to your son, assembly and CIL. Phoenix also shipped with framework as its tittle, means that, reusable for program analysis and transformation. Phoenix is a transparent box not black box like front end compiler we used. Actually not really black box, because in SSCLI, we can see the implementation codes of CL.EXE. Here's the typical flow of source code to program:
 
[C++ Codes] -> cl.exe -> c1xx.dll -> c2.dll -> link.exe ->  program.exe
 
With Phoenix, there will be hooks directly into the code generation process (pipeline), and we can alter our executable son even after it was built. 
 
Examples of Phoenix Use
Here are some ideas from Uncle Kang Su Gatlin blogs

1) You came up with a new algorithm that could automatically parallelize C++ programs.  How should you implement this? Today you'd have to either (A) write your own compiler from scratch, which will almost certainly make it a toy compiler (unless you have a small army of developers), or (B) tap into some existing hard-to-use open-source compiler infrastructure and modify their code.  And if you've ever tried to do this in the past with the popular existing compiler infrastructures, you'll quickly learn that doing option (A) is almost easier. Phoenix has a plug-in model in the back-end, which allows the developer to insert or reorder compiler phases.  Now, you can simply implement a "parallelization" phase (or it may make sense to break it up into multiple phases), and simply hook that phase in-between existing phases.  That's pretty darn cool if you ask me.  In future postings I'll go into more detail on how to do plug-ins to Phoenix, how to add a new phase, and how to write Phoenix code to do useful analysis and code transformations. What makes this all the more impressive is that Phoenix will be THE Microsoft compiler.  No more testing your algorithm on toy programs with toy languages.  Instead, you can now compile real applications with real workloads to understand the impact of your parallelization plug-in.
 
2) You're now working on taking your parallelization framework directly into Visual Studio.  You want to add a new feature in the editor that will place red-squigglies under code to represent code that causes a loop to not be parallelizable (or maybe put in arrows between dependencies in the code).  You can use Phoenix to do the analysis on the code - using your dependence analysis package - and then use this information to determine where to put the squigglies in Visual Studio. And there's even more that Phoenix does.  For example, Phoenix has support to do binary analysis and rewriting.
 
3) You are a consultant that is at a customer site and dealing with debugging an application. You have some libraries that you've written that can do call-stack analysis, but it needs to be invoked by the application at entry to each function. You'd probably need to rewrite the customer's application. With Phoenix you can write a simple application that loads the EXE and raises the machine code into the Phoenix IR.  From there you can add a new function call at entry to each function.  After this, you instruct Phoenix to lower the modified Intermediate Representation back into an executable file.  

 
What would YOU like to do with Phoenix?  I am interesting (my personal research) to use Phoenix for memory management (allocator and GC) analysis tool on native C/C++ code base software :). What about you??

Share this post: | | | |
More Posts Next page »