			     -*- text -*-

		       Notes for DGS developers

1. NEWS
2. TODO
3. TCP Wrapper

---
1. NEWS (for more detail, see ChangeLog): 

* Sat Jan  1 22:46:48 2000, Masatake YAMATO

 Improve the behavior of GC.

* Tue Dec 28 18:43:28 1999, Masatake YAMATO

 Tcp wrap support by Shirasaki Yasuhiro  <yasuhiro@gnome.gr.jp>.

* Tue Dec 28 18:26:07 1999, Masatake YAMATO

 Automatic rpm generation supports.
 `rpm' is a target of Makefile.
 
 dist, a makefile target is supported.

* Sun Dec 26 03:30:48 1999, Masatake YAMATO

 dgs-config.

* Sat Dec 25 15:07:11 1999, Masatake YAMATO

 Some commands that conflicts with commands in 
 normal gs distribution are never installed.

* Tue Nov 30 16:33:22 1999, Masatake YAMATO

 Enable garbage collector again.

* Mon Nov 29 02:02:27 1999, Masatake YAMATO

 Remove a serious bug. Now DPS server dies if
 the associated X server dies.

* 0.5.8 is released.

* Sat Sep 18 01:58:15 1999, Masatake YAMATO

 Improved the help message of dpsnx.agent.
 
 Adam Fedor Improved functions in zmatrix.c.
 
 Handle USR1 signal.
 -- Entrance server prints pid of agents(children).
 -- Agents prints the pid of their entrance server(parent).
 USR1 is reserved by LinuxThread, this future should be 
 removed or re-implemented.
 Use wait instead of wait3.
 
* Mon Sep  6 03:57:51 1999, Masatake YAMATO
 
 Codes that terminates contexts are written
 but we need more work.
 
* Sun Sep  5 23:05:11 1999, Masatake YAMATO

 Drawable offsets is now put into Margins fields.
 They were put into CTM tx and ty.
 texteroids now runs well without changing the arguments
 for ITransform but we need more work.

* Sat Sep  4 02:11:16 1999, Masatake YAMATO

 Context switching code is a bit improved.

 Result of dpsmark(in gtkDPS) is 8.493350.
 Before improvement, the result was 9.485150.

 Pause notify and resume event handling is improved
 when there are more than two paused context.
 
* Thu Aug 26 19:27:20 1999, Masatake YAMATO

 Byteorder handling is improved.
 It is acceptable to run clients and dgs server run 
 on different byteorder machine.

 There are still bugs. 
 dpsexec runs well but texteroids doesn't run.

* Wed Aug 11 06:03:21 1999, Masatake YAMATO

 Multiple context server boots. texteroids, dpsexec
 and gyve runs on it.

 It is still slow and buggy. See `gsdpsx_std_read_process.' 
 to know how to switch context. 
  
* Fri Jul 30 18:47:23 1999, Masatake YAMATO

 Now dgs requires glib. 

 Get glib from http://www.gtk.org/
 
* Sun Jul  4 21:12:48 1999, Masatake YAMATO

 Simplify gsdpsx_std_read_process.
 Add buf_* functions set.

* Sun Jun 20 00:12:29 1999, Masatake YAMATO

 Added pseudo context switching mechanism.
   -- switching matrix and drawable only.
   -- This is test implementation.
   -- taged PSEUDO_CONTEXT_SWITCHING.

* Thu Jun 17 05:28:46 1999, Masatake YAMATO

 You can change mode of debug via arguments passed to dpsnx.agent.
 
 % dpsnx.agent debug=n
 (n=unsigned int). 
 if n is zero, debug printing is disable and this is default.

 Known bug:
 If you make the size of the window max to display, you'll find
 a black out area...

* Mon May 31 04:23:29 1999, Masatake YAMATO

 Now the garbage collector works fine.
 Memory related bugs in dgs code are fixed(There were two bugs).
 See ChangeLog for more details.
 
* Sat May 29 06:29:17 1999, Masatake YAMATO

 Ports looking up routines are improved.
 You can specify port number when you call dpsnx.agent directly.
 
 dpsnx.agent tcp/N
 N means the port number.

 e.g.
 $ dpsnx.agent tcp/6016

