Guest
Welcome login
Share/Save
Share/Save
TIBCOmmunity
Home Communities
Conversations Resources Blog Posts

Blog Posts

Blog Posts: 48
Items per page
Statistics: Blogs: 9 Blog Posts: 48   1 2 Previous Next
0

General Interface Forums and Blogs have Moved

If you didn't already know, as part of the GI Open Source contribution to Dojo Foundation, General Interface forums and blogs are now hosted on www.generalinterface.org.

 

GI developers and contributors will continue the blogs and forums post on the new site.

 

You can access the new forums at General Interface Forums

 

The new blogs are at GI contributor blogs

 

Here's an RSS URL

 

Look for news on GI 3.8 releases, GI 3.9 features and latest on GI 4.0 on www.generalinterface.org.

 

This will be my last blog on TIBCommunity, but not the last blog for GI. So we look forward to seeing all developers on the new General Interface Forums

 

 

 

0 Comments Permalink
0

OSGi DevCon 2010 in OSGi

Posted by Tim Diekmann Dec 22, 2009

It is this time of the year again, when the call for submissions to EclipseCon and OSGiDevCon went out and were answered numerously.

 

OSGi DevCon 2010 will be again hosted together with EclipseCon 2010 in March in Santa Clara, CA. Register early to get a significant discount as alumni or OSGi Alliance member.

 

This time, I was honored to be asked to join the program committee of OSGi DevCon. Together with Andreas Kraft, Christer Larsson, Mike Francis, and Peter Kriens we went over all submissions to find a good balance and interesting program. We haven't finalized the program yet, but we are getting closer to a consensus about the allocation of the time we were given.

 

I must say I am impressed with the variety and quality of the proposed talks. If I had the chance, I would go to all of them. Unfortunately, we will need make some choices and disappoint a lot of potential speakers.

 

The final list will be published beginning of 2010, so stay tuned.

 

Tim.

 

0 Comments Permalink
0

ActiveSpace Browsers

Well, it has been a little while since my last post, and I think it is very much time to post some new information on ActiveSpace by introducing a new concept that is specific to ActiveSpaces and we believe extermely useful: the Space Browsers.

 

Space Browsers are a very simple to use yet very powerful feature of AS that allows programmers to implement the following architectural paradigms in order to create truly elastic distributed applications and services:

 

  • Iterating over a subset (view) of the entries stored in a Space

  • Continuous Queries

  • Using a Space as a distributed Queue

  • Grid computing paradigms such as Map/Reduce

 

Space Browsers (and Listeners) complement the Space’s basic put/get/take/lock methods (which require the user to provide a specific value for the key fields, and therefore operate on a single Space entry at a time) with the ability to ‘iterate’ through sets of entries for which the exact key field values are not known in advance.

 

A Space Browser is an object that can be seen as a sort of continuously updated iterator over entries stored in a Space. I say ‘sort of’ because, like an iterator, it has a ‘next()’ method which returns the next entry to ‘work’ on, but that’s where the similarities stop.

 

Browsing over a Space view

Let’s look at the first use case: iterating over a ‘view’ of the entries stored in a Space: when a Browser is created over a Space an optional filter string can be passed that will refine the set of entries being considered by the Browser.

 

In ActiveSpaces filters (which can be applied to both Browsers and Listerners) follow the SQL-92 syntax and implement many (but not yet all) of its clauses, put simply a filter is the part of a query that follows the ‘where’ statement in a ‘select * from Space where …’ query.

For example if a Space ‘customers’ contains Tuples that have an ‘Age’ field, browsing through all of the entries in the Space for people aged less than 30 years old is as simple as passing the string “Age < 30” as a filter when creating the Browser.

 

Continuous Queries

However unlike a query in a database that works only on a snapshot of the data contained in the database at a specific point in time, Space Browsers are continuously updated according to the changes in the Space being browsed and can be open-ended, effectively providing ‘Continous Query’ capability of the data contained in the Space. To that extend and unlike a more ‘traditional’ iterator object, the Browser objects do not have a ‘hasNext()’ method, but rather have a timeout value. That value is the amount of time the programmer is willing for the final ‘next()’ call to block for while waiting for something new of ‘next’ on.

 

Because of the low latency orientation of ActiveSpaces, a blocking 'next()' will unblock and return the newly inserted or updated Tuple in real-time as soon as the change happens, and that no matter how many Listeners or Browsers may be interested in that new Tuple.

 

Using a Space as a distributed Queue

This continuous real-time updating of the Browser also means that changes happening to the data in the space are automatically reflected on the list of entries about to be browsed as they happen: a Space Browser never gives the user outdated information!

 

For example, if an entry existed at the time the Browser was created, but this entry gets taken from the space before the Browser’s ‘next()’ method gets to it, then this entry will not be returned by the ‘next()’ method.

 

Also, unlike a traditional iterator that only allows its users to look at a series of data items, Space Browsers allows users to not only look but also operate on entries in an iterative manner. To that extend Browser have a ‘type’ that influence the type of operation applied to the entry when the Browser’s ‘next()’ method is invoked:

 

  • The GET Browser’s ‘next()’ method does a ‘get()’ on the next entry to browse (very much like a regular iterator).

  • The TAKE Browser ‘next()’ method however does a ‘take()’ on the next entry (that is, it atomically retrieves AND removes the next entry currently availbe to take from the space).

  • The LOCK Browser ‘next()’ method does a ‘lock()’ on the next entry to browse (that is, it atomically retrieves AND locks of the next entry currently available to lock in the Space).

 

Because of the fact that Browsers are continuously updated in real-time according to the changes in the unerdlying Space, TAKE and LOCK Browsers effectively (and very simply) allow 1-of-n ‘consumption’ of the entries stored in a Space. No matter how many TAKE Browsers may be created over a Space (even if those Browsers are created by many separate processes deployed on many separate physical hosts), what is taken from the Space by one Browser’s ‘next()’ method will NEVER be taken by another Browser’s ‘next()’ method, thereby allowing the programmer to use a Space like one would use a store-and-forward messaging Queue (for temporal and localization de-coupling, analoguous to the ‘master/worker’ pattern in Space-based architecture for example), except that in our case the Tuple ‘Queue’ being a Space, it can be distributed and scalled up as needed.

 

Writing elastic applications and services made easy

Creating a distributed service is therefore extremely easy to program using ActiveSpaces, clients simply put requests in a ‘request’ space, and servers simply create a TAKE (or LOCK) Browser on the Space, when ever a new request is put in that space by a client, it is automatically taken by one (and only one) of the servers for processing (and the reply Tuple can be put in a ‘reply’ Space), all the implementer of that service has to do is invoke ‘next()’.

 

The code below is a copy-and-paste of the part of the ActiveSpaces example server-side program that shows this feature, in this example the program waits for a request to be put in the 'request' space (by the client-side example program) and 'processes' it by adding a new field to the request tuple and putting this updated tuple into the 'reply' space. If there is no new requests to process after 500 milliseconds the program just prints out a status of the number of requests it has processed so far and goes back to waiting for more requests.

 

        // Create a Take Browser on the request space with a timeout of 500 milliseconds
        BrowserDef browserDef = BrowserDef.create().setTimeout(500);
        Browser takeBrowser = null;
        try {
            takeBrowser = metaspace.browse(space_req.getName(), BrowserType.TAKE, browserDef);
        } catch (ASException e) {
            System.out.print("Problem creating the take browser: " + e);
            return;
        }
 
        // the TakeBrowser allows the use of the 'request' space as a queue 
        Tuple tuple = null;
        SpaceEntry entry = null;
 
        do {
            // Try to take a tuple from the space
            try {
                entry = takeBrowser.next();
                // if next() returned an Entry, we successfully took/consumed the entry from the Space
                if (entry != null) {
                    tuple = entry.getTuple();
                    // add the replyer field to the tuple and put it into the reply space
                    tuple.put("replyer", selfmember);
                    space_resp.put(tuple);
                    served++;
                    if (served % 100 == 0) {
                        System.out.println("I have serviced " + served + " requests");
                    }
                } else // there is nothing to take: the next() timed out and returned null
                {
                    System.out.println("I have serviced " + served + " requests and I am waiting for more");
                }
            } catch (Exception e) {
                System.out.println("Exception in the take browser: " + e);
            }
        } while (true);

 

New server instances can be added (or removed) on the fly, without service interruption, thereby allowing ActiveSpaces users to create ‘write-once, deploy as many as you need’ elastic applications.

 

Subscription with 'Initial Values'

But that’s not all of what you can do with a Space Browser: Browsers (and Listeners) have two associated scopes that can further refine (than a filter) the set of entries being browsed.

 

The ‘time scope’ can be used to narrow down the period of time of interest:

 

  • 'SNAPSHOT' means that the browser starts with all the entries in the space at the time the browser is created (or initial values), but is not updated with new entries that are put into the space after that moment.

  • 'NEW' means that the browser starts empty, and is updated only with entries (or associated events) put into the space after the moment of the browser’s creation.

  • 'ALL' means that the browser starts with all the entries in the space, and is then seamlessly continuously updated with new entries as they are added into the Space. Readers familiar with pub/sub messaging systems will note that creating a Listener with a time scope of ‘ALL’ allows then to receive ‘initial values’ before they start receiving future publications.

 

Grid computing programming made easy

The other scope of Browsers and Listeners is the ‘distribution scope’ and it can be used to narrow down the set of entries according to their distribution over the Space's seeders:

 

  • ‘ALL’ means that all of the entries stored in the Space will be considered, regardless of where they are being seeded

  • ‘SEEDED’ means that only the entries assigned to the local metaspace member on which the Browser/Listener is created will be considered.

 

