Friday, January 20, 2017

We are hiring Full Stack Engineers!

We are hiring full stack engineers to help us build out the new Flex 5 platform! The job description is posted below. While the job description states we are seeking candidates that are close enough to Carlisle, PA to commute to the office once a week, we will consider candidates from anywhere in the United States if you have industry experience (e.g. you have used Flex software, worked in the AV industry, etc).

If you are interested or know somebody that is, please go to our job post at Indeed and apply asap!

Regarding Flex 5 development, we are planning to start a blogging series soon to flush out all the exciting things we have been doing with Flex 5 over the last while! Stay tuned!


-------------------------------------------------------------------------------------------------

Job Description


We are looking for developers to join our growing engineering team.
We are looking for developers to help build out our exciting next generation SaaS platform. Our engineering office is located in Carlisle, PA. We are looking for local or semi remote candidates with the ability to commute to Carlisle once a week.

Our developers work up and down the stack. We have developers that prefer backend or frontend development. We think it’s awesome to have a forte, however, all of our developers are expected to be able to work anywhere in the stack to get things done.

We integrate our code regularly and ship often. We believe in short incremental development cycles so we expect our developers to be committing code at least daily. Our next generation platform is being driven by automated tests and a continuous deployment philosophy. We expect developers to work autonomously, and want candidates with an ability to identify, communicate, and solve problems.

Skills & Requirements


You are fluent with the JVM ecosystem. You will write code in Groovy, Java, JavaScript, & SQL but you are open minded about other languages & ecosystems. You know something about ORM’s such as Hibernate and the tricky tradeoffs that come along with them. It is normal for you to not use the ORM for everything and write pure SQL for complex queries. You know something about Spring Boot and have coded on Spring applications before.

You are an avid unit tester. You already practice test driven development, primarily with unit tests. It is normal for you to commit code with accompanying unit tests. You are able to articulate principles of unit testing to other team members.

You view yourself as a software craftsman. You are constantly improving your craft and know how to stay relevant in the changing technology landscape. You embrace failure as a learning opportunity. You love collaboration and transparency. You look for simple solutions to complex problems.

You are self motivated. At Flex, we won’t tell you when to work. We just expect that you’ll love coding and will naturally have a bias towards getting things done.

You value agile & lean development. At Flex, we don’t subscribe to dogmatic views on agile processes. We happen to use some elements of Scrum but really we just value fast feedback, collaboration, quick iterations, test driven development, continuous integration & deployment.


About Flex Rental Solutions


Our team of dedicated engineers develops rental and event management software for over 600 business customers from all over the world. Our customers are primarily within the Professional Audio Visual, Concert Touring, Live Event, Staging, and Production market segments. Flex offers a flexible and dynamic work environment, opportunity to work on interesting projects and technical challenges, paid company holidays, paid vacation, and health, dental, and vision insurance, along with other benefits.


Monday, November 7, 2016

Making Flex Faster

Speed is something that is one of the top engineering priorities at Flex even as we transition more and more effort towards the Flex 5 HTML5 rewrite effort. We recognize and understand that as awesome as it will be to one day be free from the old Flex 4 Flash-based platform, our users still need to get their work done between now and then.

Speed is something that we have been making small incremental improvements on most releases throughout this year, but it is something that is difficult to really move the needle on. We have also worked on memory leak issues, but those tend to be quite a bit easier. Normally with memory leaks you just take a memory snapshot of a customer who is struggling with memory leaks, and with a little detective work with a tool like YourKit, you can usually find what is hogging the memory and somewhat easily make a fix. Speed is completely different ballgame, as it's hard to get good visibility and the fixes are much more difficult and time consuming.

For us, our speed issues revolve almost entirely around database IO (input/output). Most of the time it's one of the following type of problems.

  • N+1 SQL queries. Queries in a loop, where you get one database trip per iteration in a loop.
  • Large SQL queries. Just sheer size, like many MB's of SQL output.
  • Bad SQL queries. E.g. lack of indexes, bad joins, etc

Focused Speed Work

In light of all this, back in late September we spent at least a week of focused developer time to try to get some speed relief on some targeted high use areas of Flex. We started by having the support team compile a list of top slow areas from customers. Development then took that detailed information and began the process of trying to understand what was really happening in those slow areas.

So even while we have known about these problems for some time, the fixes are not so straightforward. The reasons for this is a bit hard to explain, but the short answer is we have a huge domain model (think all the many tables & fields in the database) and use an ORM (Object Relation Mapper) tool called Hibernate inside our Java application that maps database tables & columns to Java objects.

Hibernate is a "great" tool when you start because it allows a developer to rapidly add new tables & fields and the SQL for them will automatically be generated when you ask the database for something (such as a Quote or Inventory Item). However this really accumulates over time and gets completely out of hand. You might just be after one or two fields from a table for your business logic, but Hibernate will fetch everything because it has no idea what we are really after. 

