This document summarizes a presentation about integrating SugarCRM with IBM WebSphere sMash. It discusses how sMash allows PHP applications like SugarCRM to leverage Java libraries and how it enables integrations with other systems. Specific demos shown include accelerating SugarCRM search using Lucene and building workflows to integrate and extend SugarCRM functionality.
Java Virtual Machine based runtime supporting PHP and Groovy.NOT a Java EE environmentTargeted at Script developersNot for producing Java code.A Commercial ProjectWith development done in the open and limited no-cost use.A Full Stack RuntimeWith a HTTP server, module system and simple IDE built in.IBM’s Scripting platform.For building Agile Web ApplicationsUsing PHP and GroovyUsing assets from PHP and Java worlds.Built on Java (SE not EE)Uses many LAMP principles.Single threaded application programming model.Shared nothing.Restart-able runtime.<number>
WebSphere sMash core values are Speed, Simplicity, and Agility- product elements that support this are:SpeedDynamic scripting languages (PHP and Groovy – with Java as system language)Core application constructs: templates, pre-built servicesSimplicityBuilt-In development tooling: Visual Editors for Web Page Construction and for Flow AssemblyAssemble-style development (Developers can visually mash up services and feeds using a Visual Editor for Flow Assembly)AgilitySimple deployment (application “is” the server)Runtime Characteristics (clean, cost effective, short-lived)<number>
Dynamic Scripting Editor – Groovy / PHPVisual UI Editor - Constructing web pages (Javascript)Visual Assembly Editor - Scripting / assembling activities into a flow<number>
OK, so PHP is interesting…..but why not use the existing C based implementation. Why implement it on the JVM?Well, we wanted to be able to build sMash using Java but give PHP programmers a first rate programming experience.Since the PHP is build on the JVM PHP, the PHP , Groovy and Java can interact without costly IPC. Interaction on the same callstack.PHP can reach into the Global context without copying.This allows PHP programmers to leverage the power of the Java libraries and Java/Groovy programmers to re-use all the great applications and snippets from the PHP world.It really is the best of both worlds. We have multiple cases of business partners combining PHP assets with new code written in Groovy.We have instances of business partners mixing Java and Groovy programmers on the same project.Its about getting the job done…….fast……using what you have.Add to this all the great Java technology which we’ve invested 100s of PY in. Its pretty exciting to think about the Java JIT being able to chew on PHP code.IBM is not alone in this. At Javaone this year there were multiple presentations on the merits of bringing new languages to the Java Platform. Jruby, Jython, Groovy, Scalaare just a few of the languages with large followings.99
The PHP runtime is built on the JVM. It requires Java 5 SE or later from any vendor.The HTTP interface is via Zero. We are not using apache or lightppd here.PHP Scripts are parsed into an intermediate form and then either interpreted or compiled to Java Bytecodes.Java Bytecodes are cached in memory and written to disk as .class files.User experience is one of scripting (compilation is hidden from user).PHP extensions implemented in C from php.net can be attached via XAPI-C which uses JNI.We also attach Java extensions using XAPI-J which is how we interface to Zero and to databases via JDBC.We have a debug port to allow Eclipse PDT to debug PHP scripts.IF anyone asks about performance (suggest not to bring this up)…….PHP performance is great for most sMash use cases. The pathlength is not in the PHP its in the database, webserver and infrastructure.For huge deployments of PHP applications where out and out throughput matters, PHP performance is about 50% of PHP.net default configuration.Its important to say “default configuration” because PHP.net users can download and install a bytecode cache with improves throughput by about 4X.The implementation we have in sMash 1.1 has 2X the pure interpreter thoughout from sMash 1.0.Its still mainly an interpreter. We have designs and work items for sMash 2.0 and beyond to generate much more efficient bytecodes.<number>
OK, so what does this PHP to java interaction look like?Well there are really two schemes. For tight coupling we can use the java bridge which allows PHP to instantiate classes, call methods, extend java classes etc.This is appropriate when wanting to re-use java libraries, such as SugarCRM’s desire to use Apache libraries from their PHP application.Also one can leverage the Zero programming models to design handlers that interact using events and the Global Context.This more appropriate for ZSL’s use case where they want to mix PHP code with new handlers written in Groovy.There is also the extension interface we saw earlier of course. This allows the creation of PHP extension functions and object proxies in Java.<number>
<number><number>
<number><number>
<number>
CRM is a well established software sector that consists of managing customer relationships before (marketing), during (sales force automation) and after the sale (customer support). These key process – marketing, sales and support – are supported by collaboration technology that helps people share information and by reporting which gives employees a better view into the state of their business. Think of CRM as a way for your company to not only better manage relations with customer but be able to handle more customer relationships than you thought possible. <number><number><number>
Now, let’s jump into the actual product. First, I would like to focus on some key areas that we have focused on.User adoption – Most CRM deployments fail because users fail to adopt the CRM system. We place great emphasis on making sure the user interface is as intuitive and as fast as possible so that Sugar helps people be more efficient instead of getting in the way of how they work. This shows itself through UI which presents different themes depending on the user’s tastes and deep personalization capabilities that allow people to change the layout of the application to suit the way they work.A Full CRM Suite – We have built a full CRM suite that touches all customer-facing parts of the business: marketing, sales, support, along with collaboration and reporting functionality. We are backed by one of the largest open source development communities in the world, with over 9,000 developers on SugarForge, our online development environment and over 200 commercial extensions on Sugar Exchange, the online marketplace for SugarCRM extensions. This allows customers to benefit from the innovative work developers from around the world are contributing to SugarCRM.A Flexible Architecture that allows companies to configure and customize Sugar to suit how they do business. This includes designing workflow rules to manage how information moves through your company, creating custom modules, objects and fields and ensuring the security of your application with team security and field-level access controls. <number><number>
Here is a quick overview of our CRM functionality. As you can see we over a full suite: marketing, sales, support, collaboration, and reporting – supported by a robust and flexible platform. This allows your company to coordinate interactions across channels, including direct sales, call Center, the Web and partner channels. Sugar is fullt web service enabled which allows you to connect to backend systems, including ERP, Accounting, Billing or other Legacy Systems. <number><number>
<number><number>
<number><number>Here are a few companies which are already benefiting from the use of SugarCRM.