* Thu May 13 05:39:23 1999, Masatake YAMATO

  The dgs server accept TCP connection and UNIX connection 
  at a time if the client runs on the same host of the server
  or the architecture of the host where the client runs has
  same byteorder of the architecture of the host where the 
  server.

  These problmes still are remained.

    2. Don't care connection byte order.

    3. The arguments for dpsnx.agent should be checked.

  About byteorder:

  x86 -> 'l'
  alpha -> 'l'
  mips -> 'B'
  sparc -> 'B'
  powerpc -> 'B'?

* Tue May 11 23:35:37 1999, Masatake YAMATO

  Following bug is solved:
  1. signals in select(2) is not handled now.
  
* Tue May 11 23:35:37 1999, Masatake YAMATO

  * DGS server listens two sockets, Internet domain and Unix domain socket
    at a time. But still buggy in three reasons.

    1. signals in select(2) is not handled now.

    2. Don't care connection byte order.

    3. The arguments for dpsnx.agent should be checked.

* Fri Apr 30 08:12:23 1999, Masatake YAMATO

  * The bug that appears when two texteroids runs at a time is fixed.
   (This bug is reported by Adam Fedor<fedor@gnu.org>.)

   Now each agent has its own window(agent_win).
   The problem is the code to create agent own window.
   See proc_agent_setup_window and its loop.

* Sat Apr 24 07:29:26 1999, Masatake YAMATO

  * a PS program, `mark { (xxx) print } fork' runs well on dpsexec.

  * Added dpsnext device to dgs server. Now, setalpha, currentalpha, etc
    are defined. However setalpha don't work well on X.

* Wed Apr 14 18:54:23 1999, Masatake YAMATO

  Following bugs seems to be fixed.

    +  Clients are fail to grab X server and crush if the client
       launches dgsnx.agent. If the anget already runs the client
       runs well. 

    + dgs server gets SIGPIPE at XGetWindowProperty in conn_atom_cleanup().

    + Broken font path. This was my mistake. (By Adam Fedor).

  * Signal related code is not portable.

* Thu Apr  8 21:30:58 1999, Masatake YAMATO
  
  New features:

  * Fork based server mode is implemented.

  * Split gs_startXdpsagent() into many small functions.


---

2. Todo

  See also 
  http://www.aist-nara.ac.jp/~masata-y/dgs/todo.html

  * Destroy context and overtimes `free' at shutdown time
  -- Handle mask and notify.
  
  * Improve drawable offsets mechanism and their related 
  operators

  * Shell scripts or GUI app that stop/restart/dump running
  dpsnx.agent.

  * More kind of DPS events handling 
  -- there are only stubs.

	Not defined well?:
	- dps_CreateSecureContext
	- dpscap_FlushAgent

        Not inspected:
	- dpscap_Notify_grab
	- dpscap_Notify_ungrab
	- dps_NotifyWhenReady
	- dps_NotifyContext_unfreeze

	Maybe difficult:
	(GC is not shared with dgs server and its 
	clients now.)
	- dpscap_Notify_freegc
        - ChangeGC

        (What is space?)
	- dps_DestroySpace
	- dps_CreateSpace

	(Roll back?)
	- dps_NotifyContext_interrupt
	- dps_Init
	- dps_Reset

  * Sync up with gs6.0.

  * X11alpha device
	
  * Space

  * Shared memory                    
  
  * Alpha architecture(DIGITAL UNIX?)

  * Introduce gs's debugging procedures.

  * Other performance optimizing including multiple threading


---
3. TCP Wrapper

If you install tcp wrapper and configure script of dgs detects it, dgs
uses tcp wrapper. Normally dps clients communicate with dgs via
UNIXCONN. However if a dps client try to communicate with remote dgs
server via TCPCONN, only a client that runs on a host allowed in
/etc/hosts.allow can communicate with the dgs server.

Here is an example of /etc/hosts.allow: 
dgs : evil-host.local.net : DENY
dgs : .local.net : ALLOW
dgs : dgs-client.another.net : ALLOW
dgs : ALL : DENY
