ESME Blog

enterprise microsharing in a process context
February 21, 2009

Accessing ESME via existing Twitter Clients

Author: dick - Categories: Design, Development, Vision - Tags: ,

One of the main tasks for the first sprints since we joined Apache has been support of the Twitter API .  The main reason for this functionality is the ability to use existing twitter clients to access ESME. Well, Vassil Dichev  has been working hard to this important task up and running. Using Twitter clients, it is now possible to send messages, receive the public and private timelines as well as view friends/followers.

The use of other Twitter clients to access ESME isn’t always possible, because the client’s configuration must be changed so that the application accesses the Esme server rather than the main Twitter server. Unfortunately, this switch isn’t always possible, because the server which is the basis for messages is usually hardwired.  Those applications that can also access laconi.ca  servers can also be made to access ESME servers

I’ve tried it using Twhirl against the Stax deplyoment with the latest Apache code drop and was pleased to see that it works.

twhirl_esme33

If you want to try it yourself, then you to do the following steps.
1. Create a user on the ESME server at Stax
2. Click on the manage token link and create a token. This is is your password for using the Twitter client
3. Create a new account with twhirl using the laconi.ca type not the identica.ca type.

twhirl_esme41

Use this synatx “apachedick@esmecloudserverapache.dickhirsch.staxapps.net”. Instead of “apachedick” use your own user_id.
4. Click on ”Connect” and set password using your token from step 2.

twhirl_esme_pass1
5. You should now see the public timeline.

I’ve only tried accessing ESME via twhirl. If anyone has success using other clients, then please add a comment.

Please note that we have not yet done everything in the Twitter API, so some things still aren’t working (for example following users). Other functional characteristics of Twitter like DMs aren’t yet part of the ESME architecture.

Please also note that the Web UI at Stax doesn’t work properly, so bear with us. The Stax deployment is the latest code drop from Apache which means it might include bugs.

January 9, 2009

A context-sensitive ESME client

Author: dick - Categories: Integration, Vision - Tags: ,

One idea that we’ve kicking around is an ESME client that is context-sensitive.  The idea would be that just ESME messages are displayed that reflect the particular contents on the page on which the ESME client is running.

 

For example, an ESME client is running on an internal blog page that deals with sales problems with a particular customer “Patriot Chairs”. The ideal situation would be that the ESME client shows all messages that are tagged with the words “sales”, “Patriot Chairs”. The idea is those reading the page could get a feeling for the corporate “heart-beat” dealing with these areas.  The blog reader would be able to see other messages relating to the particular customer in question and sales issues in general.  If desired, the blog reader could then interact with those individuals talking about these matters.

 

To meet these requirements, the ESME client would have to respond to how a particular blog page is tagged. Whether this tag is based on URL-based tags or another mechanism would be implementation-specific and would in all likelihood be based on the details of the integration environment.

 

