BYNET In Teradata – What are you

As we have talked about before, Teradata embraces the concept of SMP and MPP. Within the hardware context, there are two componets that build up this platform. The first if the Processor Node, this is responisble as the name implies for the data processing. This is mostly related to the concept of SMP. Within the realm of MPP, the BYNET is responsible for providing the interprocessor network that link together the components of the MPP system. This can take many forms, including broadcast, multicast, or point-to-point communication. The one that I had the most questions about was the BYNET thing.

The BYNET simply acts as the interconnect hub. Just think of it as the torso while the remaining SMP‘s are the limbs of the overall architecture. Most Teradata architects would poo-poo this description as it doesn’t embrace the concept of everything that the BYNET does but for the sake of my development it is the connector of a series of nodes (I am a Microsoft developer at the end of the day). Important thing to remember is that BYNET‘s in a multinode system can be load balanced and follow a standard TCP/IP protocol for inter-messaging. But, for the nodes to be aware of process oriented directions, load balancing is actually not required, just refines the process. At the end of the day, within all this, you end up with the overall MPP. If the BYNET is a single node, a virtual BYNET is used for simulation.

 

 

 

 

 

Share

Adding A ProgressBar Column To A RadGrid In A SharePoint WebPart

I really thought there would be a tutorial on this on the Telerik website but I couldn’t find anything relevant. In this post, I am going to show you how to add a progress bar column to a RadGrid or RadGridView. So, my goal is to have something like this:

I am just setting the value in a master/detail view in a straight forward TextBox. I am not using AJAX or anything so some of the wiring to maintain values is simply to deal with PostBacks. Just looks like this:

Firstly, I am going to use the one from CodeProject, which is used in a lot of apps, for example the SnapStream project. You can view the SVN version here:

http://source.snapstream.com/repos/WebAdministration/controls/ProgressBar.cs

Blah Blah blah here is the code.

The ITemplate to wire up to the custom column:

[csharp]
public void InstantiateIn(Control container)
{
UpdatePanel panel = new UpdatePanel();
ProgressBar bar = new ProgressBar();
bar.ID = “bar”;
bar.ForeColor = Color.Black;
bar.Width = Unit.Pixel(150);
bar.FillImageUrl = string.Format(“{0}/Supporting%20Images/bg.gif”, SharePointHelpers.SiteUrl);
bar.BarImageUrl = string.Format(“{0}/Supporting%20Images/indicator.gif”, SharePointHelpers.SiteUrl);
bar.Visible = true;
bar.Enabled = true;
panel.ContentTemplateContainer.Controls.Add(bar);
container.Controls.Add(panel);
}
}
[/csharp]

The template column to add to the grid:

[csharp]
var x = new GridTemplateColumn();
x.AllowFiltering = false;
x.HeaderText = “Percentage Complete”;
x.ItemTemplate = new ProgressBarTemplate();
grid.MasterTableView.Columns.Add(x);
[/csharp]
Wire up the data bound event:
[csharp]
public static void grid_ItemDataBound(object sender, GridItemEventArgs e)
{
var nestedItem = e.Item as GridNestedViewItem;
if (nestedItem != null)
{
Panel panel = (Panel) nestedItem.FindControl(“InnerContainer”);
TextBox tbPercentage = (TextBox) panel.FindControlRecursive(“tbPercentage”);
tbPercentage.Text = DataBinder.Eval(e.Item.DataItem, “Percentage”) != null
? DataBinder.Eval(e.Item.DataItem, “Percentage”).ToString() : “[None]”;

TextBox tb = (TextBox) nestedItem.FindControlRecursive(“tbPercentage”);
GridDataItem parentItem = nestedItem.ParentItem;
ProgressBar bar = (ProgressBar) parentItem.FindControlRecursive(“bar”);
string x = tb.Text;
bar.Percentage = Convert.ToInt32(x);
}
}
[/csharp]

Wire up this prerender event to the grid:

[csharp]
public void grid_PreRender(object sender, EventArgs e)
{
foreach (GridDataItem y in _grid.Items)
{
if (y.ChildItem != null)
{
GridNestedViewItem nestedItem = y.ChildItem;
TextBox tb = (TextBox) nestedItem.FindControlRecursive(“tbPercentage”);
ProgressBar bar = (ProgressBar) y.FindControlRecursive(“bar”);
string x = tb.Text;
bar.Percentage = Convert.ToInt32(x);
}
}
}
[/csharp]

