Welcome, Guest. Please login or register.

Author Topic: Datatypes and boopsi architecture documents?  (Read 4252 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline hth313Topic starter

  • Newbie
  • *
  • Join Date: Aug 2018
  • Posts: 20
  • Country: 00
  • Gender: Male
    • Show all replies
Datatypes and boopsi architecture documents?
« on: June 30, 2019, 10:53:21 PM »
Having messed around inside some datatype code I begin to wonder if there is any good in depth architecture description of it?

I mean, there are attributes to be set, asynchronous layout, notification and then rendering going on. The descriptions I found are some example code and very basic descriptions of how to do it, but I have yet to find an in depth description of how it is actually supposed to work. What are the roles, responsibilities, in which order does it happen, how to do proper locking and how does typical things happen over time?

I have looked at some code and even tried to address some issues in it, but it is hard to fully comprehend it. That is also based on object oriented programming does not help (as usual), as it is all about delegating and not explicitly expose how it works, which makes it hard to follow.

So far my idea is that changes somehow cause a layout (not sure how), which can be kicked off asynchronously internally, which sends a notification that is picked up by another object or more often the IDCMP in the main app, which does a RefreshDTObjects which translates to a rendering operation. Normally the layout and renderer have a semaphore to prevent simultaneous access, which I suppose are not to happen so often in reality as they are kind of chained together in sequence by these object messages, as otherwise the renderer could get blocked (holding a layer lock) waiting for the object semaphore when a slow layout is being done.

I may have misunderstood things above, a pointer to a good architecture description would probably be very helpful to me...
 

Offline hth313Topic starter

  • Newbie
  • *
  • Join Date: Aug 2018
  • Posts: 20
  • Country: 00
  • Gender: Male
    • Show all replies
Re: Datatypes and boopsi architecture documents?
« Reply #1 on: July 01, 2019, 05:01:03 PM »
Yes, I have all of them.
 

Offline hth313Topic starter

  • Newbie
  • *
  • Join Date: Aug 2018
  • Posts: 20
  • Country: 00
  • Gender: Male
    • Show all replies
Re: Datatypes and boopsi architecture documents?
« Reply #2 on: July 01, 2019, 10:26:20 PM »
OK, I had a hunch about that. The documentation is mostly aimed at developers using datatypes, not so much about implementing them. I suppose I need to read some source then and try to figure out how the methods and threads are supposed to interact.
 

Offline hth313Topic starter

  • Newbie
  • *
  • Join Date: Aug 2018
  • Posts: 20
  • Country: 00
  • Gender: Male
    • Show all replies
Re: Datatypes and boopsi architecture documents?
« Reply #3 on: July 03, 2019, 04:59:32 AM »
It seems some source reading is the best way forward at the moment. I found a couple of pages with some information on how to implement datatypes. A quick look indicates that they both contain a good amount of information, but fall a bit short in describing the actual interactions between involved processes and the internal states for a non-trivial datatype. Basically, what I miss is a cook-book with best practises, but I suppose you cannot have it all.

References (for the benefit of anyone interested and who may stumble on this thread in the future):
https://en.wikibooks.org/wiki/Aros/Developer/Docs/Libraries/DataTypes
https://wiki.amigaos.net/wiki/Writing_Datatype_Classes
 

Offline hth313Topic starter

  • Newbie
  • *
  • Join Date: Aug 2018
  • Posts: 20
  • Country: 00
  • Gender: Male
    • Show all replies
Re: Datatypes and boopsi architecture documents?
« Reply #4 on: July 05, 2019, 07:14:41 AM »
I downloaded several of Stefan Ruppert's datatypes from aminet, seems like a lot of good stuff!

There are plenty of datatypes on aminet as NinjaCyborg points out, I will have a lot to play with for long time.