문제

When talking about APIs, the terms "coarsely grained" or "finely grained" are used a lot. What do these mean/are there any examples?

Thanks

도움이 되었습니까?

해결책

I've seen the distinction used a lot with SOA, e.g.:

http://www.ibm.com/developerworks/webservices/library/ws-soa-granularity/

Basically, coarse-grained systems will have less method calls than a fine-grained system. Clearly coarse-grained methods will be fewer and do more work than the broken-down fine-grained versions.

Coarse grained interfaces will generally be better where calls are expensive, in a distributed system for example.

다른 팁

Often in reference to FPGA's (Field Programmable Gate Arrays) smallest logic element. If it's, for example, a NAND gate, it is considered fine grained. If it's a complex logic block capable of MANY NAND equivalences, it is coarse grained. It is easy to see that if the synthesizer picks a complex block to do a "few" gates worth of logic, it was a waste of the chip area and utilization and best left for fine grained architectures. If you wanted to do floating point math with a "sea of nand gates" that would not be as efficient as a coarse grained FPGA that has floating point, or even integer, adders, barrel shifters, and or PLA elements in them that can be cascaded for larger bit words. that would make a fast adder and take less area than fine grained and utilize closer to 100% of the complex logic block.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top