What is the best source for templates / best practices for working with a server?

I was looking for some time for a good book that covers templates created by the server. I'm looking for something along the lines of "Gang of Four."

The concepts include:

- Threaded vs Process vs combo based solutions

- How to sort queries correctly. those. I expect only limited requests from any domain, so I can only allocate a certain number of workers per domain. - Timers
- polling / selection / epoll usage examples
- And those things that I do not know!

Any suggestions please!
Thanks!

+4
source share
2 answers

Two very useful books:

The Enterprise Integration Book Templates provide consistent vocabulary and visual notation to describe large-scale integration solutions in many technology implementations. He also explores in detail about the advantages and limitations of asynchronous message architecture. You will learn how to project code that connects applications to the messaging system, how to send messages to the desired destination, and how to control the health of the messaging system. The templates in the book are agnostic technologies and come to life with examples implemented in different messaging technologies such as SOAP, JMS, MSMQ, .NET, TIBCO and other EAI Tools.

+3
source

Advanced Unix programming, 2nd Edition is a fantastic resource for learning the details of programming Unix systems. This is extremely well written (one of my favorite books in English), the depth is excellent, and attention to the four common environments (at the time of publication) helps to ensure good rounding. This is not so badly outdated - new features in new operating systems can be fantastic for specific problems, but this book describes the basics very well.

The disadvantage, of course, is that APUE2nd skips some fantastic third-party tools, such as libevent , which can program socket-based servers much easier. (And it automatically selects the "best" select(2) , poll(2) , epoll(4) , kpoll and Windows event processing for the platform.)

As for the choice between threads and processes, it boils down to: how much memory exchange do you want / need between tasks? If each process can work in relatively isolation, the processes provide better memory protection and no speed limits. If processes need to interact with each other with objects or objects that belong to the same thread, then threads provide the best primitives for sharing data. (But many argue that shared thread memory is an invitation to interesting and exciting errors. Depends.)

+1
source

All Articles