Showing posts with label Interpreter. Show all posts
Showing posts with label Interpreter. Show all posts

Monday, November 30, 2009

DSL 101 – Domain Specific Languages

Today, I spent quite a while helping a friend to architect at high-level a DSL (Domain Specific Language).

Even though at the time he did not realize what he wanted to do was create a DSL. TO him all he needed was a way to do excel like formula expressions inside his code, but in a more English like syntax well as English as a chemical scientist can be I guess.

To this end, I thought it might be worthwhile explaining what a DSR is, since I will build a few of them for the project’s I mentioned that I am playing with for fun on this blog as I learn F#.

So just what is a DSL:

A domain-specific language is a programming/specification language customized to a particular problem domain.

This is quite an old concept as special purpose languages for modeling have always existed but recently have had a surge of emergence once again due to most newly created systems needing a more flexible way to extend logic used without the need of a programmer.

Creating a DSL and the tools required to support it can be worthwhile if the language allows a particular type of problem to be expressed more clearly than existing languages would allow. An example of this is the issue of applying simple logic used to route a document for approval in a document management system.

Another example of the new generation of DSL’s are products/tools like cucumber (from the Ruby world to do BDD), and in the F#/C# world we have tools that are DSL' based such as NaturalSpec (also a BDD tool this time for F#).

Sunday, November 22, 2009

My First Big Data Integration project in the early 1990’s

I am not sure how many people read this blog? However I have been reminiscing on some of my favorite data integration Projects/products from my past.  (I will outline this project and the type of work involved later., it taught me a lot about data integration from multiple related sources into a single normalized master version of the data, and then using that normalized view to output data in any shape required!)

I worked on this product very early in my professional career; The product basically allowed you to take data from any mainstream project management system, store it in a common normalized format, (think of a high level logical model of project management entities and relationships plus logic for common project management tasks like rolling-up or down project metrics and WBS) and then pushing out data after some processing, integration and normalization to any project system format that we supported.

Just for the record some of the products we supported at the time Microsoft Project, Primavera and Microsoft Excel to name but a few.

A key selling point at the time was the ability to take changes to a project plan in any of the major project management tools on the market, normalize them into a common format, do some project related processing to the plans, and then push out a normalized view of the project data (a single master copy if will) to end user system formats. Then once changes were made once more they were updated in the normalized logical model and then publish back out to supported systems once again.

It was pretty impressive for a good 12+ years ago!

Wednesday, November 18, 2009

Scanning and Parsing…

Over the past 4 years I have been looking at interpreter and compiler creation specifically in the area of Scanning and Parsing.

One of the designs architectures that I designed some years ago was based on parallel processing of a stream of data (a file, and communications port/channel, etc.).

It is just this design that I aim to bring to life in the API’s I am creating over the next god knows how many months.

The concept is simple, but like many concepts there is a lot more to it that the text here implies; However, I do believe I have solved most of the architectural and performance based issues. This is due to both some rather large processing advances and superior development tools now on the market.

the concept itself is based on a pointer based parsing system, that uses various conditional logic to step forwards, backwards and indeed around various parts of a stream as it is being processed.

Traditionally this kind of Scanning/Parsing system is notoriously slow. but by looking at certain interpreter/compiler creation and performance optimization tricks, I think it may work at an acceptable performance level for real world systems… Guess I will find out in time.