Small Mac-based site.

Discussions relating to plugin development, and the Jiwa API.

Re: Small Mac-based site.

Postby pricerc » Sun Mar 22, 2020 2:55 pm

Mike.Sheen wrote:I wouldn't consider multi-tenanting the databases - they'd need their own. We certainly could achieve that with introducing a tenantId per table and implementing row level security - but that's a fair amount of work and a lot of interesting problems would need to be solved, so I'm not entertaining that aspect of multi-tenanting.


This is going slightly off-topic, but since we're there: I don't see that there would be much value in a multi-tenant database when it is easy enough to roll a new database for each tenant.

Microsoft AX has a multi-tenant database, which is technically interesting, but a right pain to manage, or to deconstruct if you want to remove a whole tenant.

The only slightly reasonable argument I know of for multi-tenant is for complex enterprises made up of multiple legal entities who may nonetheless require similar GL structures, and say Inventory. But with SQL Server, it's also not difficult to share data between databases - you can create views that look into another database for common data (say GL configuration).

Likewise, it's relatively easy (conceptually) to build a 'consolidated' view of multiple identical SQL databases by having views that use the 'UNION' of data from multiple databases. And given that JIWA's reporting is all driven out of SQL queries and Crystal Reports anyway, it would be easy to add a (hard-coded) 'TenantId' column for each database in a multi-database UNION query, and then report on them by tenant in a consolidated report. I know, because I've done it before (not for JIWA; for an in-house bespoke system at a former employer, but the technique is sound).
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
User avatar
pricerc
Jiwa Kohai
Jiwa Kohai
 
Posts: 226
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 6

Re: Small Mac-based site.

Postby pricerc » Sun Mar 22, 2020 3:11 pm

Mike.Sheen wrote:You're making my palms sweaty just thinking about what this would involve! - not just the application, but increased burden on support, documentation and the like in dealing with the introduced complexities.


Ok, without sneaking around in de-compiled code, I wouldn't have expected it to be very difficult. But I've been known to make things sound more complicated than they are (and vice versa)!