What may not be obvious right away is that the distribution scope of ‘SEEDED’ is the gateway to easy creation of grid-computing applications using (for example) a Map/Reduce pattern.

 

The Map/Reduce pattern can be described as follows: a very large data-set is divided in a set of Key/Value pairs (or in the case of ActiveSpaces in a set of Tuples) that are evenly distributed over a set of nodes (i.e. a Space’s seeders): this is the ‘mapping’ phase. Each node then processes the subset of the data that was assigned to it and puts the result of it’s processing (a smaller or equal set of Tuples) in another Space for the client to retrieve (or for another set of nodes to process): this is the ‘reduce’ phase. Most grid computing applications can be architected as a series of ‘Map’ and ‘Reduce’ phases.

 

This type of grid computing applications is very easy to create using ActiveSpaces: ‘mappers’ are simply nodes that join a ‘mapping’ Space as seeders each one creating on that space a Browser with a distribution scope of ‘SEEDED’ and just need to invoke ‘next()’ on that Browser: every time a new subset of the data is mapped to a specific node, that node’s ‘next()’ method will return with the new tuple to process. Alternatively a ‘control’ Space could be used to coordinate which mapping or reduce phase of the overall process is currently being executed if a more ‘batch’ rather than ‘event-driven’ type of processing is desired.

 

Conclusion

In conclusion, while I didn’t even describe completely all of the features of the Space Browsers and Listeners (for example the EventBrowsers), I hope I will have been able to show the power of the Browser concept and the various ways they can be used, and how they greatly simplify the work of the application programmer allowing them to very easily create elastic distributed/grid-enabled applications and services.

 

0 Comments Permalink
0

So, what's next in OSGi? in OSGi

Posted by Tim Diekmann Dec 6, 2009

With the release of the Enterprise Profile beginning of 2010, this is not the end of the EEG

 

Our agenda is full and in full steam. In the next meetings we will go further into the details of

  • Subsystems, or what is commonly referred to as 'applications'. After agreeing on the requirements we are now commencing the detailed design work

  • OSGi Bundle Repository (OBR). This relatively old spec is now being worked on again after we have agreed on the requirements and mandated the detailed design work

  • Namespace. The support for namespaces was left out of the Blueprint spec in R4.2 and will now be completed

  • Weaving. The support for byte code weaving is essential to many specs, but quite difficult to do right.

  • Web Container API. The current spec does not allow for programmatic web app creation yet.

  • Multiple Extenders. The more extenders we have in the system, the more their interaction needs to be coordinated or the system becomes unpredictable. We have agreed on the requirements and start detailed design work now.

  • Asynchronous Communication. The integration of JMS and other pub/sub, request-response, etc. technologies will be a major part of the next OSGi version

... and many more interesting technologies.

 

You may also be interested to learn that OSGi APIs are finally catching up with JAVA 1.5 constructs. Thanks to interesting compiler options like -jsr14 it becomes possible to use Generics in the API while still providing backward compatibility for the mobile users, who's APIs are limited to 1.4.

 

Stay tuned,

 

Tim.

0 Comments Permalink
0

Welcome to my OSGi Blog @ TIBCO.

 

If you are looking for TIBCO specific information about OSGi, then I have to disappoint you. This blog is meant for communicating Enterprise Export Group related information to the greater OSGi community. The EEG is open only to OSGi Alliance members and it is up to the group members and especially the chair-men to open up the communication and information flow.

 

You may have heard that my co-chair since the inception of the EEG in late 2006, Eric Newcomer, has moved on to new responsibilities, which unfortunately do not allow him to stay involved in the OSGi work. I am very grateful to Eric for his help and mentorship.

However, we are very happy to have found an excellent successor in David Bosschaert from Progress Software.

 

Ok, back to business.

 

For the last three years the Enterprise Expert Group has worked on integrating mostly J* specs with OSGi in a manner that makes it easy for JEE developers to run existing JEE applications in OSGi while at the same time with only minimal adjustments to the design to allow for making optional use of the unique OSGi capabilities. One example of this adaptation is JNDI. For the JNDI spec, we have come up with an elegant way of using JNDI capabilities through services, while at the same time allowing for existing hard wired application to run in OSGi in "traditional" mode. You may also read this as "classic" or "legacy" depending on where you stand on the JEE vs. OSGi debate. In a similar fashion we have worked out the integration of JPA. Others map easily and elegantly without a lot of complications, e.g. JTA and JDBC.

 

In addition, in the enterprise profile we introduce new capabilities to OSGi, which are not driven by JAVA specs, i.e. Remote Services and Remote Service Admin Service. These powerful concepts allow for scaling of OSGi services across JVM boundaries and open up a whole new set of designs and use cases.

 

What is the Enterprise Profile now?

Glad you asked. Let me start by saying what it is not:

 

It is not an all-or-nothing specification document that requires compliant implementations to support every service listed. As such there is no single TCK that can be run against an implementation to claim compliance.

 

Instead, the profile is a collection of services from the core, compendium, as well as new enterprise driven services, which will ultimately be part of the compendium itself. The Enterprise Profile is the first point of reference for enterprise developers looking for guidance in the vast amount of spec documents. The first question someone new to OSGi typically is driven by is

 

'What is relevant to me? Do you expect me to read the entire 400 pg. core spec plus the 800 pg. compendium stack before I can do anything useful with it?'.

 

The introduction chapter to the spec is trying to put the services in context with typical use cases that developers can follow and identify themselves with. The following chapters are literal copies of the relevant chapters from the core and compendium specs for easy reference.

 

When you download the current draft you will notice that the list of included services seems incomplete. Indeed it is. The final version will also include already published and final specifications like Configuration Admin Service and Blueprint.

 

Where can you find the public Enterprise Profile?

The public interim draft can be found at the public OSGi web site for download by everyone.

 

In the near future we plan to release the final version and make it available for the general public. We encourage the OSGi community to take advantage of it, try it out, and provide valuable feedback about what works and what does not.

 

Stay tuned for more updates of the EEG at this location.

 

Tim.

0 Comments Permalink
0

Steve Nunez (who usually works with multiple BREs) posted a comment in another vendor blog post including:

"I'd hardly call TIBCO's rete implementation 'enhanced' or to have 'full rule engine capabilities'"

 

Strong words! So lets list what enhancements BE has over "standard BREs" in the rule engine department:

