You are not logged in.
Pages: 1
Hello!
Quick solution needed, as usual.
Please, advice me about using parts of mORMot Framework for building of lightweight https server.
At front-end it should have https connection pool, at back-end - oracledb session pool.
Looks like this great framework meets all my needs and even much more.
Can you confirm it, please?
And I would be very grateful for some hints and/or samples for start.
Offline
See http://synopse.info/files/html/Synopse% … #TITLE_250 and http://synopse.info/files/html/Synopse% … l#TITL_122 for the https server.
It handles IOCP, so could handle thousands of connections, then use a thread pool.
Then you could access to Oracle using our SynDBOracle unit, from interface-based services.
See http://synopse.info/files/html/Synopse% … ml#TITL_63
and https://tamingthemormot.wordpress.com/2 … databases/
Offline
ab, thanks for fast responce.
Just one clarification.
Is it possible to have 100 http connection (thread pool) at front-end and 10 db session (db session pool) at back-end?
Or only 100 -> 1 (main) or 100 -> 100 (per each)?
Offline
You could have 10,000 HTTP connections, and only 1 Oracle connection, for instance.
Or 10,000 HTTP connections, and e.g. 32 Oracle connections, one per thread pool in the HTTP.
Whatever combination you need.
Offline
Hi, ab.
If I want to use the second choise (10,000 HTTP connections, and e.g. 32 Oracle connections). How I can do that?
Offline
Leave the default HTTP ThreadPool to its default 32, and use TSQLDBConnectionProperties.Execute or NewThreadSafeStatementPrepared to have one connection per thread.
Then, since http.sys is IOCP based, you could have 10,0000 HTTP connections, working on the 32 threads.
Offline
Thank's ab.
Offline
Leave the default HTTP ThreadPool to its default 32, and use TSQLDBConnectionProperties.Execute or NewThreadSafeStatementPrepared to have one connection per thread.
Then, since http.sys is IOCP based, you could have 10,0000 HTTP connections, working on the 32 threads.
And what about THttpApiServer? I didn't see any thread pool in this class.
Offline
ab, looking on "09 - HttpApi web server", "13 - StandAlone JSON SQL server" and If I right understood it so far.
If I'll use only THttpApiServer, I'll have only one working thread (main process) and 10,000 waiting http(s) connections.
If I need thread pool, I should use TSQLHttpServer. And these 10,000 connections will be processed by 32 (by default) threads and each of them has 1 db session.
Waiting queue is managed by os (in "http.sys").
1. Is it right?
2. Is it possible to control max count of waiting connections (10,000)?
3. What kind of TSQLRestServer should I use in TSQLHttpServer.Create if i want (at least now) custom process requests and responces content?
Offline
1. Yes. But you can also create several THttpApiServer instances, pointing to the same Process method.
2. Use MaxConnections property.
3. If you want just to expose services, the SQlite3 engine is not needed: you could use a simple TSQLRestServerFullMemory.
Offline
1. Yes. But you can also create several THttpApiServer instances, pointing to the same Process method.
And I can also call THttpApiServer.Clone(32), right?
Offline
It works.
ab, merci beaucoup pour le code source soigné.
Offline
Pages: 1