For a bit more context, some more feedback from my 'expert':
Well, I figured out I could force CrossOver to install the C++ Redist, and that went fine. But yeah, when trying to run the packaged SQL Server installer it gave some error (I can't remember quite what)

The Jiwa MSI will actually run, which is more progress than originally, but it still gives that some error of Windows Installer Version. I wonder if there are any launch arguments that would force it to use a different version?


So the thing that was show-stopping JIWA from installing was a SQL Server redistributable that I presume is embedded into the JIWA installer.

My *hope* was that it would not be too hard to create a version of the installer that leaves out the SQL Server redistributable(s).

From a JIWA UI perspective, I would expect the only change to be that the [Databases...] button (on the login screen) is disabled for a 'client-only' installation (when the SQL Server Redistributable(s) is/are missing); nothing else would need change in the front-end.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
User avatar
pricerc
Jiwa Kohai
Jiwa Kohai
 
Posts: 226
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 6

Re: Small Mac-based site.

Postby Mike.Sheen » Sun Mar 22, 2020 6:48 pm

pricerc wrote:Ok, without sneaking around in de-compiled code, I wouldn't have expected it to be very difficult. But I've been known to make things sound more complicated than they are (and vice versa)!


pricerc wrote:From a JIWA UI perspective, I would expect the only change to be that the [Databases...] button (on the login screen) is disabled for a 'client-only' installation (when the SQL Server Redistributable(s) is/are missing); nothing else would need change in the front-end.


It's not so much the code we write, it's more about assemblies we have which will fail to load because dependant assemblies are not present. Isolating ourselves from something being present or not means completely changing the way our code interacts with those what would now be optional dependant assemblies. We could do it, but it means making us prone to problems the compiler would normally prevent us from compiling and shipping code with. I'm thinking we'd need to late-bind assemblies, which is where I see the problems arise.

It'll mean we leave more potential problems to surface at the end user side of things instead of our compiler telling us problems up front well before shipping the build of the software. Been there, done that - pissed off plenty of users - not a place I want to be again.

By all means, prove me wrong - I love to learn and am happy to concede when my opinions are proven wrong. Being wrong isn't a problem for me - and like I said - I love to learn, so if you've got a strategy to offer - I might not know about it (nobody has time to know every possibility) - please do share!

I appreciate the ideas, and I encourage all suggestions - so please don't feel like I've tried to shut down your idea - I'm just playing the devils advocate.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Jiwa Shihan
Jiwa Shihan
 
Posts: 1640
Joined: Tue Feb 12, 2008 11:12 am
Location: North Sydney
Topics Solved: 522

Re: Small Mac-based site.

Postby pricerc » Sun Mar 22, 2020 8:16 pm

Mike.Sheen wrote:assemblies we have which will fail to load because dependant assemblies are not present


I appreciate all that. But you've now made me even more curious.

I haven't dealt with SQL localdb as a developer before, so poking around on the Interwebs, I was slightly surprised to discover that it's basically a nearly complete SQL Server Express installation.

So while I've appreciated it when installing JIWA for testing and development, it nonetheless seems slightly weird that it should be a mandatory feature in a client installation, when on a production network only one person needs to create a database and, arguably, it should almost never be the customer! And it will not normally be local to the user's machine.

Let me put it another way: On any production network with an actual SQL Server, are we not installing a product (SQL Server Express) on every client computer that they should *not* be using?

Are there places other than the 'databases' dialog where you need access to the LocalDB API or other SQL's *Server* functionality - e.g. the ability to *create* a new database ?
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
User avatar
pricerc
Jiwa Kohai
Jiwa Kohai
 
Posts: 226
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 6

Re: Small Mac-based site.

Postby pricerc » Sun Mar 22, 2020 10:24 pm

Mike,

I think you may underestimate the resilience of your own code :D

Never one to let a challenge go unanswered (at least not a computer-y one where I figure I have a fighting chance of success).

I installed Jiwa on my 'other' computer, which didn't previously have it. I then uninstalled SQL Local DB.

When I started Jiwa, the 'First run dialog' made an attempt to create a new demo database; well at least such a message box popped up.

I got distracted so looked away from my screen, and when I looked back, Jiwa was at the login screen, except with no connection to choose from. And no error messages.

If you subsequently attempt to create a database using the localdb, you get an error message: "Failed to connect to server".

Based on this (very limited) testing, it would appear that you don't need to have a copy of SQL Express LocalDB installed on the computer for Jiwa to work. You just won't be able to use the LocalDB.

I was still able to create a demo database on a SQL Server on my network.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
User avatar
pricerc
Jiwa Kohai
Jiwa Kohai
 
Posts: 226
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 6

Re: Small Mac-based site.

Postby Mike.Sheen » Sun Mar 22, 2020 10:40 pm

pricerc wrote:Let me put it another way: On any production network with an actual SQL Server, are we not installing a product (SQL Server Express) on every client computer that they should *not* be using?


Not quite. Those same components are what we use to talk to any SQL Server to create a database, or even upgrade it. We don't install the full SQL Express on every client, we do install components which facilitate LocalDB which is not really the same as the full SQLExpress. Those same components are what we use to talk to ANY SQL Server - LocalDB, SQL Express or otherwise.

LocalDB is just a single process, zero config version of SQL Server express - it's not the same as the full SQL Express. I talk about this here in this post from Feb 2015.

We added this to the installation to try and lower the bar of installation complexity, and make it possible for users to try Jiwa and not having to concern themselves with installing and configuring a SQL Server.

pricerc wrote:Are there places other than the 'databases' dialog where you need access to the LocalDB API or other SQL's *Server* functionality - e.g. the ability to *create* a new database ?


I'll run a script to walk the dependency tree of our assemblies and give you an authoritative answer to that - but my memory right now says it's everything.

What I mean by that is the JiwaApplication.Manager has a dependency on these assemblies, and everything Jiwa depends on that. JiwaSales.dll for example does not need the Microsoft.SQLServer.Dac assembly, but JiwaApplication.dll does - you cannot load JiwaSales.dll without JiwaApplication.dll and you cannot load JiwaApplication.dll without Microsoft.SQLServer.Dac.dll.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Jiwa Shihan
Jiwa Shihan
 
Posts: 1640
Joined: Tue Feb 12, 2008 11:12 am
Location: North Sydney
Topics Solved: 522

Re: Small Mac-based site.

Postby Mike.Sheen » Sun Mar 22, 2020 11:01 pm

pricerc wrote:Based on this (very limited) testing, it would appear that you don't need to have a copy of SQL Express LocalDB installed on the computer for Jiwa to work. You just won't be able to use the LocalDB.

I was still able to create a demo database on a SQL Server on my network.


But could you actually do anything? Like load a sales order? I would have thought anything depending on JiwaApplication.dll which JiwaSales.dll does would have failed to load due to missing dependencies.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Jiwa Shihan
Jiwa Shihan
 
Posts: 1640
Joined: Tue Feb 12, 2008 11:12 am
Location: North Sydney
Topics Solved: 522

Re: Small Mac-based site.

Postby pricerc » Sun Mar 22, 2020 11:11 pm

Mike.Sheen wrote:
pricerc wrote:Based on this (very limited) testing, it would appear that you don't need to have a copy of SQL Express LocalDB installed on the computer for Jiwa to work. You just won't be able to use the LocalDB.

I was still able to create a demo database on a SQL Server on my network.


But could you actually do anything? Like load a sales order? I would have thought anything depending on JiwaApplication.dll which JiwaSales.dll does would have failed to load due to missing dependencies.


yes.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
User avatar
pricerc
Jiwa Kohai
Jiwa Kohai
 
Posts: 226
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 6

Re: Small Mac-based site.

Postby pricerc » Sun Mar 22, 2020 11:45 pm

Mike.Sheen wrote:
pricerc wrote:Let me put it another way: On any production network with an actual SQL Server, are we not installing a product (SQL Server Express) on every client computer that they should *not* be using?


Not quite. Those same components are what we use to talk to any SQL Server to create a database, or even upgrade it.
...
Those same components are what we use to talk to ANY SQL Server - LocalDB, SQL Express or otherwise.


But you don't need SQL Server installed on your own computer to do any of those things, you just need the connectivity/client tools.

Mike.Sheen wrote: We don't install the full SQL Express on every client, we do install components which facilitate LocalDB which is not really the same as the full SQLExpress.
...
LocalDB is just a single process, zero config version of SQL Server express - it's not the same as the full SQL Express.


But she's pretty close.

I started my reading @ https://docs.microsoft.com/en-us/archive/blogs/sqlexpress/introducing-localdb-an-improved-sql-express. Even in 2011, at 140MB, a LocalDB installation was pretty big. And the way I read it, LocalDB is basically a SQL Express installation without a pre-defined SQL Instance and associated services. It spins up a 'server process' when you 'connect' to a LocalDB instance, but has pretty much most of the features and limitations of the 'full' SQL Express.

Mike.Sheen wrote:We added this to the installation to try and lower the bar of installation complexity, and make it possible for users to try Jiwa and not having to concern themselves with installing and configuring a SQL Server.


It's really quite clever; it really impresses people when they fire it up the first time. And I'm glad it's there.

I was just wondering if it there is a good argument to make it an optional component in the installer. Or to have 'Full Fat' and 'Low Fat' installers.

It's been a while since I had to do a proper installation package, but I know they're tricky. I last did one using WIX back in about 2010. It was for a product with multiple optional components, including applications, services and web services. So I have some understanding of the amount of work involved. But I also know that it can be done. In this case, I imagine the simplest approach would be to fork the installer project and remove the LocalDB redistributable from the fork.

Unfortunately, my business case for a skinny installer is still hypothetical (making it run under WINE or Crossover for Mac), which is why I'm not raising it as an enhancement request (yet).
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
User avatar
pricerc
Jiwa Kohai
Jiwa Kohai
 
Posts: 226
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 6

Re: Small Mac-based site.

Postby SBarnes » Mon Mar 23, 2020 8:27 am

Even with getting it to install and run under some sort of environment on the Mac, as a side issue won't one of the biggest hurdles be possibly trying to then get it to print as Jiwa's print setup is pretty windows specific?
Regards
Stuart Barnes
stuart@attkey.com.au
SBarnes
Jiwa Sensei
Jiwa Sensei
 
Posts: 816
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 71

PreviousNext

Return to Technical / Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron