Booked Scheduler Community Support
April 04, 2020, 10:41:15 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Database Schema image  (Read 9075 times)
mkv
Newbie
*

Karma: 0
Posts: 3


« on: November 13, 2018, 01:53:52 PM »

Developing for a mobile platoform I just had a look at the API approach to get some JSON data but to my surprise the API calls (getting reservatinons and the time slots) were pretty CPU/MySQL-heavy.

So I took the task to draw a diagram of the database. Well, I imported it to my database desinger and used two hours to reorder the tables and the connections Smiley

So if anybody is interested in it here it is. Not beautiful and perfect but hopefully adequate:

https://www.xdb.fi/dbdiag/bookings.png

Using direct access to database I succeeded in getting the service (get free and reserved time slots for a day) load time a lot shorter.  With API the the processing time hovered from 700ms to 1300 ms and with PHP+MySQL it dropped to between 10 and 20 ms. Needless to say, much more work was required, though.


Markku
Logged
TechCoder
Hero Member
*****

Karma: 5
Posts: 1676

Need Booked API/App/Plugin? http://bit.ly/23EutBO


WWW
« Reply #1 on: November 15, 2018, 07:26:25 AM »

Your results mimic mine on 'going direct' (we see around 8X faster response on our custom API over the Booked one) - the primary reason Booked is so slow is due to the 'excessive' (IMHO and others have commented..) use of OOP - seems the rule they use is something like "OOP or die" - - - at whatever cost to productivity, UI/UX.   Sad 

Works 'fine' for the standard displays, etc. - though it could be sped up a lot with less 'bulk' in using so many classes (again, IMHO!)

While the Booked API is 'ok-ish' for small projects for someone just starting out, we've gotten away from using it at all because of the speed issue you have seen and lack of flexibility (most of the stuff we do is outside the limited scope of the API and for us to get the data we need we'd have to make several calls........ - things crawl along like that!).  We wound up building our own, custom API that is much, much faster - as well as being secure (using encryption for login and data - where the Booked API is all in plain text Sad

The downside to going direct is that, when you upgrade Booked, the commands to access things may change (it is 'rare', but common enough to cause frustration...) - and, of course, you will have to update your diagram again!  Grin

========================================================
CashFlowProducts.com is independently owned and operated, offering custom modification,
plugins, project development and support for Booked Scheduler, as well as custom php, html,
javascript and database (typically MySQL based) programs. 

Neither CashFlowProducts.com nor TechCoder has any direct affiliation with Twinkle Toes Software,
the makers of Booked Scheduler (booked)

Additional information/products/plugins/etc. for enhancing your booked installation at https://cashflowproducts.com/shop.php
Send your product development/pricing requests to TechCoder at CashFlowProducts.com or visit our helpdesk at https://CashFlowProducts.com/helpdesk
========================================================
Any/all comments posted by TechCoder may/not reflect the opinion of CashFlowProducts.com
Logged
mkv
Newbie
*

Karma: 0
Posts: 3


« Reply #2 on: November 15, 2018, 03:19:19 PM »

**EDIT: I noticed you are actually selling your API, very interesting Smiley

Well, having been in the  industry for a VERY long time I noticed the OOP structure. A number of years ago I was asked to help in the support of PHP for Delphi by the local distributor. I got a sample package to get acquainted with it. Soon I noticed that the OOP mimicked the Delphi classes very closely - and deeply. That resulted in a horribly slow performance. I have seen the same in a variety of CMS frameworks which is why I created my own as well Smiley Oh, and I ditched the Delphi support task very soon knowing that I would be in deep support trouble.

So your message is a promise for me being on the right tracks, possibly Smiley

I have my doubts about the API I found in GitHub. I could not figure out how to create a reservation and already found a typo in the API library (I suppose you spot it):
Code:
    'method'     => 'post',
    'autherized' => $this->isAuthenticated()

I corrected that one but after turning logging on I noticed that the  CreateReservation() path goes nowhere in Services department. Maybe the booked.api.php or the routes part of the booked-api-config is faulty. Who knows? Having zero documentation it is a time-consuming task to try to walk down or up the class stairs and I have not used a debugger for years...

Apart from the API I found in Github I do not have anything else. Is there? You have an API of your own and I assume that you want to keep it your own as well, I suppose?

As for Booked Scheduler it is one of the few I have found interesting enough. I wrote a couple of reservation systems in my misty DOS past and a simple Web one fifteen years ago but would never start anything like those from scratch at my age.

My idea is to use Booked Scheduler as such at desktop and the admin end and write a simple mobile front end (to services) to be used in a couple of (hybrid) mobile apps that need a small booking part in their functionality.

« Last Edit: November 15, 2018, 04:03:03 PM by mkv » Logged
TechCoder
Hero Member
*****

Karma: 5
Posts: 1676

Need Booked API/App/Plugin? http://bit.ly/23EutBO


WWW
« Reply #3 on: November 15, 2018, 06:37:49 PM »

The API program we have for sale is not OUR API - it is a very simple interface to the Booked API (one line of code to initialize with various options and make a call, etc.)

You are correct that OUR API is private - we are using it on a large project that 'soon' will be released (we had a big job to interface Booked to a couple different APIs to gather some data and that pulled me off the other project for several weeks).

It does sound like you know the ropes - and have seen some of the 'challenges' we have faced with Booked over the years (though it is still the best of its kind out there...)

The API in GitHub....... - nuf said.....  (like most open source things, they don't support them because they become too much work unless they have corporate sponsorship or something to keep the developers fed - everyone has to pay rent - - - we don't have 'angels' that support our efforts, so, yes, we ask a fair price to help cover the cost of the work - and charge those that see the value and need the features.  Certainly we are always open to have someone sponsor the work and I, for one would be happy to give away all my software if that happened, but, so far, no offers - but still waiting for either that, or my landlady and food suppliers to 'open source' the things I get from them!  Grin  Booked has a corporate sponsorship (I believe - I have never heard anything officially, but I have some 'hints' that point in that direction (some being that if you look a the 'master' software you see various features that are never released publicly - kinda obvious that those go somewhere.....)

As for a tool to help you with the API, I made a Free API Tester (years ago) that has been downloaded a lot - I've only had a couple questions about it so I think it must be serving a good purpose (or it is so badly broken that nobody cares to tell me?  Roll Eyes - you'll find that on the website https://cashflowproducts.com/product.php?prodId=BookedAPITester - it was the basis for then later releasing the API tool https://cashflowproducts.com/product.php?prodId=BookedAPIClass

By contract, I can't do a lot of detail help in an open forum, but if you need a couple pointers, I'm happy to help where/as I can.  Maybe we can find some way to work together on your projects (I'm always looking at various projects where I can interface Booked or other things - sort of my speciality to 'translate' data to data.....

Looking forward to seeing you around the forum!
Logged
mkv
Newbie
*

Karma: 0
Posts: 3


« Reply #4 on: November 19, 2018, 02:23:29 PM »

Purchased your affordable API and you will learn to know the consequences Grin

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!