Wire up the item created event:

[csharp]
public static void grid_ItemCreated(object sender, GridItemEventArgs e)
{
var item = e.Item as GridDataItem;
if (item != null)
{
if (item.ChildItem != null)
{
GridNestedViewItem nestedItem = item.ChildItem;
TextBox tb = (TextBox) nestedItem.FindControlRecursive(“tbPercentage”);
ProgressBar bar = (ProgressBar) item.FindControlRecursive(“bar”);
string x = tb.Text;
bar.Percentage = Convert.ToInt32(x);
}
}
}
[/csharp]

Like I said depending on the technology you are using you might not need like half of those events.

Share

Free Web Part – Security Aware Silverlight SharePoint Web Part With Auditing

Just want the code? : http://securesilverlight.codeplex.com/

**Tested In SharePoint 2007 & SharePoint 2010**

While working at a new SharePoint client, one of the issues I was made aware of was that for new development Silverlight was being leveraged across both the legacy SharePoint 2007 and newly staged SharePoint 2010 instance for custom applications. While this wasn’t a strict standard to maintain the application in accordance with potential ongoing maintenance making use of Silverlight was the best approach.

The being said, I went off and delivered a series of applications that were built on Silverlight, hosting them in the pretty much default manner using the built-in SharePoint 2010 facilities. However, there are two huge, noticeable gaps with this:

1) There is no way to audit application invocation / what .XAP files were being used I think this is kind of a drag. It makes more sense to maintain a collated list of all the Silverlight files being invoked in a SharePoint environment, which would immediately require a new type of host that would provide such a holistic view into the Silverlight / SharePoint environment.

2) Security Configuration Being Internally Managed It seemed that while there were ways to tap directly into the SharePoint OM and inject resultant queries into Silverlight code, such a generic application didn’t lend itself well to an ad-hoc configuration basis. That sounds terrible. Since the container for users in the environment is well defined (i.e. relying on SharePoint to provide that through user profiles, user information list, etc.) this code can be super generic.

Expanding on the aforementioned concepts, it is easy to grasp some baseline requirements that must be present for the new Silverlight application host to be successful.

For Auditing –

1) When a new .XAP file is invoked through the host, this information must be sent to a retrievable medium that is easy to view and access. So a SPList object should be leveraged.

2) For matrix-based SharePoint taxonomies, the host must be a site collection-by-site collection basis since divisions while have different site collection administrators that are responsible for collating and analyzing the information. Rolling this information up can simply lean on baked-in CQWP features or a custom rollup.

3) The information collected should be:

a. .XAP invoked
b. SPWeb Title
c. Page (SPItem) Title
d. Full (Absolute) URL to the hosting page
e. Last Modified Date (if the WebPart is ever placed in edit more).

4) Auditing has to be dynamic in the sense that if the WebPart is modified, this event is recorded so that the information does not grow stale and unusable.

5) An email should be sent to a user specified in the host when a new file is invoked.

6) All required content placeholders should be generated automatically.

For Security –

1) Simply put, security settings on the corresponding audit entries should naturally flow to the Silverlight application so that a developer can easily read the past in roles. Since an SPListItem is a SecurableObject, it makes sense to just compartmentalize the permissions corresponding between Silverlight and the SPListItem.

2) Since permissions set on the SPListItem will translate to those read from the Siverlight application, an event receiver to do group membership checks for configured administrators should be implemented.

3) The roles and current user should be available as parameters to the Silverlight application.

The code is deployed as a regular good ol SharePoint Feature:

At first the site collection will have no lists:

Activate The Feature:

A WebPart Instances List Will Be Generated At The Root Of The Site Collection:

These columns will be provided by a specialized content type, while the default item content types is removed:

The Instance Content Type is programatically created by the feature (select for a larger image):

The event receiver to protect unauthorized changes is wired in the same method:

Each Of The Items Is Represented As A WebPartIntance Type:

Each Of these values is hydrated using save methods of SPListItem objects:

And at the end of the day, the parameters are sent to the developer to consume (select for a larger image):

That’s a pretty good overview of the holistic application architecture. From an interface perspective, the first thing the WebPart is going to execute before performing any auditing events is check whether proper properties have been set (select for a larger image):

This is simply indicating that a Silverlight container and corresponding have not yet been selected:

The files themselves are trimmed according to silverlight extensions (select for a larger image):

Once all the requisite properties are set, you will see your Silverlight files running:

Share