This use case would also probably require new REST API functions (for example, “GetFilteredMessageshttp://esme.example.com/messages?tag=sales) to be able to search the public timeline for particular tags.  Another option would be to have a client that performs the filtering actions in the JSON transformation.

November 26, 2008

ESME Client for Oracle via Stored Procedure

Author: dick - Categories: Design, Integration - Tags: , ,

In an earlier blog I wrote about database integration for ESME. I’ve just created a prototype for sending messages to ESME via a stored procedure in Oracle. I’ve used PL/SQL to create the stored procedure and implemented the HTTP calls via the UTL_HTTP package.

The prototype is primitive and doesn’t use any input parameters but this would be relatively easy to implement. Just change the login token and you will ready to integrate this code into your own applications.

The code is available on the GoogleCode site.

November 25, 2008

ESME Client for Ant

Author: dick - Categories: Development, Integration - Tags: ,

We’ve already shown how ESME can be integrated to SAP-specific development environments (including ABAP and the NetWeaver Portal). I wanted to expand this integration to other non-SAP platforms.

I’ve just completed a integration with Apache Ant which is “a Java-based build tool”. It is now possible to send messages to ESME that describe the progress of your build steps. This is especially useful when ESME is being in development projects where individual developers can be made aware of the status of various-build related actions. For example, a development team could be informed that a build is broken or if it is successful.

There was already standard actions in ant to send emails but I thought ESME integration might be more useful.

An example build.xml file and the simple Java class that sends ESME messages (based on the ESME java API) are present in the wiki on the Google Code site

The same model and code could probably be used for Apache Maven - a software project management and comprehension tool- as well.

November 4, 2008

Pure Javascript Messaging Client

Author: dick - Categories: Background, Development, Marketing - Tags: ,

There is a now a message-receiving client for ESME that is written entirely in Javascript. This very first cut of a client was created as a proof-of-concept to show that a very simple client was possible without any dependence on the server-side programming language.  Based on the current implementation, it could be embedded in Java, C#, etc. It could run in a variety of environments including SharePoint, SAP Portal, etc.

This first version offers:

  • Long-polling
  • Flexible design
  • The client uses XSL transformation to create HTML from the XML that originates from the ESME’s REST-API

The drawbacks of this first version:

  • The UI is real ugly. Someone needs to redo the XSL file.
  • The UI is not complete. I have not added all the features that are possible (reply, etc.). I was more intent on showing ESME messages in a Javascript-based environment.
  • It is not bug-free
  • I have only tested it in Internet Explorer 6.0. Someone might have to go and try it out in FF.
  • XSL file is currently local instead of stored on server
  • The token is currently hard-coded. 
  • Documentation is still pretty poor.

Thanks to Darren for doing the initial corrections that started me out on the right foot.

The code is in the Google Code wiki.

October 26, 2008

The Netweaver Logger

Author: dick - Categories: Development - Tags: , ,

At the Demo Jam at the SAP TechEd in Berlin, we presented a NetWeaver-based logger that sent ESME messages in response to exceptions in the Java Stack. The code is available on our Google Code repository. Just like our ABAP-based integrations, we have a created a JAVA API class that wraps the REST-API.  The wrapper class isn’t complete yet but it contains enough functionality to be able to send ESME messages via Java.

The method below is the “heart” of the ESME functionality and sends message via ESME.

public void handleEvent(MessageEvent event)
{
   LogRecord rec = event.getLogRecord();
   Message esmeMsg = new Message();
        
    int msgLength = rec.getMessage().length();
        
    String message = rec.getMessage().substring(0,(msgLength<255)?msgLength:255);
       
    String[] lines = message.split(”\n”);
    StringBuffer wrappedMsg = new StringBuffer(255);
    for (int i=0; i<lines.length; i++)
    {      

       wrappedMsg.append(wrap(lines[i], 55));
     }
     esmeMsg.setText(wrappedMsg.toString());
        
     String[] tags = new String[4];
     tags[0] = Severity.toString(rec.getSeverity());
     tags[1] = rec.getApplication().replace(’.',’ ‘);
     tags[2] = rec.getLocationName().replace(’.',’ ‘);
     tags[3] = rec.getUser();
     esmeMsg.setTags(tags);
  
     esmeMsg.setVia(”NetWeaverLogger”);
  
     esme.sendMsg(esmeMsg);
 }

With this code, it should be relatively easy to integrate other message sources into ESME.

Thanks to Darren for contributing the code.

September 27, 2008

ESME and Shadow IT: The VBA “client”

Author: dick - Categories: Development, Uncategorized, Vision - Tags: , ,

There is currently a number of new micro-blogging tools that are focusing on the enterprise market – they gloat about having the coolest clients (IPhone, Blackberry, etc.) Unbelievable but true – many individuals in the corporate world might not have these gadgets.  Of course, “everyone” supports the browser but lately I’ve been thinking about the importance of linking ESME into other parts of the typical worker’s environment.  Many people spend most of the day either working of SAP-related systems or on Microsoft Office products.  In a previous blog,  we discussed the WebDynpro client for ESME which might interesting for people who work with the SAP GUI or portal.  

I thought what about those individuals who work with Excel, Word, etc. Should they be left out of the micro-blogging world? With that thought in mind, I sat down down and wrote a VBA macro that creates messages on ESME. This macro is based on ESME’s REST API.

It In my opinion, it doesn’t make sense to do a full-blown client but there are number of existing micro-blogging tools where users can post entries on what they are doing (”finished presentation”, “working hard on sales analysis”, etc). I thought this functionality was a nice feature but I hated the idea of having to switch applications to just post a quick message.  Therefore, I thought a macro that just pops up in your Office tool of choice which allows you enter a quick message for ESME would be nice. The macro I created is very primitive and could be definitely enhanced to make it prettier and even more useful.

To authenticate themselves, ESME users must replace “insert_your_token“ with their own authorization token. Tags are currently hard-coded as well.

Sub ESME_sendMessage()

‘HTTP variable
Dim myHTTP As MSXML2.XMLHTTP

‘HTTP object
Set myHTTP = CreateObject(”msxml2.xmlhttp”)

‘open the connection
myHTTP.Open “post”, _
http://api.esme.us/esme/api/login?token=[insert_your_token]“, False

’send
myHTTP.Send

‘ Send Message

Dim message

message = InputBox(”Enter Message”)

myHTTP.Open “post”, _
http://api.esme.us/esme/api/send_msg?message=” + message + “&tags=Test,excel&via=excel”, False

’send
myHTTP.Send

‘Logout
myHTTP.Open “get”, _
http://api.esme.us/esme/api/logout“, False

’send
myHTTP.Send
End Sub

This blog is associated with the topic of Shadow IT , because ESME has the ability to empower not only those users who are aware of the newest / hottest social media technologies but also individuals who are more accustomed to Microsoft Office than Twitter. Such individuals develop complicated macros themselves to meet their requirements. They don’t need (or want) to go through normal IT channels. These people don’t know PHP, Ruby on Rails or Java. They’re not developers.  What they do have, however, is a better understanding of their individual business needs than any developer will ever have. Therefore, let these users decide how they are going to use ESME. 

Corporate IT just has to install ESME and then publish the link to such users.  The ability of accessing ESME via VBA gives this group of users the capability to decide themselves how they will use the tool.