1. event processing - in other words built in channel and event support. {Most BRE's have a single, invocation interface...}

2. event cache - in other words shared storage for events and concepts, and built-in object-backing store persistence. {Most BREs rely on J2EE to do this, or have the equivalent of DBConcepts}

3. multi-threaded Rete - see the latest BE3HF and will form part of BE4 {Most BREs don't yet have good explicit thread control}

4. concept history option

5. compile-to-bytecode architecture

 

But BE doesn't have a few things other BREs tend to have: built-in J2EE container support, for example (BE is a J2SE component and is its own platform, for performance reasons). BE also does not have the separation of "update an object versus working memory", whereby some BREs require you to explicitly call the engine to update the WM value of an object you update in an action. Except in the context that in BE you can define concepts in-memory (local only) vs cache (shared across engines), which is somewhat different .

 

What about "full rule engine capabilities"? BE's philosophy is certainly different to "interpreted" BREs in that the rule language is "simpler". If you want to do aggregations in a condition - well you shouldn't in BE, whereas other BREs allow that with commands like "accumulate". The basic Rete architecture - mapping declarations to tuples of all combinations of those declarations then applying filters and joins per the conditions - as described in standards like OMG PRR - are what BE concentrates on.

 

"It's often very fustrating to express conditions when you don't have expressions as basic as a 'not' or existential operators."

You can do "not" expressions on those filters and joins, but no quantified expressions (eg if at least one tuple, if n tuples, ...etc ), or array restrictions (eg declaration X in array Y.Z). So why these "restrictions" in rules?

 

Well, one answer to that is that usually, quantified expressions are about statistics or aggregations on your working data. This is precisely what you'd want a query language for - and what BE provides in BQL. So the term "at least n" or "sum of" are in fact business terms that warrant declarative declarations in their own right - for example, creating an event that can be referenced in a rule.

 

Of course, there are some rules and event patterns which may be easier in a rule, some in a query, some in a combination... and there is probably room for more language types to support CEP and features to allow these other languages to support rules better. (Customers and partners under NDA who have seen the BE roadmap will know what I am talking about here).

 

AFAIK, no BRE includes a separate "query language", although some come close, eg by allowing shared / common rule conditions.This does mean that developers used to a "everything goes in the rule" approach need to change view slightly when using BE, which also includes state models, timer rules, etc to support the CEP mission.

 

{Note that I am not claiming the BE rule language is not going to be extended in future, nor that some of the other BRE extensions would not be useful in BE!}

0 Comments Permalink
0

Here is a quick status update on the spec for TIBCO BusinessEvents 3.0:

- graphical models: concept, event (UML Class), state (UML State)

- graphical reports: project analyser/debugger

- event processing languages: rules language, BusinessEvents Query Language (BQL)

- event processing agent types: inference node, query node, cache node

- architectures: any combination of agents in any processing order

- event persistence: in-memory, cache (Coherance), checkpoint (BerkeleyDB), backing store (Oracle), any combination thereof

- rule engine capabilities: inference (Rete-type), defined statically (project-level code persistence), compiled to bytecode

- query language capabilities: static and continuous queries, defined dynamically (run-time code compilation)

- dashboard: provided through Syndera, RTView, GE / AJAX UIs

- business user interface: Decision Manager (for decision tables) BRMS

- business user interface workflow control: Rule Management System, customisable

- standard channels: EMS, RV, internal

- standard interfaces: DBMS (Oracle DBConcept), BW

- packaging: with and without state model / engine (Enterprise, Inference editions)

0 Comments Permalink
3

We have been very busy working over this summer on ActiveSpaces, so busy in fact that a new post is way overdue on this blog. Fortunately for you readers, being stuck in some random coach seat for well over 12 hours without net access (but with a spare battery ) means that I finally got around to write down some of my thoughts on Elasticity, fault-tolerance and maximizing infrastructure. Unfortunately there's lots to write about those subjects and I had more than one of those long flights to go through, so my apologies if this post is a bit lengthy.

 

Premise:

There is currently a lot of talk about 'cloud computing' and/or 'elastic computing', but what defines exactly elastic computing, and what does it do for you, why would you need it? And how does it all relate to ActiveSpaces?

 

Let me answer the most practical question first: why do you need your computing infrastructure to be elastic? The most important answer is very simple: to save money by optimizing your resource utilization, because 'idling' or 'stand-by' hardware and software (licenses) cost your enterprise money without being productive. Other reasons include the ability to maintain your SLAs in the face of extremely variable load conditions and of hardware and software faults.

 

One of the design goals of AS is to provide an infrastructure to be used for the creation and operation of 'Elastic' applications and services. And by 'elastic' I mean more than just 'distributed': and yes, there IS a distinction, which I will now try to explain. In order to understand the difference between those two terms let's first define them:

 

Distribution is the ability to divide a task into smaller sub-tasks that can be executed in parallel. It is what allows a distributed application or service to 'scale out': write the code once, and run it on as many machines as needed in order to achieve a target Service Level Agreement given a specific request load.

 

Elasticity, as it's name implies, when applied to an application or a service, describes the ability to to easily and seamlessly 'scale up' (add more resources in order to increase the overall processing power when needed) and 'scale down' (being able to 'switch off' some of those resources when the load on the overall system goes down and the system is over-provisioned). Obviously in order to be elastic, an application or service has to be distributed, but the reverse is not necessarily true!

 

The distinction between these two terms hinges on the keywords 'easily' and 'seamlessly': a distributed application or service is not elastic if it has to be brought down and reconfigured in order to take advantage of a new host or instance of itself, or in order to decrease the number of instances.

 

To take a practical example, compute clouds are elastic: they let you to add and remove machines, their associated OS and file-system images by simply invoking a web service. This means that clouds provide the elasticity of the hardware and of the platform, and can even fire up another instance of your application. However if your existing (or remaining) application or service instances have to be notified or configured in any way to be told to make use of (or stop using) this new instance, you do not have true elasticity of the software and therefore of your service.

 

So, why do you need to make your applications and services elastic? There are plenty of reasons, but as stated earlier for me the most important one is the following: the load generated by your business is almost never constant, it varies over time, and many studies have shown that in the increasingly digitized world we live in there is an ever increasing gap between your average load and you peak load. There are also plenty of material documenting the increasing impact a degradation of the performance of the service a business is providing has on the bottom line: customers are increasingly volatile, and the competition never more than a click away. Not meeting your SLAs to your customer means in some cases means they are entitled to a discount and will impact your revenue, and in some industries not meeting SLAs can even result in fines being imposed. There is even measurements by Google and Amazon suggesting that increases measured in milliseconds in the serving of a web page resulted in lower number of page views.

 

The traditional approach to this problem has been to size and provision the infrastructure for the peaks not for the average load: this is obviously an expensive proposition as it means that some (in some cases, most) of the infrastructure will most of the time just sit there idling, waisting electricity and costing money when the load is not at its peak.

 

The development of virtualization technologies and now of the cloud computing (and in the future the use of technologies like Complex Event Processing to anticipate and pro-actively prepare for the changes in the load) paradigm have been becoming increasingly popular because they allow the enterprises than know how to leverage them to save a lot of money by easily sizing up or down ('elasticizing') your hardware infrastructure as you need it optimize. However hardware and os virtualization only provide part of the overall solution: a service is composed of more than just the platform is runs on, the software that implements the service also need to be elastic in order to 'close the loop' and automate the re-sizing of the complete stack and to be able to react to expected or unexpected variations of the load.

 

ActiveSpace Elasticity:

As mentioned at the start of this post, ActiveSpaces is an in-memory data and messaging grid that allows application programmers to create elastic applications and services extremely easily. This is due not only to ActiveSpace's API and to the fact that the Space-based architecture is a natural match to distributed systems, but also to the fact that ActiveSpaces itself is elastic: nodes/applications/machines contributing storage and computing resources can be added and removed from the Metaspace (the cluster of nodes working together) on the fly, without requiring any change to a configuration file (as there are exactly zero configuration files!) or without needing to run a specific deployment manager application and without any service interruption.

 

Start with a single node, scale up by simply starting another instance of your application on any machine on the network, and back down according to your load and SLAs by simply stopping one of those instances, there is no need to do anything other than start and stop processes or new instances of your application on any node on the network.

 

How is this possible? Because ActiveSpaces is built using a true peer-to-peer distributed architecture. In order to really understand what this means allow me to explain a bit more how it works and how it compares to other kind of architectures typically used by other data-grids or distributed caches.

 

First let's define the problem that needs to be solved: since a Space is used to store data, in order to scale a Space over multiple machines a distribution mechanism has to be used to distribute the storage and management (what we call the 'seeding') of basic data elements (in our case, tuples (i.e. 'database rows')) as evenly as possible over the set of cluster members (that we call 'seeders'), this is also sometimes referred to as 'partitioning'. At the same time in order to be enterprise production quality the distribution mechanism has to be able to provide resilience to node failure (i.e. 'fault-tolerance' or the ability to survive the sudden loss of a machine without incurring the loss of any data stored in the Space).

 

Distribution:

ActiveSpace uses a proprietary group membership protocol and peer-to-peer 'distribution algorithm' that allows each member of a Space to quickly (and independently) find out which member of the Space (i.e. which 'seeder') is responsible for the storing of a particular tuple and to send the request directly to the appropriate seeder.

 

Compare this to more traditional techniques where the mapping of specific data item to specific cluster member nodes (the 'partitioning' of the data) is handled by a centralized server (i.e. a single member node of the cluster that takes over the role mapping lookup server role), requests to read or write data have to include either a 'lookup' operation with the server (and therefore a network round trip), or be redirected by that server node (which will sooner or later become a bottleneck to the performance and scalability of the overall system).

Another disadvantage of the techniques and algorithms used by other data-grid systems is that they typically require configuration files to be created listing the addresses of all the nodes potentially participating in the cluster, or the potential maximum and minimum number of partitions to be used. Those files not only have to be distributed to all the nodes, but they have to be kept in sync for the cluster to work properly (as an aside, I find it slightly ironic that some of the existing data-grid products that thrive to provide coherence of the data they store rely on the system administrator to provide coherency of their configuration files in order to work well). Another down-side being that a lot of those systems require you to bring the whole system down, update and re-distribute some configuration files before some changes (sometimes as simple as adding another node, or adjusting the number of partitions) can take effect.

 

Fault-tolerance:

Even more important than the ability to deal with peaks in the load without performance degradation, is the need to make the services fault-tolerant. A problem that has traditionally been solved by making the infrastructure redundant and deploying (and buying) everything twice in order to have an idling backup ready to take over in case the primary fails, what is called an 'active-passive' fault-tolerance architecture.

 

ActiveSpace Tuplespaces can be made tolerant to the sudden catastrophic failure of one of the nodes (seeders) in the cluster by specifying a 'degree of replication' for that Space: a degree of replication of one means that any single node can fail at any time without an data being lost, a degree of replication of two means that up to two nodes can fail at exactly the same time, and so on. ActiveSpaces uses the same peer-to-peer 'distribution algorithm' in order to provide fault-tolerance of the service it offers: the algorithm is not only able to determine which cluster member (seeder) is responsible for the original storage of the tuple, but at the same time it determines which node is responsible for the first degree of replication, which node is responsible for the second degree, etc…

 

Besides speed and scalability this algorithm has a couple of very important advantages:

- 'active-active' fault-tolerance: there are no standby 'cold', or even 'warm' nodes that do nothing but wait for a 'primary node' to fail.

- The replication itself is distributed: what is stored (seeded) by one node is uniformly and evenly replicated over all of the other nodes in the cluster. This not only makes degree of replication higher than one possible, it also means that after a sudden catastrophic node failure, the distribution of the tuples remains balanced.

 

Compare this to more traditional techniques where nodes responsible for the storage of data are deployed in fault-tolerant pairs, one node being the 'primary' node doing all the work for the partition of the data that has been assigned to it, and the other node being a standby 'backup' node that does nothing but use electricity and rack space until the primary node fails and in the worst case requiring the deployment of a usually very specific type of shared file system between the two nodes (worst-case because besides the extra complexity and price of a shared file-system the secondary node needs to read all of the data from that shared file system to come up providing for less than optimal fail-over time). Another disadvantage of the primary/secondary fault-tolerance architecture is that it can not provide a degree of replication higher than two: if both primary and secondary servers fail, not only is data being lost, but the given that some of those systems can not deal with all of the nodes assigned to a particular partition being down at the same time, the whole system will actually go down.

 

Conclusion:

ActiveSpaces provides true elasticity to your distributed applications and services. It is able to do this because it is thoroughly elastic itself: its true peer-to-peer architecture allows it to scale up and down on the fly without requiring any reconfiguration or user intervention other than starting another instance of an ActiveSpace-enabled process on the network. This peer-to-peer architecture and algorithms also means that fault-tolerance is 'active-active' and that none of the nodes participating in the nodes are idling unused as 'passive' backup servers, thereby optimizing the usage of your existing infrastructure, and saving money.

3 Comments Permalink
4

A couple of days ago I posted a comment to the general TIBCOmmunity regarding virtualization. However, I feel it was not the appropriate place to publish my observations on virtualization. I am including the text in this blog, because of the ramifications virtualization has on architectural decisions.

 

Virtualization: Hyper-V, VMware, and Xen

Over the past year I have been involved in several project that use VMware, and I have used Hyper-V on my own systems. I do not have any experience using Xen, so I will not go into detail about it.

 

Virtualization In General

While VMware, Xen, and Hyper-V offer the benefit of better hardware utilization and easier management, there is also a downside to using virtualization. Performance is the major drawback. Processing seed is reduced between 10% to 25% (VMware claims 15% reduction) , and I/O (mainly network) can be reduced by as much as 50%. All of the vendors have tuning guides, and you should follow the suggestions in these guides if you want to achieve the best performance possible.

 

All virtualization hosts require resources to manage the guest operating systems. If all of the CPUs are used by guest OSs and the host needs to do some processing it will swap out one of the guest OSs and take command of one of the CPUs. Once the host is finished processing the gust will return to normal. This delay is typically less than a second, but if you have latency sensitive operations in the guest OS you should make sure that there is at least one free CPU for use by the host OS. Also, I would reserve around 1GB of RAM for the host OS.

 

Programs that use a lot of disk I/O like large databases, and programs that require very low latency should not be put on virtualized guest OSs. I also would advise not putting EMS or RVRD on a virtual machine. With EMS I have seen as much as 75% decrease in performance running on VMware ESX 3.5 Update 3.

 

Microsoft Hyper-V

Hyper-V supports a very broad set of hardware. Just about any system with 4GB or RAM and a CPU that supports Intel VT or AMD-V will work. The performance of Window Server 2003 R2, and Windows Server 2008 guest OSs are excellent. I have found that once everything was tuned the CPU reduction was between 10% and 15%, and the network performance was only reduced 10%.

 

In Windows Server 2008 the management applications are not very good, but that should improve in Windows Server 2008 R2. However, it still has a long way to go before it will have the feature list of VMware.

 

Although Microsoft claims to support Windows Server 2000, Windows XP, and SUSE Linux Enterprise Server 10 SP1/SP2, the support for these OSs are pretty poor, and I would suggest not running them on Hyper-V.

 

VMware ESX

VMware ESX is by far the most popular virtualization host. It also offers the most management features. VMware ESX requires an exact set of hardware to work. The complete list is on the VMware’s web site, but must hardware vendors will offer servers that are specifically designed to work with VMware ESX. ESX 3.5 and ESX 4.0 offer good guest CPU and network performance. I have seen and reduction of 15% to 20% in CPU performance and a reduction of 15% to 20% in network performance.

 

Version before ESX 3.5 Update 2 did not have good network performance. With ESX 3.0.2 I experienced an I/O reduction of more than 60%. I highly advise running TIBCO applications only on ESX version 3.5 Update 2 and above. The new ESX 4.0 promises many performance improvements, but I have not run any test on it yet. We will have more information in November after TIBCO India completes their performance tests on ESX 4.0.

 

VMware ESX supports a large number of guest OSs, With Windows Server and Linux being the most common. However, Red Hat Enterprise Linux version earlier than 4.7 and 5.2 have a interrupt timing issue with ESX, and should be avoided. Even with RHEL 4.7, 5.2, and greater you have to put divider=10 as a boot parameter in GRUB to alleviate this timing issue. Please follow the instructions in the VMware guide “Installing and Configuring Linux Guest Operating Systems”. You can find it on the VMware support web site. Although VMware publicly says this is just an issue with the machine time, it actually causes problems with I/O interrupts drastically reducing performance. Therefore, do not run RHEL guests unless you have the divider=10 in the GRUB.

 

The new VMware vShpere (ESX 4.0) suite offers many new exciting features like active fault-tolerance and site recovery manager to name a few. However, these features have numerous limitations and you need to look at the fine print. For example, the new active fault-tolerance feature will only work on guest OSs that use one CPU, and the site recovery manager requires special hardware.

 

Conclusion

Virtualization is great of management and hardware utilization, but it has its limitations. Make sure you know these limitations when architecting a solution, and beware of the performance and latency implications.

4 Comments Permalink
0

I had this in the draft for a while.. It is actually no longer relavant in 3.7.1. However, I think it may be relavant in a different context of how to create your own custom log handler. So I'm post this now..

 

While GI always had its own log monitor, it is still useful to be able to log to Firebug which is the single most useful development tool for web devlopers. This is a new log handle introduced in GI 3.7.1, however, what if you're not using 3.7.1? Well the code will still work previous version of GI

 

It is important that this class be loaded at the very beginning, so you want to add this to the JSX/js/fx/jsx.js file

 

/**
 * Handles a logging record by sending it to the Firebug console.
 */
jsx3.Class.defineClass('jsx3.util.ConsoleHandler', jsx3.util.Logger.FormatHandler,  nul l,
    function(ConsoleHandler, ConsoleHandler_prototype) {
 
  // maps logger levels to console method names
  var methods = [nul l, "error", "error", "warn", "info", "debug", "debug"];
 
  ConsoleHandler_prototype.handle = function(objRecord) {
    if (window.console) {
      var method = methods[objRecord.getLevel()];
      if (method) {
        try {
          console[method](this.format(objRecord));
        } catch (e) {}
      }
    }
  };
 
});

 

 

Logger.xml

 


  <!-- Logs messages to the Firebug console, when available. -->
  <handler name="console" class="jsx3.util.ConsoleHandler"/>

 <!-- The global logger. -->
  <logger name="global" level="INFO">
    <handler-ref name="memory"/>
    <handler-ref name="console"/>
    <handler-ref name="ide"/>
    <handler-ref name="fatal"/>
    <!--<handler-ref name="appMonitor1"/>-->
  </logger>

 

0 Comments Permalink
1

I decided to create this blog because it's an easy way to share my thoughts with the TIBCO community. I know the title is a bit strange, "Service Oriented Architecture Architecture", but I wanted to emphasize this blog is about architecture and not technical details of SOA implementation or product information. Of course you have to know the capabilities of the various products to create a successful architecture, so I will mention products in this blog, but I will only focus on the way they affect architectural decisions.

 

Regards,

 

A. Kevin Bailey

Enterprise Architect

CTS-EMEA-ASG

1 Comments Permalink
0

To disable edit masks for the entire row in a Matrix - Grid, set event property "Before Edit" with following code fragment (follwing sample disables the non-always on edit mask ,such as menu and select/combo.

 

Always on edit mask, such as checkbox and button, are disabled by the jsxdisabled="1" in the record row. E.g.

]]>

 

 


if (this.getRecord(strRECORDID).jsxdisabled == 1) false;

 

To disable Non-always-on edit mask of an entire column in a Matrix - Grid, set event property "Before Edit" (Following code disables the "comboColumn" by evaluating to false in "Before Edit" event handler).

NOTE

These sample code fragment goes into the event handler it self, but the code fragment is not part of a function, so should not use return statement. It should simply evaluate to true or false.


if (objCOLUMN.getName() == "comboColumn") false; else {jsx3.log('EVENT: (jsxbeforeedit). Record: ' + strRECORDID); }

 

Follow similar logic to disable edit mask of a cell based on different factors such as the value of the another column. In "Befor Edit" event property, this code


if (this.getRecord(strRECORDID).status == "Deployed" && objCOLUMN.getName() == "selectMachine" ) false;

 

will disable the "selectMachine" cell (column) if status cell (column) has the value "Deployed".

 

Update

I realized that this blog post was not clear enough regarding how different Edit Mask are disabled. First there are two types of edit masks in Matrix (editable grid Matrix control).

 

The first type is the "always-on" edit mask such as : button, checkbox, radio button, etc. An always-on edit mask is always displayed without user action.

 

The second type is the "non-always-on" edit mask such as : textbox, select, datepicker, etc. These editmask are display only when user focus on the cell.

 

0 Comments Permalink
4

The simplest way I can explain ActiveSpaces is with this single sentence:

 

  • ActiveSpaces is a distributed middleware that offers the functionality of a database and of a messaging system in a single interface.

 

In essence, ActiveSpaces is what you get when you Mashup a database and a messaging system together. Of course, a 'one-liners' like this may sound like a bold claim, and I certainly won't claim that it implements every single feature offered by any of the existing database and messaging systems, but read on and I hope to be able to explain that it implements the features most applications need most of the time.

 

 

Databases are good at storing or looking up data, and using stored procedures you can even validate or eventually transform the data in an event-driven manner as updates happen, but you are ultimately limited by the fact that the database server is a non-distributed shared resource that is expensive to scale. And because client applications can not be proactively notified of changes in the data they are interested in by the server it is very difficult or expensive to create elastic distributed event driven applications using only a database (even in association with a cache).

 

Messaging systems are very good at distributing data and events through publish/subscribe and therefore greatly simplify the creation of scalable distributed applications, but publish/subscribe can induce unwanted temporal coupling because the receiving application has to be on-line and subscribing at the time a message is published in order to receive it. Message queues and guaranteed messaging can be used to avoid this problem and provide the temporal independence that you naturally get from a database by 'buffering' data, but only temporarily: messages are forgotten as soon as they are consumed. Ultimately, a messaging system is a store-and-forward 'data pump' designed to distribute data, not hold it as a system of record for later perusal.

 

So what happens is that in order to achieve a scalable architecture those that can afford it (or have no other choice) use both a database and a messaging system at the same time. But even then, besides the potential inefficiencies and operational complexity, there is a lot of development work to be done to deal with the impedance match between the two worlds: for example coordinating data models or translating between the data formats, or dealing with the 'iterator driven' versus 'callback driven' orientation of each interface (not to mention the synchronization of the transition between the results of a query and the reception of update messages).

 

ActiveSpaces offers all of those features and none of the headaches because everything is integrated in a single easy to use interface:

 

  • Similarly to a database you can put, get and even take (atomic get and remove) rows. You can either get a single row back by getting a tuple by it's key field values, or use a SpaceBrowser to view a filtered subset of a space.

 

  • Like with a messaging system, you can be notified of changes in the data proactively and immediately using Listeners.

 

But the Mashup does not stop here...

 

 

  • Tuples are self-describing and platform independent map of fields, just like messages.

 

  • Unlike database queries, SpaceBrowsers are not just static 'snapshots' of the data, they are continuously updated according to the changes in the Space, as those changes happen.

 

  • Unlike when subscribing with most messaging systems you can request to get 'initial values' and specifying a filter query when creating a Listener.

 

  • SpaceBrowsers can also be used to monitor events through an iterative rather than callback driven interface

 

  • Concurrent modification of the data can be controlled using either 'Compare and Set' operations or locking or even transactions (optimistic or pessimistic control).

 

  • And of course, let's not forget that ActiveSpaces itself is an embeddable peer-to-peer distributed system...

 

 

There's of course a few other interesting 'details' that I will expand on in future posts, and remember that I am only describing version 1.0 of ActiveSpaces ;). But the important message that I hope to have conveyed here is that picking the most useful features of database and messaging systems in order to create a single 'best of both worlds' interface is the underlying theme of ActiveSpace's feature set, and the key to distributing (and therefore elastically scaling) enterprise applications.

 

4 Comments Permalink
4

One of the first things I want to address on the subject of datagrids is a mistake that I have heard way too many people make: a distributed cache is NOT a Datagrid!

 

Many people use the two terms interchangeably because I believe they focus only on the 'distributed' part which both types of systems have in common but doing so, they totally forget about the implications of the 'cache' part:

 

A cache can not be used as a System Of Record.

 

One of the properties of a cache is that it can evict entries that have been previously put in it, in order to make room for newer entries. And when a cache evicts an entry, it does it quietly and without telling any of it's clients about it. This means that you can not 'trust your data' to a cache as it could disappear from it at any time, but rather you have to use it in a 'cache-aside' architecture to cache a proper System Of Record. Querying a cache does not give you an authoritative answer like a System Of Record would: if there is nothing in the cache that matches your query you do not know if that is because matching data was never put in it, or because there was something but it was evicted and you therefore need to perform the same query again in the System Of Record (thereby negating the performance advantage of using a cache) to get it.

 

ActiveSpaces however can be used as a System Of Record because it will not evict entries from the Spaces, even if this means that a new call to insert data into a Space can fail if there is not enough memory currently available in the cluster to store a new tuple in the Space. Fortunately, ActiveSpaces makes it very easy to increase the amount of memory available to a Space: just launch another instance of your application or an agent process, no reconfiguration needed, no down-time required.

4 Comments Permalink
8

Hello and welcome to the ActiveSpaces blog!

 

ActiveSpaces is TIBCO's upcoming Data and Messaging Grid product. Technically ActiveSpaces is a distributed in-memory implementation of the Tuplespace concepts.

 

Hiding beyond this mouthful of technical terms, ActiveSpaces is a fundamental part of the infrastructure that will enable what is described by TIBCO's CEO as the Enterprise 3.0.

 

A Tuplespace (typically simply referred to as a "Space") can be seen as a form of distributed shared memory: an entity in which data (expressed as Tuples (i.e. 'database rows')) can be concurrently access by multiple processes. Because the data is stored in memory, storage and retrieval of the Tuples is faster than when using a disk-based system. And because it is distributed, it scales according to the number of participants.

 

ActiveSpaces is a middleware that greatly simplifies the job of Enterprise application developers, providing them with an easy to use interface for data storage and retrieval (Data Grid) and process coordination (Messaging Grid) and allowing them to concentrate on implementing the business logic. Using "Space Based Architecture" (SBA), developers can very easily create distributed, event-driven and scalable (i.e. "Elastic") applications.

8 Comments Permalink
0

Some of the FAQ that user have on XML resource are: Is there a build in way of doing asynchronous loading and caching of XML document? , How do I fetch xml document into the application cache asynchronously ? and How can I make sure that what I load myself will be used by GI instead loading again from the web server?

 

 

Well, quick answer is : Yes, use

jsx3.app.Cache.getOrOpenAsync(strURL) 

 

 

Asynchronous Loading
  • Cache documents can be loaded asychronously with the getOrOpenAsync() method. This method returns the corresponding document synchronously if it already exists in the cache. If the document does not exist in the cache, then it is loaded asynchronously and the method returns a placeholder document. The namespace URI of this placeholder document is Cache.XSDNS and its root node name is "loading".

 

Method getOrOpenAsync(strURL, strId, objClass) Asynchronously loads an xml document and stores it in this cache.
Parameters:
  • strURL {String | jsx3.net.URI} – url (relative or absolute) the URI of the document to open.

  • strId – the id under which to store the document. If this parameter is not provided, thestrURL parameter is used as the id.

  • objClass {jsx3.lang.Class} – jsx3.xml.Document (default value) or one of its subclasses. The class with which to instantiate the new document instance.

Returns:

{jsx3.xml.Document} – the document retrieved from the cache or a placeholder document if the document is in the process of loading asynchronously.

Since:

3.5

0 Comments 0 References Permalink
0

On GI Performance Tuning

 

Performance is a big topic. A while ago I saw a blog on GI performance turning, see Sunil's blog, , which hits on some basic point of AJAX application optimization. The GI documentation also devotes two entire Chapters on this topic (Optimizing Application Performance and Optimizing Load Performance ). There's also a video tutorial on this Video 6: Optimize Performance. So, as you can see this is an important topic and a frequently asked question.

 

Basically there are 3 major type of performance issues that concerns GI application

  1. 1 Resource loading performance

  2. 2 HTML rendering time performance

  3. 3 Data parsing and handling

 

For the first type of issue, the answer in a nut shell is "asynchronous, asynchronous, asynchronous". However this very AJAX answer is not the whole picture.

 

 

Make AJAX Cacheable.

One of the cited benefits of Ajax is that it provides instantaneous feedback to the user because it requests information asynchronously from the backend web server. However, using Ajax is no guarantee that the user won't be twiddling his thumbs waiting for those asynchronous JavaScript and XML responses to return. In many applications, whether or not the user is kept waiting depends on how Ajax is used. For example, in a web-based email client the user will be kept waiting for the results of an Ajax request to find all the email messages that match their search criteria. It's important to remember that "asynchronous" does not imply "instantaneous".

 

 

Before GI 3.6, XML resources on Internet Explorer are loaded by GI using native MSXML3 Document ActiveX object's load method, which is not same as XMLHTTPRequest object. From version GI 3.3 to 3.5, GI forces the use of cache XML when a cache copy is present and regardless of the HTTP cache control metadata( Understanding IE Caching and GI 3.3-3.5. ) This was done as a workaround for an IE6 defect. From GI 3.6 and later, GI uses the XMLHTTPRequest to load XML resource and thus subject to the same caching rules.

 

What is not known to some developer is that resouces loaded over HTTP are not cached by the browser if it is not properly configured, expiration time and HTTP cache control are key to the use of browser cache.

 

What is often forgotten is that regarless of whether your application is AJAX enabled or not, it is in the end still a web-based application. This means that the standard HTML page optimization techniques still applies. These are things like (as found by Yahoo performance team, these are my top 4):

  1. 1 Add Expires header (and or HTTP Cache control header)

  2. 2 Gzip components

  3. 3 Minify Javascript

  4. 4 Configure ETags

 

See the full list at Yahoo performance rules, and the Special Rule for AJAX Make AJAX Cacheable.

 

As for the last type of issue on Data handling, what is often forgotten by AJAX developers is that the browser (especially older browser like IE6) was never designed to run a full fledge application or handle hundreds of megs of data. So developer should remember to keep the heavy lifting on the server and allow the the client GI application to fetch only the neccessary data when it's needed.

 

Using hide / show, (setting "visibility")

 

One of the optimization technique I've seen for HTML rendering is to use the "Visibility" property. What the developer should know about this technique is that GI has a dual DOM architecture. This means that GI is architected to use a secondary abstraction DOM used to model and keep track of GI objects. So making the object "hidden" does not remove it from the GI DOM model. On top of that, while the HTML is not visibly rendered, they are still present in the HTML DOM, which means that any DOM operation on the element will still be affected. In short, this technique should not be applied blindly everywhere. A good example is the the Tab UI control which employs this technique to hide/show the tab panes. A bad example is where the application load every canvas in an application and hides them, regardless of whether the compnents/canvas will ever be shown.

 

TBD : how application layout and flow design can affect performance, good and bad.

0 Comments Permalink
0

Does AMP make application harder to maintain? Is it worth re-implementing an existing application using AMP? When do you decide you need AMP as oppose to simple classes and packages?

 

Thiese were some of the questions and doubts that comes up during discussions on AMP. However, using AMP is really not an either or choice. You can keep using classes and packages. What you need to be aware of are the new programming facilities, the jsx3.$ functions. Especially the Asynchronous Programming Utilities

 

In Short, Why use AMP? Well ..

 

  • > An application's main definition XML in an AMP application can be made up of several source code files that are developped separately and then assembled together. Saving time since it is not necessary to recompose the complete application, when making a single change, but only the file that contains the change.

 

  • > There is a difference between complexity and maintainability. Making the assumption that the complexity of the underlying framework will lead to higher cost in maintenance is too simplistic.

 

  • > In the old way, coordinating the integration of a large complex application becomes a major task when everything you do may affect someone else.

 

  • Builder and AMP integration :

    1. 1. Creating AMP based application is a distributed process by nature. AMP based application are best suited for a large scale development with large number of team members. The fact that you cannot see the overall application when you work on one module should not affect the developer since he will be focused only on his module.

    2. 2. When developing using AMP, you can continue to develop GUI prototypes with Builder, which is essentially what the visual environment is good at.

 

  • > An investment in time and resource must be made to convert an application to AMP based design. There is definitely effort needed to design the proper extension point abstractions.

    1. 1. However, when the conversion work is done, the application becomes much easier to add functionality to and maintain than it would ever be using a different architectural design

    2. 2. In the case of GI builder, we're now able to disable or add new functionality into Builder without fear of inadvertently breaking the other functionalities within GI Builder.

    3. 3. The performance improvement for GI Builder over HTTP is probably at least double of what it was before.

 

  • > The architectural constraints that AMP imposes actually makes code easier to maintain and less brittle. For example, interactions between plug-ins are well defined and limited in AMP, which encourages loosely coupled application components. When using AMP correctly, spaghetti code is must less likely to occur and would never span plug-ins, greatly reducing developer burden in maintaining not just their own code but also those of others.

 

  • > Performance improvement using AMP architecture comes from

    1. 1. Forcing good design and coding practice in a asychronous environment.

    2. 2. Defining publish / subscribe interface that allow one to many communications and fully loosely coupled module

    3. 3. Allowing feature/extension based load (plug-in) and play, which can lead to smaller run-time application size.

 

  • > The well defined modular interface in AMP means that what was not possible before can now be done, such as : integrating the application without some of it parts, adding or removing parts and running a partially complete application.

0 Comments 0 References Permalink
0

Here's a quick announcement that might be of interest to those of you reading our blog.

 

We have recently been informed that our most favorite CEP product, TIBCO BusinessEvents, has been nominated, and by virtue of independent judging and votes from the public, has now made it to the Finals of the American Business Awards aka The Stevies.

 

So if, like me, you have a strong affinity for BE, or would like to see any CEP product gain more positive non-industry exposure, you ought to head over to cast your vote at:

http://peopleschoice.stevieawards.com/default.cfm

 

The category is for - New Product or Service of the Year - Computer Software, New Version: TIBCO CEP BusinessEvents 3.0

 

Final judging begins today through June 1st. I'm told that the race in these categories is tight and every vote counts.

 

The ABA plans to publicly announce the winners on Tuesday, June 9. The winners will be invited to attend the 7th annual American Business Awards banquet in New York on Monday, June 22 to accept their special People's Choice trophy(s).

 

We will keep you posted on any developments.

0 Comments 0 References Permalink
1

Let’s think about how utilities, such as electricity, are viewed by the modern world. It’s simple from the user perspective, when you need your light bulb to shine, you plug it into a socket and things magically work behind the scenes. You can guarantee your light bulb will shine when you turn on that switch (quality of service and high availability), you don’t really need to know where the power comes from (location transparency), you don’t need to know if the source of the power was generated at a different wattage (transport transparency) and you don’t care if the source of the power was wind energy or hydro or something else (implementation transparency).

 

ActiveMatrix has a secret sauce we call ActiveMatrix Foundation that gives you something similar for services – this is a grid based service virtualization platform, with baked-in governance, that delivers on something similar for services. When you plug into a service hosted on the Foundation, it is guaranteed to deliver. ActiveMatrix Foundation is not a standalone product, it is a core infrastructure component shared across products. This is the secret sauce. When you see ActiveMatrix as a brand name associated with a product in our SOA stack, it means you can leverage this platform under the covers.

 

What is Service Virtualization?

You can think of it as composed of the following:

1.Location transparency: Example, when a producer hosts a service on port 80 for a while and then decides to host the service on a different port 90 - the consumer need not be informed of the change and has the routing to the right port happen automatically under the covers.

2.Transport transparency: Example, say a producer speaks SOAP/HTTP and after a while decides to speak XML/JMS, if the consumer doesn’t need to be informed of the change and automatically the translation happens to the protocol the consumer understands, irrespective of what the producer uses.

3.Development transparency: Example, If you are a Java developer and I’m a .net developer and both our applications can be service enabled in the same way without writing specific wrapper code based on whether we use Java or .net

4.Administration and Deployment transparency: Example, whether the service is built using Java or .net, if you can deploy and manage these services in the exact same way, that would be admin and dev transparency.

In addition, the grid based architecture provides high availability and scalability very seamlessly. With just clicks of the mouse you can set up a highly resilient infrastructure.

 

So what are the products in the TIBCO SOA stack that can leverage this secret sauce?

Services Infrastructure:

a.ActiveMatrix BusinessWorks (SOA Backplane)

b.ActiveMatrix Service Bus (Services Switch)

c.ActiveMatrix Service Grid (Application Platform)

d.Several adapters

 

Governance:

e.ActiveMatrix Lifecycle Management (Design time Governance)

f.ActiveMatrix Policy Manager (Runtime/Operational Governance)

g.Service Performance Manager (Runtime/Operational governance: SLA management/provision for a “self healing” infrastructure)

 

We’ll look at the audiences for some of these products and how each of these can help you in your IT organization in the next few posts.

1 Comments Permalink
0

In simple terms, Business Process Management is the capacity to completely manage the end to end lifecycle of the business process. The intent of BPM is to identify core business processes in an organization, automate them with efficient integration to the underlying systems and people and then maximize the process for efficiency. When the most important business processes in an organization are executing at peak capacity, the organization is bound to succeed. BPM has the power to spell the difference between success and doom for an organization.

 

This popular diagram below efficiently summarizes what components exist in end to end BPM:

 

bpm_e2e.JPG

 

It’s worthwhile considering the user persona while looking at each of the blocks in this diagram, just to understand the user needs when you consider a BPM offering.

 

Modeling and Simulation (includes Rules Design),

Persona: Business Analyst (TIBCO Business Studio):

Previous to BPM, a business process could very well lie as an undocumented artifact in minds of a few experts within the organization. It may trickle down through power point presentations, spreadsheets and word documents. However, the need to manage this business process results in a need to extract the process from all these resources and model it visually and document it in a single location.

 

The user who designs the business process is typically a business analyst – a persona who doesn’t want to get bogged down by technical details and just wants to model the process at a very high level. The user probably wants to simulate the process as well to identify bottlenecks and figure resource allocation before execution. Rules need to be designed as well in addition to the process and it is imperative that the set up be such that the rules are decoupled from the business process, as the two need to change independent of each other.

 

There are other requirements such as reporting for easy back and forth between the business user and the rest of the players, revision control as the process. Also the capacity to import business processes from third party modeling environments. Lastly, this business process needs to be handed off easily to a process developer for implementation with ease and no loss of information during the transfer.

 

Implementation

Persona: Process Developer (TIBCO Business Studio):

The Process Developer wants to pick up the business process designed in consortium with the business user and implement details. A process developer is a technical person who wants to get the business process ready for execution. For example, he may want to hook up a service step to a webservice call out or to a database, build out forms for user interaction steps, etc. A good point to note is the importance of decoupling the SOA layer from the BPM layer at this point so the two can change independent of each other.

 

Execution

Persona: Op/Admin (TIBCO iProcess Engine):

Once the process is ready for execution, the op/admin takes over in terms of ongoing operational management of the process. Levels of scale in terms of number of users being logged on simultaneously, number of transactions, capacity to set up the engine for high availability, scalability are all typical requirements for consideration. Other important considerations include the capacity to get visibility at the system process level to get an idea of health of the execution, capacity to pause and resume, upgrade the business process to newer version numbers without interrupting execution. Lastly, the ease with which you can design–implement–test, as you’ll need to execute that implementation lifecycle many times every time before you go into production.

 

Business Activity Monitoring

Persona: Business Manager (TIBCO iProcess Insight):

The Business Manager is the person who is accountable for the business process. He needs to get his hands on metrics that prove to him how his process is performing on a day to day basis and helps him identify the bottlenecks in the process. Ease and accuracy of reporting, report design and customization, drill down capability to various resources in the process are all critical requirements for this stage.

 

Optimization

Persona: Business Analyst (TIBCO iProcess Analytics):

One of the primary purposes of BPM is the need to improve the efficiency of the business process by identifying bottlenecks. For this purpose, the business analyst needs to be able to observe long term trends and drill down into various aspects of the business process to identify bottlenecks. In addition, the suite needs to have the capacity to “round trip” or feed back information from the trend analysis back into the process model for redesign to maximize for efficiency.

 

This white paper leads you into a more in-depth discussion on the various aspects of BPM: Guide through the BPM Maze

0 Comments 0 References Permalink
3

This is a situaion that comes up often in portal deployment where multiple GI application could be loaded at the same time. GI provides a deployment configuration that allows you to run multiple instance of the same application.

 

jsxappns Application namespace. For example, jsxappns="myAPP". Since every application deployed on a single page must have a unique namespace, overriding the namespace can be useful when an application is multi-instantiated on the same page. However, the application must be written to never reference its namespace directly.

 

This configuration is set at the launch script tag for GI. you can find more information here Deployment Parameters

 

However, the developer often times build into their application code direct reference to the server name, since that is the easy way.

 

So, for an application to be runnable in a multi-instance deployment, the developer must take care not to use a static application server reference.

 

For example, you should design the code to be flexible by specifying the app server as a parameter to methods that requires it.

 

Here's a theme loader method

 Service.loadTheme = function(objGUI, server)  {
    server.loadInclude(server.resolveURI("jss/mydyna.xml?"+new Date().getTime()),  "mydyna_xml", "jss"); 
    server.getBodyBlock().repaint()
 }

 

Now how do you get the server instance without refering to a static name? If the method is invoked thought a GUI object interaction the answer is there. Each GUI object are initialized in the application server context it was started from, so it can invoke objGUI.getServer() instead of doing a static name reference.

 

Service.loadTheme2 = function(objButton) {
   var server =   objButton.getServer(); 
   server.loadInclude(server.resolveURI("jss/mydyna2.xml?"+new Date().getTime()), mydyna_xml", "jss"); 
   server.getBodyBlock().repaint();
 }

 

What if the method is not invoked through GUI interaction? The server instance can be obtained during execution of

  • - Project "onload" execution and accessible through this pointer (e.g. myOnLoadFunction(this);

  • - During deserialization of the app canvas, the onAfterDeserialized is passed the top GUI object as objJSX.

 

So you can use either place to initialize

 


<serialization xmlns="urn:tibco.com/v3.0" jsxversion="3.7">
  <name/>
  <icon/>
  <description/>
  <onBeforeDeserialize/>
  <onAfterDeserialize>eg.service.setServer( objJSX.getNS(), objJSX.getServer();</onAfterDeserialize>
</serialization>
jsx3.lang.Package.definePackage(
  "eg.service",                //the full name of the package to create
  function(service) {          //name the argument of this function
    service.APP = {}; // application server instance
    
    service.setServer = function(name, server) {
     service.APP[name] = server;    
    }
 
    service.getServer = function(name) {
      return service.APP[name];
    }
 
 Service.loadTheme1 = function(objButton) {
   var server =   service.getServer(objButton.getNS());
   server.loadInclude(server.resolveURI("jss/mydyna.xml?"+new Date().getTime()), "mydyna_xml", "jss"); 
   server.getBodyBlock().repaint();
 }
 
Service.loadTheme2 = function(objButton) {
   var server =   objButton.getServer(); 
   server.loadInclude(server.resolveURI("jss/mydyna2.xml?"+new Date().getTime()), mydyna_xml", "jss"); 
   server.getBodyBlock().repaint();
 }
});

 

3 Comments Permalink
0

Object-Oriented Programming in JavaScript: Packages in TIBCO General Interface

 

 

The article, “ Object-Oriented Programming in JavaScript with TIBCO General Interface,” is an overview of the primary object-oriented constructs provided in TIBCO® General Interface™. In this blog post and several others to follow, a more detailed examination of other object-oriented constructs that TIBCO offers. The first object-oriented concept addressed is one sorely lacking in the JavaScript language but provided in TIBCO General Interface: packages.

 

A package, or namespace, is the construct that object-oriented languages use to organize related classes into a common group. Packages promote good code organization and prevent accidental name collisions by providing uniqueness to class names.

 

TIBCO General Interface goes one step further than other object-oriented frameworks in providing the ability to declare the package with code-defining methods and attributes relating to it.

 

In TIBCO General Interface, a package can be identified using the dot-separated reverse domain name convention; Unlike Java, it does not however need to be associated with a directory in the file system with the same name. GI framework does make use of package and defines them in a file named Package.js (like jsx3/lang/Package.js and jsx3/util/package.js), however this is an abitrary code organization choice and not a requirement.

The WSDL Mapping 2 sample shows code in a package named eg.WSDL2, which holds all static methods for the sample.

 

The Package class provides an introspectable API for JavaScript/JSX packages. It also provides a way of defining new packages.

An instance of this class may be obtained in one of the following ways (this class may not be instantiated directly):

 

  • >> jsx3.lang.jsxpackage

  • >> jsx3.Package.forName('jsx3.lang')

 

In this example, the JavaScript object jsx3.lang is known as the package "namespace," which is a plain JavaScript object and is analogous to the constructor property of a jsx3.Class.

The following is an example of how to define a new package called eg.tests:

 

jsx3.lang.Package.definePackage(  "eg.tests",   // the full name of the package to create  
function(tests) {                  // name the argument of this function "eg"
    // define a static method like this:
    tests.staticMethod = function() {      ...    };
    // define a static field like this:
    tests.STATIC_FIELD = "...";  }
 
);

In line 1 of the above example, the static method definePackage() on the jsx3.lang.Package class is called with two arguments: the name of the package and an initialization function for defining the package’s members.

 

 

Unlike classes, the package and its members can only be static in nature. Although you cannot instantiate a package, you can still reference it using the thiskeyword from within its methods. If any intermediary packages have not yet been defined when calling the definePackage() method, they are automatically defined in the creation of the new package. Furthermore, the definePackage() method can be called many times for the same package. Each call adds to the existing package rather than replacing the package’s existing members. The declaration of the package is optional, except where you desire introspection, which itself is subject for another in depth discussion.

 

TIBCO General Interface recommends that applications refrain from creating global methods and attributes in JavaScript, which in effect modify the window object. Doing so can cause name collisions and confusion when multiple projects are brought within the same JavaScript server. Rather, if global methods are necessary, add them to packages, instead.

 

For a fuller example of Package, consider the WSDL Mapping 2 sample.

 

jsx3.lang.Package.definePackage(
  "eg.wsdl2",                //the full name of the package to create
  function(wsdl2) {          //name the argument of this function
 
   /**
    * Executes the service mapping and subscribes functions to events.
    * call this method to begin the service call (eg.wsdl2.callGetHistoricalQuotes();)
    */
    wsdl2.callGetHistoricalQuotes = function() {
      //executes the service mapping
      var objService = wsdl2.APP.loadResource("sampleGetHistoricalQuotes_xml");
      objService.setOperationName("GetHistoricalQuotes");
 
      //since the server's response (a SOAP document) will be converted to CDF,
      //compile the mapping rules into XSLT for faster conversion
      objService.compile();
      
      //subscribe and call
      objService.subscribe(jsx3.net.Service.ON_SUCCESS, wsdl2.onGetHistoricalQuotesSuccess);
      objService.subscribe(jsx3.net.Service.ON_ERROR, wsdl2.onGetHistoricalQuotesError);
      objService.subscribe(jsx3.net.Service.ON_INVALID, wsdl2.onGetHistoricalQuotesInvalid);
      objService.doCall();
    };
 
   /**
    * {String} stores the feedback from the web service.
    */
    wsdl2.wsOutcome = "Success";
 
   /**
    * {String} stores the message sent from the web service if an error occurs.
    */
    wsdl2.wsMessage = "Error";
 
   /**
    * Repaints the grid control after successful web service call.
    *
    * @param objEvent {String} static field event type for successful response.
    */
    wsdl2.onGetHistoricalQuotesSuccess = function(objEvent) {
       if ( wsdl2.wsOutcome == "Success") {
         wsdl2.APP.getJSXByName("gridResults").repaintData();
         wsdl2.APP.alert("Success","The service call was successful.");
       }
       else {
         // An error was sent from the web service.
         wsdl2.APP.alert("Web Service Error: " + wsdl2.wsOutcome, "The web service sent the following error message: <br/><br/>" + wsdl2.wsMessage, null, "Close", {width:350, height:200});
       }
    };
 
   /**
    * Creates an alert box with HTTP status code on failed service call attempt.
    *
    * @param objEvent {String} static field event type for unsuccessful response.
    */
    wsdl2.onGetHistoricalQuotesError = function(objEvent) {
      var myStatus = objEvent.target.getRequest().getStatus();
      wsdl2.APP.alert("Error","The service call failed. The HTTP Status code is: " + myStatus);
    };
 
   /**
    * Creates an alert box if one or more restrictions fails during message generation.
    *
    * @param objEvent {String} static field event type for message generation.
    */
    wsdl2.onGetHistoricalQuotesInvalid = function(objEvent) {
      wsdl2.APP.alert("Invalid","The following message node just failed validation:\n\n" + objEvent.message);
    };
 
  }
);

 

Two items of NOTE that is not in the code

  1. 1. The sample project uses a package Static member(property) that is not explicitly declared "eg.wsdl2.APP"

  2. 2. This package code can be made more portable / reusable by adding a function parameter of objJSX to
    callGetHistoricalQuotes

 

e.g.

 

// Add a new parmeter objJSX, which will be the button instance clicked that trigger this action 
wsdl2.callGetHistoricalQuotes = function(objJSX) {
var server = objJSX.getServer(); // app server instane of the GUI object.
// ...
 
objService.setNamespace(server); //Sets the namespace for the server/project to run the service instance within.
 
 
} 

 

0 Comments Permalink
0

Marco Malva replied to an internal email with some interesting thoughts on why certain CPU architectures (such as Sun multi-core CPUs) did not perform as well as others in some circumstances. With Marco's permission I reproduce the comment below, with a few minor edits for a public posting...

 

Generally speaking, TIBCO software products benefit more from faster CPU (cores) than from more but slower CPU (cores).

 

This is because of code pieces that are single threaded yet may be responsible for the majority of the CPU consumption in some situations.

 

In the case of BE it is parts of the rules evaluation which are single threaded (and indeed have to be when you consider the possible temporal or causal dependencies).

 

Ergo: BusinessEvents works best on chunky cores rather than multiples of puny cores (subject to the usual caveats) in your server environment.

 

Although the original email thread was about a European customer, as it happened I was simultaneously told about a US customer discovering the same issue, and where developer laptops proved to outperform the multi-platform deployment environments. So the advice seems to be: evaluate hardware selections AFTER the application has been constructed, OR design and test the application architecture to suit your CPU (/platform) characteristics (if you are stuck with a particular deployment choice). Ask your Technical Architect before committing to a particular deployment platform. And Caveat Emptor.

0 Comments Permalink
3

Author: Luke Birdeau

 

The XML Mapping utility does allow you to specify which records in your CDF document actually get mapped. There is a API call exposed by the jsx3.net.Service class called setCDFRecords that can be called from a mapping rule. For example, assume you have a CDF document in the XML Cache called myXML:

 


<data jsxid="jsxroot">
<record jsxid="a" checked="1" jsxtext="a"/>
<record jsxid="b" checked="0" jsxtext="b"/>
<record jsxid="c" checked="1" jsxtext="c"/>
<record jsxid="d" checked="1" jsxtext="d"/>
</data>

 

Next, Create a CDF Document mapping rule using the XML Mapping Utility for the outbound message you are creating. Set its path/value field to: myXML. Add an additional mapping rule (a Script type this time) and set the following as its path/value:

 

setCDFRecords("record[@checked='1']");

 

Here is what happened:

 

Any time a CDF Document mapping is encountered, all record nodes that are immediate children of the root node (data) are placed in a collection (jsx3.util.Collection). Then when a CDF Record mapping is encountered, the first record in the collection is assigned as the CDF Context and the ensuing rules are run. When a CDF Attribute mapping is encountered, the record referenced by the CDF Context is used. The mapper then repeats this as long as there are more records in the collection. By calling setCDFRecords, you effectively tell the system to not use its default query:

 

currentRecordContext.selectNodes("record");

rather, use a custom query. In your case:

 

currentRecordContext.selectNodes("record[@checked='1']");

 

 

NOTE setCDFRecords() goes with your CDF Document mapping as an additional script mapping rule.

 

 

Example We want to map the jsxtext attribute from record with jsxselected checked to WSDL Schema structure

 


<element name = "PersonSearch">
<complexType>
<sequence>
<element name = "QueryTarget" type = "xsd:string" maxOccurs = "unbounded"/>
</sequence>
</complexType>
</element>

 

In the Mapping utility, select the rule tree node PersonSearch.

  1. 1. Add a CDF Document mapping and enter the name of the CDF Document you wish to map to (its cache id).

  2. 2. Next add a Script mapping to the PersonSearch node and set its value to:

setCDFRecords("record[@jsxselected='1']");

 

Next, select the rule named, QueryTarget.

  1. 1. Add a CDF Record Mapping (records don't need a value).

  2. 2. Next, add a CDF Attribute mapping and enter jsxtext as the named CDF attribute on that record that you want to map to.

 

So to recap, you should have two mappings on the PersonSearch rule and two mappings on the QueryTarget rule.

 

3 Comments Permalink
0

With the inauguration of a new US President, there's lots of changes in the air. It's certainly not an easy job to begin with, and since there's so much work to do and he's got a brand new team, I'm thinking President Obama might be able to use BusinessEvents Complex Event Processing and / or Business Activity Monitoring software.

 

Here's how... (in the form of a top ten list)

 

Number 10

A new US Government operations visibility tool for the newly appointed Chief Performance Officer cabinet post.

 

Number 9

As a new Presidential dashboard with real power.

 

Number 8

Another reason to stick with his Blackberry - TIBCO CEP product BusinessEvents creates Blackberry alerts.

 

Number 7

Predict what Venezuelan President Hugo Chavez will say and do next.

 

Number 6

Choose the new Presidential dog based on historical breed information correlated with new puppy attributes and real-time events.

 

Number 5

Automatically rebalance his personal 401K before Bernanke announces FED rate changes.

 

Number 4

New Affinity rewards program for frequent taxpayers.

 

Number 3

Make sure nobody plays the overnight commodities market with the bailout money float.

 

Number 2

Keep an eye on Hillary....

 

As an added bonus, Hillary can use it to keep an eye on Bill

 

And the Number 1 reason.......

 

 

oBAMa

 

 

 

That's what I think, anyway. How about you? Let us know.

0 Comments Permalink
0

One quite common qu we get is "how" or "when" will BE support the idea of "rule templates", whereby one separates some conceptual prototype rule with runtime instances, and in particular manage these instances separately.

 

Interestingly, the idea of "production rule" (see http://tibcoblogs.com/cep/2008/11/17/the-value-of-production-rules/ ) somewhat gives you "rule patterns" or "rule templates" for free.

 

Consider a rule

declare EventA if EventA.cost > 113 then doSomething( EventA).

 

You can templatize this easily enough to:

declare EventA if EventA.cost > dataPolicy.cost then doSomething( EventA).

 

But note that dataPolicy could be an object instance, or a scorecard entry, or... another declaration:

declare EventA, dataPolicy if EventA.cost > dataPolicy.cost then doSomething( EventA).

 

Now you will compare any EventA with any dataPolicy instance. Clearly you will likely have particular dataPolicies for various event types, and can add that as a "join" in the rule condition.

 

In this way you are effectively using the power of rule declarations to create rule patterns and templates. And of course, as the policies or strategies you are creating for your "master rule" are defined as concepts, then they are also easy to update and manage, for example as "update events" at runtime, or even through running heuristics (expert rules) or S+ analytic functions.

0 Comments Permalink
2

Simply adding HTML for a checkbox to a matrix Column header results in a checkbox that doesn;t get checked or unchecked in response to mouse clicks.

The challenge in the implementation is that the Matrix headers are designed to use the mousedown event to reorder columns and trigger sort behaviors. This means that the click event on the checkbox gets intercepted and canceled by the header and clicking on the checkbox never causes the checkbox to get checked.

To address, use the mousedown event on the checkbox to toggle the checked state (see code below). It is also critical to cancel event bubbling to stop the Matrix from sorting and reordering when the user's intention is to check or uncheck the box.

Lastly, note that the checkbox described below is XHTML compliant. This is important if you intend your app to ever run on an XHTML Web page (and it's simply good practice these days to author well-formed HTML).


 <input type="checkbox" 
onmousedown="this.checked = !this.checked; jsx3.gui.Event.wrap(event).cancelBubble();" 
onclick="jsx3.gui.Event.wrap(event).cancelBubble();return false;" 
onmouseup="jsx3.gui.Event.wrap(event).cancelBubble();" />



Darren Hwang (channeling Luke Birdeau)

 

2 Comments Permalink
0

Reassign the "ctrl+s" hot key to "Save & Reload".(Goto Builder Menu "Tools" > "IDE Settings" > "IDE Hot Keys" , locate "Save & Reload" , double click and press CTRL S keys)

 

Quickly locate a component using "ctrl+click" on a GUI control in the canvas to select the component on the "Component Hiearchy" palette. (NOTE : the matrix component swallows the "ctrl+click". So in order to click select a matrix control, you must do the clik on the little grey patch under the vertical scrollbar where the events bubbling is not cancel)

 

Float the "Component Libraries" palette to give more display area for the "Properties Editor" and "Event Editor" palettes. (This is really just a preference, but I find it useful since you can see more of the properties at a glance).

 

Update

Context sensitive help press keys "alt+F1" while focusing on the component you like get help on (For example, component hiearchy tree) to open the HTML Doc page on the component.

0 Comments Permalink
0

These software tools provide additional assistance in developing tests:
1. For Internet Explorer, download and install the Developer Toolbar. This tool
provides a very useful DOM Explorer function that allows you to inspect the
generated HTML markup at runtime.
Microsoft Internet Explorer Developer toolbar


2. Download and install Visual Web Developer 2005 Express Edition. This web
IDE provides syntax highlighted editing for HTML, XML and JavaScript.
Visual Studio Express


3. For Firefox, the best debugging tool is

Firebug Addon

 

4. For Firefox, you can alternatively download and install the Web Developer toolbar.
Firefox Developer Toolbar add-on

 


5. Best IDE editor for Javascript is IntelliJ IDEA, but you need to pay license for this

 

6. If you use the Eclipse IDE, install the JSEclipse plug-in for JavaScript editing.
JSEclipse Editor plugin

 

7. Alternative free editor, try Notepad++ which supports more than two dozen different programming language editing. Also download the FunctionList plugin which will show you list of methods and class in an easy to access side pane.

Notepad++

0 Comments Permalink
1 2 Previous Next

Notifications

Looking for a blog?

Can't find a specific blog? Try using the Blog page to browse and search blogs.

Active Blogs

View all blogs