Skip to content

Modules

U-LPT00135\sumeetc edited this page Dec 6, 2015 · 1 revision

Modules in ffead-cpp

common

This module provides common utilities and functions to the ffead-cpp framework. It consists of,

  1. Data Type conversion functions
  2. String utility functions
  3. Date, Timer and Formatting utilities
  4. BigInteger/BigDecimal implementations
  5. Compression features (gzip/deflate etc)
  6. Cryptographic features (Base64/SHA/MD5/HMAC-SHA etc)
  7. Advanced Logger
  8. XML Parser
  9. JSON Parser
  10. Regex utitlity wrapper
  11. Property File/CSV File reader implementations

cache

Cache implementation and interfaces to in-memory, memcached and Redis. This module provides an interface that can be extended to other cache implementations. Any cache can be integrated easily with the ffead-cpp framework. The CacheInterface class provides the specification for the Caching functionality within ffead-cpp

client-util

Utilities for connection/data handling for developing clients for HTTP/Binary protocol servers. Provides socket level utilities to make it easy to handle/manage communication with the server. Provides in-built support for HTTP and any length prefixed data unit based protocol. Also provides capability to connect the clients over SSL.

server-util

Provides a framework for building high performance servers. It provides a high performance event based loop that is scalable and highly performant. It uses the best event mechanism depending on the target OS.

  1. IOCP on windows/Mingw
  2. Select on Cygwin
  3. EPOLL on Linux
  4. /dev/poll on BSD
  5. Kqueue on MAC
  6. Event ports on SOLARIS
  7. Falls back to the best available method

http

This module makes use of the server-util module to provide server side functionality for HTTP. It implements the HTTP (RFC2616), HTT2 (RFC7540), HTTP Web-Socket (RFC6455), HTTP2 Experimental Web-Sockets (draft-hirano-httpbis-websocket-over-http2-01) and support for CORS.

ioc

It is the core module which manages the web application level services and their life-cycle. It provides an inversion of control (Dependency injection) concept. When you define the creation of your beans/services/objects in XML or Markers, ffead-cpp creates and manages the life-cycle and usage of the beans. It automatically injects dependencies into beans as defined by the configuration. It provides constructor/setter/interface injection options. The container automatically creates and destroys the bean depending upon its configured scope. By default all beans have singleton scope but prototype scope can be configured at the bean level.

reflection

ffead-cpp provides limited reflection support as the support for runtime type identification in C++ is limited. ffead-cpp parses the application level header files and generates intermediate code to provide reflection support, All public methods and fields are made available by the reflection module. Constructor/Destructor and static methods are also available.

serialization

This is another module that leverages the concept of parsing the application headers in order to provide serialization support. It looks at header files and generates code that provides XML/JSON/BINARY serialization support for any POCO classes that you may have. A unique feature of the serialization module is that it provides support for nested template objects as well. Targeted/Selective serialization option is also in the works, but the current release provides/emits code for all the three options XML/JSON/BINARY by default for now.

jobs

A Cron styled job scheduler for scheduling jobs/tasks. Configuration is handled with the help of the jobs.xml configuration file or with the help of markers.

threads

Provides implementation for direct, priority-based and scheduled thread pool. Provides wrappers for p_thread and p_mutex. Also provides future based thread pool implementation in order to execute future tasks.

sdorm

Provides ORM functionality for SQL and No-SQL databases like MySQL, Postgres, Oracle, SQL-Server and MongoDB. It also provides interfaces that are future ready to add any new database implementations. Also provides Id generators like identity, sequence, table based, uuid etc. Chain-able Query builder implementation is also provided in order to build queries gradually, configuration is managed with the help of a configuration file named sdorm.xml or via markers.

ssl

Provides common SSL capabilities.

interpreter

A very simple interpreter engine is also provided for basic usage.