In the end, you just end up with tons of overhead with the database getting absolutely hammered with sheer amounts of SQL (e.g, I've seen 30MB or greater of SQL generated for a single line item edit action) which in the end is mostly of no use and just gets garbage collected inside the Java application.

So again, we've known for awhile what the general problems are. The problem is getting the right kind of visibility and even knowing what to change to help it.

The Breakthrough

The breakthrough back in September was bringing in a tool called P6Spy. It's an open source tool you can plugin without the application even knowing about it. Basically it intercepts all of the raw SQL that is being sent to the database. It has many configuration options, but one of the coolest settings you can enable is the application stack trace. With that enabled, in addition to being able to see the raw SQL output, you can see the exact line of code inside of the application that generated the SQL!

With this in place, it was like we suddenly had eyes into what was going on. We rapidly discovered some obvious issues, like some unexpected N+1 select issues that were going on. Usually these fixes involved some caching tweaks so that a database hit wasn't needed or moving find by id fetches into some kind of one time batch fetch.

Collection Batching

We fixed those obvious ones and then moved onto other improvements. Specifically, we started doing "collection batching". Let me explain... in the application you can have a Java domain object with a collection hanging off of it (e.g. an Inventory Item has a collection of Serial Numbers) and with Hibernate those are always lazily loaded by default. That means you could pull that item from the database, but the serial numbers won't load from the database until you actually call getSerialNumbers() on the item object.

This is fine sometimes, but what if you were looping over 1000 inventory items? Yeah, you'd be hitting the database every time you call getSerialNumbers() on an inventory item. That is what we call an N+1 select issue, and they are an absolute performance hog.

The nice thing is we discovered a little known Hibernate setting known as "collection batching". What this means, is say you have the serial number collection as above, but you set the collection batching size on the collection to say 100, when you call getSerialNumbers() it will fetch up to 100 other serial number collections (that are already in the Hibernate session) in a single call. This means for the 1000 inventory items, you might only get 10 hits to get all the serial numbers. See https://docs.jboss.org/hibernate/orm/3.3/reference/en-US/html/performance.html#performance-fetching-batch for more info on this batch size setting. 

That is a factor of 100 reduction in database trips, instead of 1000 individual hits it might be as low as 10 trips for all the serial number collections. This was a huge breakthrough and we implemented this strategy in key document editing areas.

We rolled out out these multiple speed fixes in version 4.18.2 in mid-October. We have have heard directly that it is faster, specifically with document editing, which is exactly what we were after.

Where do we go from here?

Monitoring is our next big step. We have set up a tool stack with InfluxDB, Grafana, and Telegraf that will collect metrics sent from Flex. We have version 4.19.0 queued up for deployment this week. With that release, Flex will begin shipping metrics to this new tool stack. We will be able to setup dashboards that will get us all kinds of different types of visibility into the application. We will use this info to make more targeted fixes. 

So we intend to rinse & repeat with targeted fixes, until we get Flex 4 to reasonable speed levels in the "day to day" high use areas. With the Flex 5 rewrite, we are contemplating a whole new way of database access which will be fast and be the ultimate solution to Flex 4's speed woes.

Hopefully we'll have a blog post here in the future on the new monitoring/metric tool stack and the results we get from that! Stay tuned!

Saturday, September 24, 2016

The Engineering Blog is Back!

We are bringing back this engineering blog as a dedicated place to talk about some of the behind the scenes engineering at Flex. We have a lot of exciting things to post about in the coming weeks and months! First up is a post on Flex speed and what we are doing to make Flex faster! Stay tuned!

Monday, May 5, 2014

New QuickBooks Online Integration is here

With the Flex 4.8 version that was recently deployed, comes the new QBO (QuickBooks Online) integration. If you have been using the QBO integration, you can start using this right away. However, switching over is not automatic, there is a bit of effort required on your part to switch over. If you are not currently using QBO integration, contact support to get started.

Here is a basic "getting switched over" video: http://www.screencast.com/t/AJKeatxHF4

The basic steps for switching over are this:
  1. Go to Financials > Accounting Integration 
  2. Basic Settings tab > Enabled Accounting Systems: Change selection from "QuickBooks Online Legacy" to "QuickBooks Online". Click Update to Save.
  3. QuickBooks Settings tab in QuickBooks Online area, click the "Connect to QuickBooks" button
  4. Follow prompts to sign in & authorize
  5. At this point, the QuickBooks Settings tab should show that you are connected
Once connected, you will continue to push documents as you did before. There are a few things that you need to be aware of:

Taxes

Your Flex tax rule name now needs to precisely match a QuickBooks Online Tax Code. For a United States example, you may have a tax code called "PA Sales Tax". For international, you might have a tax code called "HST". You need to name your Flex tax rule name the exact same name as the tax code. 

Flex will not (actually it can not) create or update any tax settings in QuickBooks Online. This means you must take care to make sure your Flex tax rates & QuickBooks Online tax rates mirror each other & keep them in sync if they change.

Updating Documents

Previously it was not possible to actually update documents. So, for a re-export, we had to actually delete the document, and then recreate it. We now have the ability for documents to be updated which happens automatically if you've already pushed the document before. This is a great enhancement because now any links that are created in QBO between documents will not be erased when you re-export an document.

Integration Errors

If you push a document and it does not show in QBO, be sure to first check Systems Settings > Integration Bus > Integration Bus Error Screen. It will show you any errors that have happened in the Integration Process. Sometimes the error message can be a little cryptic so if you can't figure it out, ask support for help.

More to Come

The previous integration did not support Purchase Order's at an API level. The new integration supports PO's but we have not implemented it yet due to the fact we were focused replacing what we had first. We should be rolling that out sometime this year.

GL Account sync has NOT been re-implemented for the new QBO integration yet but we will be bring that back as well sometime this year.

We know there are more features that customer's will need but we are happy that we are back on the right path for integrating with QBO. As important features come to our attention we will implement them. This new API is much more feature rich which will allow us to create a much better integration.

Old Integration Cutoff

As of this writing the cutoff for the old API is May 15, 2014. However, I believe that is contingent on you upgrading to the new "harmony" QuickBooks Online. Once you upgrade to "harmony",  the old API will no longer work.

If you have any questions or concerns, contact support@flexrentalsolutions.com. Happy Integrating!

Saturday, March 29, 2014

New Faces at Flex

Last summer Flex opened its first physical office in Richland, Washington.  Intended primarily to house our engineering and software development efforts, our decision to open it up to the local tech community for coworking and speaking events has brought us into contact with some amazing local people we wouldn't have known about otherwise.

Here's a rundown of some people that have recently joined our team.

Erik Ralston

Late last year we hired Erik Ralston and since then he's been working full time on our IOS applications, both for the iPhone and the iPad.  He'll be at Infocomm in just a few months to unveil what we have so far.

Maria Barker

With four full time developers cranking out code and with IOS apps and Label Ninja on the way, we felt it was high time we gave Courtney a little help with QA.  To fill this role, we hired Maria Barker, whose accounting background has made it possible to have an accounting specialist testing our financial module and accounting system integration.  She's also taken over as Controller and has whipped our books into shape in short order.

Becca Lingley

Our number one problem right now is coping with and managing growth.  We need to formalize some of our processes, increase consistency of the customer experience, and just step our game up in general.  After consulting with us for a few months, we decided to bring Becca on permanently as Director of Operations.  She brings a deep business background to the table with an MBA under her belt and just a dissertation away from a PhD.  We need to get better at everything we do while managing a high level of growth and it will be Becca's job to help guide us through that.

Branden Rosenlof

A long running complaint of Flex customers is the lack of documentation  It's a perfectly legitimate complaint and we've finally done something about it by bringing on a dedicated Technical Writer.  Branden has already done a great job on our Starter Kit and is currently working on a full documentation set for Flex.  He'll also be heavily involved over the next few months as Flex revamps and improves our training offerings.

Coping With Growth

We've brought on all these new faces because we still have a lot of unfinished business and plenty of challenges that come with growth.  We need to improve the quality and consistency of everything from the software itself to the sales process to training and support.  We also need to prepare ourselves for the next wave of hiring and ensure that we're ready to bring new people on and get them up to speed quickly when they arrive.

We're also updating our web site for Infocomm, launching IOS applications and working on a ground breaking barcode label design and printing solution, Label Ninja.  To that add multi-session event support, in system credit card processing, recurring billing, major improvements to Quickbooks integration, a new high availability fault tolerant architecture - and most of all, making Flex fast.

We'll publish a formal roadmap in the next few months so customers can keep tabs on exactly what we're working on and when, but the take away is that we have a lot left to do and are staffing up to do it.

 






Tuesday, February 4, 2014

New QuickBooks Online Integration coming soon

We are currently in the final stages of developing a completely new integration with QuickBooks Online. It's an exciting new integration that provides much better support for QBO (QuickBooks Online) features.

The first QuickBooks integration we developed was for the QuickBooks Desktop Editions. Specifically this integration uses an underlying XML API called qbXML. We put export messages in a queue and the QuickBooks Web Connector program connects to Flex and pulls down the qbXML request messages which it uses to create the documents in Flex.

Back then, the best way to integrate with QBO was to use the same underlying qbXML API. So, we made a few modifications to our existing qbXML requests and built the necessary service to send data to QBO since you push directly to it (the Web Connector is not used).

However, QBO only supported a subset of the API. Two big things it was missing was the ability to modify a document and to push Purchase Orders. Later on, tax also changed in QBO and the qbXML API just doesn't support the new tax model well at all. For awhile, I hoped that Intuit would bring the qbXML API up to par with all the features of QBO. But it seemed they were abandoning qbXML completely for QBO and instead were trying to create an online based API that would integrate with both the Desktop and Online Editions. This so called V2 API never seemed very straightforward to me and so we never pulled the trigger on using that API.

Recently, Intuit completely separated the approach for integrating with QB Desktop and QBO. The Desktop Edition is going to be sticking with the qbXML API. For QBO, there is a new V3 REST API that will be used exclusively with QBO. This new V3 REST API is the new integration mechanism this blog post is announcing.

What motivated us to do this now is that fact that Intuit is cutting off the old qbXML API for QBO in mid march 2014. The last week or so I've been focused almost exclusively on creating this new integration. Code is in place for sending Invoices, Payments, and Credit Memo's. Purchase Orders will be coming soon but most likely will not be in the initial release simply because we are focused on first simply replacing what we had with the old API. We still have some plumbing work to complete like the setup connection process to QBO.

Our goal is to roll this out asap. We want to have some early beta testers to test it before we switch everybody over to it. If you are interested in early testing, please contact support@flexrentalsolutions.com and ask that your email be assigned to Roger.

All in all, this is a good step forward for QuickBooks software. The qbXML API was designed for the Desktop version of QB and was never a very good fit for QB Online. Having distinct API's for the Desktop and Online editions will allow each application to evolve independently of the other. The cloud model is different and it deserves to take a different roadmap than a desktop application.


Friday, December 20, 2013

A Flex Spin Off Is In Development

Years ago I spent a few days in a backroom in Van Nuys, California knocking together the abomination that is our barcode label printer integration.  My wife, then a teacher, was off for the summer and we were staying at the Oakwood wedged between Universal and Warner Brothers in some nebulous quarter of LA that was either Hollywood, Glendale or Burbank. Nobody's quite sure. 

This particular Oakwood would turn out to be an incubator for child stars and had provided accommodation for the likes of Kirsten Dunst and Doogie Howser, MD.  I learned this somewhat after the fact - after asking the staff why there were so many kids running around with expensive haircuts and bad attitudes.

My wife decided to maximize her LA experience and signed up to be an extra.  She did an all night shoot for Californication in high heels.  Needless to say, neither of us were in a place to make good decisions that summer.  It was in this atmosphere that our raw templating approach to bar code printer integration was born.  It works, but it's about as brittle and user unfriendly as you can get.

Holding Our Nose

We've let this problem fester for a while - but lately there's been a lot of interest in modernizing barcode printer integration.  We've had character encoding issues that can't be solved without moving to ZPL2 in addition to the general hassle of working with label templates in the raw printer language.

We recently hired a developer (Erik), who in a previous life, worked for Seagull Scientific on their label workflow product, Commander.  He ran point on an effort to find barcode label design/automation software we could easily integrate Flex with.

The report was not good.  Everything out there seems to be from another time.  Much like our own A/V rental software industry, it's ten to twenty years behind the times.  It's all CD-ROM's in boxes in an era when fewer and fewer computers even ship with optical drives.  It's a scenario we know all too well. 

We saw little point in investing our scarce resources into integrating with software platforms that are surely destined for extinction.

In The Meantime

So it occurred to us that it's recently become possible to do a lot of powerful things in browsers without asking the user to download any software or install a plugin.  There's SVG, D3 and HTML 5's Canvas to name a few options.  Someone could - and inevitably would - build a barcode label design tool entirely in Javascript.  What if we built it first?  What if we gave it away for free as an open source library?

We'd just need a little server application to go with it that could store the label templates, talk to the printers and expose an API for triggering print operations.  It occurred to us pretty quickly that the utility of such a system would extend well beyond equipment rental software - so adding this as yet another feature to Flex made little sense.  We decided to spin it off as a separate project, brainstormed for names, checked our list against available domain names and Label Ninja was born.


A Green Field

Work on Label Ninja will start early next year and the focus will be replacing our existing raw templating system as soon as possible. We won't shoot for the kitchen sink - the focus will be clarity and simplicity.

For us, it will be a way to gain experience developing HTML 5 applications without putting our core product at risk.  For our customers, it will make changing barcode labels and hooking up printers ten times easier.  It will also give customers a taste of what to expect when our effort to replace Flash begins in earnest - an effort that won't be a shot-for-shot remake of Flash based Flex, but a full reevaluation of the user interface, one that incorporates attention to aesthetics as well as functionality along with a new emphasis on simplicity.

All Flex customers will be first in line when Label Ninja rolls off the assembly line next year.  There's no need to sign up for the mailing list because you're already on it.  But you might check out Label Ninja's coming soon page (labelninja.net) anyway, as it gives a hint of where we're headed.