3-tier

3-tier

Post by Marti » Fri, 29 Jul 2005 17:51:23



Hi,
Beeing new to this area, this might seem ignorant, but...
I want to create a 3-tier application with a database backend, a middle tier and a client.
The question is about the middle tier, the application server. I want it to keep persistent data and objects loaded from the database. It shld communicate with multiple clients over the internet and not be instantiated as new clients connect.

I've been thinking about a web service, but hosted by the IIS it seems to instantiate with every request, right?

Communication between client and app server could be xml and the possability to transfer objects would be nice.

Any input is certainly appreciated.

/M
 
 
 

3-tier

Post by Guille » Fri, 29 Jul 2005 23:54:31

Hi,

"Martin" < XXXX@XXXXX.COM > escribien el mensaje
>> >> Hi, >> Beeing new to this area, this might seem ignorant, but...

as they say in Germany, "no master falled from heaven" :)
>> I want to create a 3-tier application with a database backend, a middle >> tier and a client. >> The question is about the middle tier, the application server. I want it >> to keep persistent data and objects loaded from the database. It shld >> communicate with multiple clients over the internet and not be >> instantiated as new clients connect.

A service could be an option, but i tend to program application servers as
GUI apps, so that an administrator can perform some configuration,
statistics and other works without having to use directly the RDBMS, or for
works which have nothing to do with the database itself. An example of these
could be managing the list of authorized users/apps.

How to communicate with your clients depend on if you want to use blocking
or non-blocking sockets, multi-threading or not, etc. For non-blocking,
single-threaded, event-driven communication i would suggest to use ICS. If
you want to have blocking sockets, multi-threaded, non-event-driven
communication, then Indy is your library. Both are free to use, although i
don't know if you have to pay ICS for commercial apps. About this, you could
contact Francois Piette or connect to www.overbyte.be and see it yourself.

Now, i can tell you a little bit about using Indy. In fact, it's as easy as
to put a TidTCPServer in your app server, implement the OnExecute event
handler for it to serve your clients and that's all. For every client that
connects, a separate thread is created and the code contained in the
OnExecute is triggered.

You can use the TidTCPServer to send files, or alternatively, you can use a
TidFTPServer for that. Another variant is to use a TidCmdTCPServer, which is
a descendant of TidTCPServer that allows you to work with commands.
>> >> I've been thinking about a web service, but hosted by the IIS it seems to >> instantiate with every request, right?

in this i can't help you
>> >> Communication between client and app server could be xml and the >> possability to transfer objects would be nice.

See my comments above
--
Best regards :)

Guillem Vicens
Dep. Informica Green Service S.A.
www.clubgreenoasis.com

 
 
 

3-tier

Post by Marti » Mon, 01 Aug 2005 03:07:46


Thanks a lot Guillem,

I'll have a look at ICS and Indy.

/Martin


>>> >>> Hi, >>> Beeing new to this area, this might seem ignorant, but... >> >>as they say in Germany, "no master falled from heaven" :) >> >>> I want to create a 3-tier application with a database backend, a middle >>> tier and a client. >>> The question is about the middle tier, the application server. I want it >>> to keep persistent data and objects loaded from the database. It shld >>> communicate with multiple clients over the internet and not be >>> instantiated as new clients connect. >> >>A service could be an option, but i tend to program application servers as >>GUI apps, so that an administrator can perform some configuration, >>statistics and other works without having to use directly the RDBMS, or for >>works which have nothing to do with the database itself. An example of these >>could be managing the list of authorized users/apps. >> >>How to communicate with your clients depend on if you want to use blocking >>or non-blocking sockets, multi-threading or not, etc. For non-blocking, >>single-threaded, event-driven communication i would suggest to use ICS. If >>you want to have blocking sockets, multi-threaded, non-event-driven >>communication, then Indy is your library. Both are free to use, although i >>don't know if you have to pay ICS for commercial apps. About this, you could >>contact Francois Piette or connect to www.overbyte.be and see it yourself. >> >>Now, i can tell you a little bit about using Indy. In fact, it's as easy as >>to put a TidTCPServer in your app server, implement the OnExecute event >>handler for it to serve your clients and that's all. For every client that >>connects, a separate thread is created and the code contained in the >>OnExecute is triggered. >> >>You can use the TidTCPServer to send files, or alternatively, you can use a >>TidFTPServer for that. Another variant is to use a TidCmdTCPServer, which is >>a descendant of TidTCPServer that allows you to work with commands. >> >>> >>> I've been thinking about a web service, but hosted by the IIS it seems to >>> instantiate with every request, right? >> >>in this i can't help you >> >>> >>> Communication between client and app server could be xml and the >>> possability to transfer objects would be nice. >> >>See my comments above >>-- >>Best regards :) >> >>Guillem Vicens >>Dep. Informica Green Service S.A. >>www.clubgreenoasis.com >>-- >>in order to contact me remove the -nospam >> >>
 
 
 

3-tier

Post by Francois P » Mon, 01 Aug 2005 04:15:14

> For non-blocking, single-threaded, event-driven communication i would

ICS do not require multithreading in order o server many clients. But of
course you can use multithreading if you need it, for example to execute
lengthy SQL requests. If you can manage to have requests executed fastly,
then a single thread will be able to server 10 to 100 clients, depending on
what processing is needed.


ICS is really freeware. There is nothing to pay to use it in any kind of
application. Well, you must register by mailing a picture postcard to me.
You can call ICS a "Postcardware" :-)

btw: beside ICS, I also developped a multi-tier framework called MidWare. It
is also freeware with source code but this one is restricted to non
commercial use. If you want to use MidWare in a commercial application, you
must buy a license. MidWare is really higher level. It use ICS as transport
but expose an Object Request Broker that will instanciate you classes to
handle each request comming from client to the application server. MidWare
is the glue between you application processing at server side and client
side. MidWare is used at both side to each programming a true multi-tier
architectured application. See my website for more details.

--
Contribute to the SSL Effort. Visit http://www.yqcomputer.com/