Recent

Author Topic: Different apps - common objects  (Read 1521 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 10445
Re: Different apps - common objects
« Reply #30 on: September 15, 2020, 03:45:23 pm »
I agree with Avra.
Indeed I do
Quote
Back when I started doing this sort of thing in about 2000
Toddler.

To stay on subject, you can have exports in executable. (both nix and windows). It is just not very easy to get it right.

And in this case, take a step back... pause...think.. and make a better design.
« Last Edit: September 15, 2020, 03:52:57 pm by Thaddy »
When you ask a question that is actually answered in the documentation, you are either lazy or a moron.

MarkMLl

  • Hero Member
  • *****
  • Posts: 1217
Re: Different apps - common objects
« Reply #31 on: September 15, 2020, 04:17:34 pm »
Quote
Back when I started doing this sort of thing in about 2000
Toddler.

:-) I meant that I was looking for a decent multiuser database in about 2000, and to get such a thing you typically had to raise your head above the parapet and commit to a relationship with IBM or Oracle. For a while I used the SOLID database ("with bonsai tree technology") but that was bought up (possibly by IBM) and their business model became restrictive. MySQL (I can't remember whether that was distinct from mSQL) didn't support transactions... fortunately PostgreSQL v6 (?) had just been released which ticked all the boxes.

Before that there were things like Btrieve (became part of Netware) and C-Tree. C-Tree was actually a library, but made waves in about '89 by releasing network support... I can't remember exactly how it worked, but it wasn't just by sharing files and hoping the locking worked.

But my point is: these days you can get Postgres free, or MariaDB (formerly MySQL) if you feel like slumming it. Not to mention Firebird obviously, although IME it's let down by its poor documentation. There is NO EXCUSE for trying to bodge multi-client stuff on top of a database which hadn't been designed for it.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

Birger52

  • Sr. Member
  • ****
  • Posts: 270
Re: Different apps - common objects
« Reply #32 on: September 15, 2020, 07:23:08 pm »
Building my database is done by a separate program, that has nothing to do with my 4 apps here.
I was not complaining about the speed - it gathers information from 4500 files in different forms of formats - and it needs to take the time it does.
Anyhow - updates are done in 2-5 minutes depending on how many updates there are.
And that's OK.

From sqlite.org:
"SQLite supports an unlimited number of simultaneous readers, but it will only allow one writer at any instant in time. For many situations, this is not a problem. Writers queue up. Each application does its database work quickly and moves on, and no lock lasts for more than a few dozen milliseconds. But there are some applications that require more concurrency, and those applications may need to seek a different solution."
I can't find anywhere saying this "unlimited number of simultaneous readers" has to be in the same app.
My apps will never be able to que more than one write operation at a time.
Don't see the problem...

And why would I use client/server, when it is not needed?
Why would I use web technology, when it will ever only run one one PC?

Well - don't answer, I'm not going into that discussion.
Question was, if it is possible to use the same object in different apps - not whether  clever people think I have thought things through, and/or evaluated every possible solution..
Lazarus 2.0.8 FPC 3.0.4
Win7 64bit
Playing and learning - strictly for my own pleasure.

avra

  • Hero Member
  • *****
  • Posts: 1998
    • Additional info
Re: Different apps - common objects
« Reply #33 on: September 15, 2020, 11:31:11 pm »
My apps will never be able to que more than one write operation at a time.
Don't see the problem...
Well, if there wasn't a problem you wouldn't be using a registry and app messaging for synchronization. You would be using SQLite for all that instead. That is why people are telling you how to ease your self with a better design.

And why would I use client/server, when it is not needed?
Jamie has given you a link and explanation how to create a chunk of memory shared by several applications and managed by "control app". Does that ring a client/server bell? I have told you that having multiple masters is rarely a good thing and told you that you need a single server app that holds that shared memory block and clients that talk to it. Does that also ring a client/server bell to you?

Why would I use web technology, when it will ever only run one one PC?
Who said you have to? Let me quote my self what you can use "... or any other communication protocol for reading/writing data and events, or executing remote procedures". You can use TCP/IP, UDP, IPC, windows messages, message queue or what ever you like as "other communication protocol".

Well - don't answer, I'm not going into that discussion.
It is your right not to participate in further discussion, but you can not forbid anyone answering a question you have made in a public forum.

Question was, if it is possible to use the same object in different apps - not whether  clever people think I have thought things through, and/or evaluated every possible solution..
As I have shown your question has been answered but you didn't like the answers. As for the clever people remark, I think that clever people were the ones who have first identified and solved such problems long time ago. Some other clever people are standing on their shoulders, improving their ideas and providing us better and better tools. The rest of us are just users enjoying doing more and more with less and less work on our side, which allows complexity to rise up.

Enough said. I'm out of this discussion.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

MarkMLl

  • Hero Member
  • *****
  • Posts: 1217
Re: Different apps - common objects
« Reply #34 on: September 16, 2020, 08:25:24 am »
Enough said. I'm out of this discussion.

As am I, but I hope that we will continue interacting with OP on other issues more successfully.

Is there a button which unmarks a thread of messages so that it no longer appears in the "Sho Replies" list?

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

 

TinyPortal © 2005-2018