5 Replies Latest reply on Dec 21, 2016 2:21 PM by jfetter

    Store the database locally on iPads and "sync" with server?

    jfetter
      Hey all!  I hope this finds you well.

       

       

      We have an HVAC business, for which we are writing the software.  We have several techs out in the field, who will use iPads to access jobs, write work orders, complete the jobs, etc.

       

      Our database is coming along nicely, except I noticed there is a slight lag every time you change screens/layouts on the iPad.  For example from Customers to Jobs to Inventory etc.

       

      This is not surprising because we are hosting the database on our server at home, and each iPad is accessing the file through the internet.
      As I understand it, every time you open a different layout, Customers for example, it has to grab ALL that information from the server.  (The scripts, the graphical elements, the data)

       

      This seems extremely counterproductive to me on two accounts:
      1) It is using much more bandwidth than necessary
      2) It is causing slower loading times

       

      Our customer list is virtually always the same.  Maybe once a month a new customer will be added, or some data will be slightly altered.  Why should we continue to use the internet to load this SAME data over and over and over?

       

      To me it makes more sense to have the "bulk" of the database stored on each device (iPad), and every time you change pages or edit info on a screen, it "syncs" with the server and updates the needed information.  This way we are only relying on the internet for small packages of data usually comprising of text alone.

       

      If you lose your iPad's internet connection briefly = no problem, because the device still holds all the essentials.  You keep working and when it reconnects 3 seconds later it will just update with the information you just entered.

       

      Is this possible to do with Filemaker?

        • 1. Re: Store the database locally on iPads and "sync" with server?
          Mike_Mitchell

          jfetter wrote:

           

          As I understand it, every time you open a different layout, Customers for example, it has to grab ALL that information from the server. (The scripts, the graphical elements, the data)

           

           

          Not exactly. The first time you access a layout, the graphical elements (really, the CSS descriptions of the graphical elements plus any actual graphics) are downloaded. A subset of records will also be downloaded, based on the needs of the layout. In Form view, records are loaded in batches of 25. In List or Table view, enough records are loaded to fill the screen; more will come down as the user scrolls. They're stored in the local cache on the device. (There are some additional elements involved - like the need to load all the associated records for any kind of aggregate calculation - but those are the basics.)

           

          At idle, changes at the server level are pushed out to connected clients. So if one user makes a change, then all the other users will receive that change the next time they are idle. This happens in the background to minimize impact on the users.

           

           

          To me it makes more sense to have the "bulk" of the database stored on each device (iPad), and every time you change pages or edit info on a screen, it "syncs" with the server and updates the needed information. This way we are only relying on the internet for small packages of data usually comprising of text alone.

           

          If you lose your iPad's internet connection briefly = no problem, because the device still holds all the essentials. You keep working and when it reconnects 3 seconds later it will just update with the information you just entered.

           

          Is this possible to do with Filemaker?

           

          Yes, it's possible. However, if you're expecting "brief" connection lapses, it might be a good idea to find out why. Such interruptions can be dangerous to your database - especially if it's caught in the middle of a data edit (most well-designed sync routines compensate for such problems). What I generally recommend is that people do an either-or approach: Either hold a copy of the database locally and then sync at the end of the shift / task / whatever, or do everything on the server (and optimize the database for network connectivity).

           

          The process of syncing is far from simple, however. If you're looking at doing syncing, I might suggest one of the excellent commercial tools available for this purpose:

           

          - GoZync (from Seedcode / Geist Interactive)

          - MirrorSync (from 360Works)

          - EasySync (from Tim Dietrich, although support may be a question)

           

          Most performance issues are primarily a result of solution design. You can search the forum here for several factors that contribute to improved performance. But network performance will always be slower than holding the database locally.

           

          HTH


          Mike

          1 of 1 people found this helpful
          • 2. Re: Store the database locally on iPads and "sync" with server?
            jfetter

            Thanks for your reply Mike.

             

            Not exactly. The first time you access a layout, the graphical elements (really, the CSS descriptions of the graphical elements plus any actual graphics) are downloaded

            Does this mean that when we get a stable version of the database on the server, after loading the layouts once they will (in a sense) stay on the devices?  Even after repeatedly closing the app and reopening, etc.

             

             

            However, if you're expecting "brief" connection lapses, it might be a good idea to find out why. Such interruptions can be dangerous to your database

            I meant if the technician was in an area of poor signal.  (occasionally happens depending on where in the state they are)

             

            As it is now, it seems any connection issue, no matter how short, puts the devices into freak-out mode and halts everything you're doing.  (Pop ups saying it needs to reconnect to the host, etc.)

            Granted this could have something to do with our amateur server setup, but I'd assumed if the database was on our local devices it could smooth out these little connection hiccups.

             

             

            Either hold a copy of the database locally and then sync at the end of the shift / task / whatever

            So it is possible (without 3rd party software) to host most of the database on each iPad?  Basically the "guts" of our database?

            It wouldn't work for us to sync at the end of shifts because of the possibility of multiple people editing the same entry during the day and then having sync issues.

             

            BUT..... what about a quick sync after each layout change or other similar task? In other words the device would sync with the server after you do virtually any task and make changes?  This would keep everyone up-to-date and no double bookings or double entries.

             

            As I see it, Filemaker is already capable of syncing data back and forth every few seconds. LOTS of data and layouts.  I'm asking it to do LESS and sync smaller amounts of information.

            Why isn't there a way to do most of the "heavy lifting" on the device, and sync our data with the server every several seconds.

             

             

            Forgive my naiveness on this subject.  We're currently using a standalone app called ServiceM8 for our business.  So I'm used to instant changes between screens and no loading times.  I've tested their app in airplane mode and full functionality is still present.... and it updates the changes to the database as soon as the internet is restored.

             

            We really like Filemaker, and have heavily invested ($$) in it so far - but it's the little differences that you miss.

             

            Stuff like having Filemaker Go running on the iPad, and then you open the "maps" or some other app.  Now when you "re-open" Filemaker from running in the background, it has to re-load the database!!  Most apps will stay running in the background and keep everything ready to go for you

             

            Thanks again for your help.

            • 3. Re: Store the database locally on iPads and "sync" with server?
              Mike_Mitchell

              jfetter wrote:

               

              Thanks for your reply Mike.

               

              Not exactly. The first time you access a layout, the graphical elements (really, the CSS descriptions of the graphical elements plus any actual graphics) are downloaded

              Does this mean that when we get a stable version of the database on the server, after loading the layouts once they will (in a sense) stay on the devices? Even after repeatedly closing the app and reopening, etc.

               

               

               

              No. Once you close the database on the client (be that desktop or iOS), the cache is cleared.

               

              However, if you're expecting "brief" connection lapses, it might be a good idea to find out why. Such interruptions can be dangerous to your database

              I meant if the technician was in an area of poor signal. (occasionally happens depending on where in the state they are)

               

              As it is now, it seems any connection issue, no matter how short, puts the devices into freak-out mode and halts everything you're doing. (Pop ups saying it needs to reconnect to the host, etc.)

              Granted this could have something to do with our amateur server setup, but I'd assumed if the database was on our local devices it could smooth out these little connection hiccups.

               

              FileMaker Server constantly communicates with every client. If that communication is interrupted, then it will have issues. It sounds like you need a fully offline solution.

               

              Either hold a copy of the database locally and then sync at the end of the shift / task / whatever

              So it is possible (without 3rd party software) to host most of the database on each iPad? Basically the "guts" of our database?

              It wouldn't work for us to sync at the end of shifts because of the possibility of multiple people editing the same entry during the day and then having sync issues.

               

              To the first: Yes, it's possible, but you'll need to program it yourself. Not a trivial task.

               

              A proper sync setup reconciles at the field level. If one technician edits one field, and another a different field, then those changes should both be preserved. But a sync collision is always possible. The more frequently you sync (perhaps after each set of rounds - it sounds like you're in an industrial environment), the less likely you'll have a problem.

               

               

              BUT..... what about a quick sync after each layout change or other similar task? In other words the device would sync with the server after you do virtually any task and make changes? This would keep everyone up-to-date and no double bookings or double entries.

               

              In theory, you could do this, but again, you'd have to program it yourself. Every "change" is a lot of syncing.

               

              I suggest you take a look at the syncing white paper, located here:

               

              iOS: Sync

               

              This will give you an idea of the sort of considerations that are involved.

              1 of 1 people found this helpful
              • 4. Re: Store the database locally on iPads and "sync" with server?
                miler24

                We have a FileMaker solution specifically for field service firms such as HVAC.  To handle offline access, we sync only the most relevant information, like current orders, time clock punches, etc.  We built our own syncing script, but have been playing around heavily with 360Works MirrorSync.  Usually, field service firms require access to quite a bit of data such as previous customer history, entire product databases with pricing, current inventory levels, payment processing, and current GPS locations...syncing it all does not tend to work well in an offline scenario since it usually takes too long.  So, using the data separation model, we keep the layout and scripts local, only the limited data in the found set is loaded over WAN.  This keeps performance optimized.

                 

                Interested in having you and your FM dev(s) chat in an under-the-hood session?  I'd love to compare notes.

                 

                Eric Miller

                DocuWrx

                2 of 2 people found this helpful
                • 5. Re: Store the database locally on iPads and "sync" with server?
                  jfetter

                  Thank you for the replies!